unfortunately, this lib backs up the tables in alphabetical order, for example: the tables that start with the letter A to the tables that start with the letter Z, but if table A has a foreign key to table Z, the records of table A will not be created, because table Z does not exist. Then, you will need to get the lines from the backup files and run them in the actual order of the foreign key.
I am getting this error. Error running: pg_dump --host=localhost --username=**** --no-password --clean **** [Errno 2] No such file or directory: 'pg_dump' Please help if anyone know how to fix. This error i am getting when i am running using crontab. When i run, python manage.py dbbakup, it is working. On Terminal when i type pg_dump command it works.
Unfortunately, it works only with exists database. Now, I try to restore backup in empty database (I change window on linux) and I got troubles, that one or another table doesn't exists. I think, that's because table creation in dump not in right order. But thank you anyway
@Nirbhay Bagmar i solved this adding the following to the api dockerfile and using psycopg2 as db engine RUN apk update \ && apk add postgresql-client postgresql-dev gcc python3-dev musl-dev the postgresql-client comes with pg-dump, allowing you to use dbbackup on dockerized projects
I tried this django package. because the error "ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'" so I changed "ugettext_lazy" to "gettext_lazy", and tried to do a backup, it worked. but when i try to restore back. it worked but the data in my database, only the CustomUser returned. data on other models is lost i use localstorage and sqlite lucky me... before this incident I first copied my database.
I am late but glad to see that another great lesson for us to Learn.
Thank you Muhammad ! :)
unfortunately, this lib backs up the tables in alphabetical order, for example: the tables that start with the letter A to the tables that start with the letter Z, but if table A has a foreign key to table Z, the records of table A will not be created, because table Z does not exist. Then, you will need to get the lines from the backup files and run them in the actual order of the foreign key.
Where were you?? Awesome content all off the videos. 🤗👍😇
I was at home :) Thanks for the nice words :)
yessss thats definitively important. great.
Hi Yuksel ! :) Thanks for watching and I'm very happy you like it!
Thanks Luke, very informative 🙏👍
Hi Aashay! Very happy you liked it :) Thanks for watching :)
There are plenty error messages after you restore. Would be great if you could elaborate on them
Very Good Video Keep it up dude
awesome as always
Thank you :)
Correct
is it working on postgres database..?
awesome, But the thing is in docker i want my backup file out side of the docker container. How to do that?
Is there anyway to avoid "No module named 'dbbackup'
" on python 3.8 ?
Thank you , great content🙏🙏
Thank you Susil :)
Thank you Susil :)
Great content 👍
Thank you Pabor :))
Luke could you make a video on Django async tasks and Celery?
thank you very much!
thanks for watching!
Thanks
Awesome!
Thank you ! :)
I am getting this error.
Error running: pg_dump --host=localhost --username=**** --no-password --clean ****
[Errno 2] No such file or directory: 'pg_dump'
Please help if anyone know how to fix.
This error i am getting when i am running using crontab. When i run, python manage.py dbbakup, it is working. On Terminal when i type pg_dump command it works.
did you get the solution pls
Unfortunately, it works only with exists database. Now, I try to restore backup in empty database (I change window on linux) and I got troubles, that one or another table doesn't exists. I think, that's because table creation in dump not in right order. But thank you anyway
can you do a podcast or live sessions which we can discuss anything about python\django? :D
Hi Reil. I don't to coaching or mentoring so I don't think I'll do that any time soon. First of all need to work on my english and improve it a bit :)
@@Pyplane i do understand, hope you'll consider it soon. Thanks anyway and keep posting great content. :D
@@reiltusoy231 Thank you!
Well thats information is useful for my projects
Well can you tell me do I have to learn git also to deploy my projects
How can implement periodic backup in window o/s
Run a thread using python threads
cron jobs do not support windows.
Yes but in production we mostly has linux , so don't worry
what if the database is deployed with docker ? how to do back up a lets say a postgres db deployed with docker to a server ?
Hi Reza, then it's a different story. I have a docker tutorial on my list so one day I'll make a tutorial on that topic including backup&restore
@@Pyplane Thanks Luke
@Nirbhay Bagmar i solved this adding the following to the api dockerfile and using psycopg2 as db engine
RUN apk update \
&& apk add postgresql-client postgresql-dev gcc python3-dev musl-dev
the postgresql-client comes with pg-dump, allowing you to use dbbackup on dockerized projects
@@Pyplane hey you must make a tutorial on that topic including backup&restore. hopefully
with docker-compose
I tried this django package.
because the error "ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'" so I changed "ugettext_lazy" to "gettext_lazy", and tried to do a backup, it worked.
but when i try to restore back. it worked but the data in my database, only the CustomUser returned. data on other models is lost
i use localstorage and sqlite
lucky me... before this incident I first copied my database.