Django database backup and restore + periodic backups

Поделиться
HTML-код
  • Опубликовано: 24 авг 2024

Комментарии • 50

  • @NotBeHaris
    @NotBeHaris 4 года назад +1

    I am late but glad to see that another great lesson for us to Learn.

    • @Pyplane
      @Pyplane  4 года назад

      Thank you Muhammad ! :)

  • @luizaraujo728
    @luizaraujo728 3 года назад +4

    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.

  • @pravarsharma
    @pravarsharma 4 года назад

    Where were you?? Awesome content all off the videos. 🤗👍😇

    • @Pyplane
      @Pyplane  4 года назад

      I was at home :) Thanks for the nice words :)

  • @yukselbastan4687
    @yukselbastan4687 4 года назад

    yessss thats definitively important. great.

    • @Pyplane
      @Pyplane  4 года назад

      Hi Yuksel ! :) Thanks for watching and I'm very happy you like it!

  • @aashayamballi
    @aashayamballi 4 года назад

    Thanks Luke, very informative 🙏👍

    • @Pyplane
      @Pyplane  4 года назад

      Hi Aashay! Very happy you liked it :) Thanks for watching :)

  • @TheBluetelligence
    @TheBluetelligence 2 года назад +1

    There are plenty error messages after you restore. Would be great if you could elaborate on them

  • @AliRaza-yk5ic
    @AliRaza-yk5ic 3 года назад

    Very Good Video Keep it up dude

  • @rangabharath4253
    @rangabharath4253 4 года назад

    awesome as always

    • @Pyplane
      @Pyplane  4 года назад

      Thank you :)

  • @fredhermannramandaniarivo7464
    @fredhermannramandaniarivo7464 5 месяцев назад

    Correct

  • @idedhica
    @idedhica 2 года назад +1

    is it working on postgres database..?

  • @mahadihassan07
    @mahadihassan07 2 года назад

    awesome, But the thing is in docker i want my backup file out side of the docker container. How to do that?

  • @farzanfarahani3498
    @farzanfarahani3498 3 года назад +1

    Is there anyway to avoid "No module named 'dbbackup'
    " on python 3.8 ?

  • @susilthapa4367
    @susilthapa4367 4 года назад

    Thank you , great content🙏🙏

    • @Pyplane
      @Pyplane  4 года назад

      Thank you Susil :)

    • @Pyplane
      @Pyplane  4 года назад

      Thank you Susil :)

  • @paborlouise319
    @paborlouise319 4 года назад

    Great content 👍

    • @Pyplane
      @Pyplane  4 года назад

      Thank you Pabor :))

  • @suryameda6215
    @suryameda6215 4 года назад

    Luke could you make a video on Django async tasks and Celery?

  • @supet1337
    @supet1337 3 года назад

    thank you very much!

    • @Pyplane
      @Pyplane  3 года назад

      thanks for watching!

  • @shrishtydhiman9889
    @shrishtydhiman9889 3 года назад

    Thanks

  • @mayurg2661
    @mayurg2661 4 года назад

    Awesome!

    • @Pyplane
      @Pyplane  4 года назад +1

      Thank you ! :)

  • @indravikas5564
    @indravikas5564 2 года назад +2

    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.

  • @dronjoestar5220
    @dronjoestar5220 3 года назад

    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

  • @reiltusoy231
    @reiltusoy231 4 года назад

    can you do a podcast or live sessions which we can discuss anything about python\django? :D

    • @Pyplane
      @Pyplane  4 года назад

      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 :)

    • @reiltusoy231
      @reiltusoy231 4 года назад

      @@Pyplane i do understand, hope you'll consider it soon. Thanks anyway and keep posting great content. :D

    • @Pyplane
      @Pyplane  4 года назад

      @@reiltusoy231 Thank you!

  • @CartoonsandLaughs
    @CartoonsandLaughs 3 года назад

    Well thats information is useful for my projects

    • @CartoonsandLaughs
      @CartoonsandLaughs 3 года назад

      Well can you tell me do I have to learn git also to deploy my projects

  • @AliRaza-yk5ic
    @AliRaza-yk5ic 3 года назад

    How can implement periodic backup in window o/s

  • @vickytilotia
    @vickytilotia 3 года назад +1

    cron jobs do not support windows.

    • @abrarahmed7549
      @abrarahmed7549 2 года назад

      Yes but in production we mostly has linux , so don't worry

  • @rezasadeghi2520
    @rezasadeghi2520 3 года назад

    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 ?

    • @Pyplane
      @Pyplane  3 года назад +1

      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

    • @rezasadeghi2520
      @rezasadeghi2520 3 года назад

      @@Pyplane Thanks Luke

    • @thiagonascimento5987
      @thiagonascimento5987 3 года назад

      @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

    • @TranThin
      @TranThin 2 года назад

      @@Pyplane hey you must make a tutorial on that topic including backup&restore. hopefully

    • @TranThin
      @TranThin 2 года назад

      with docker-compose

  • @fahmiaditia5256
    @fahmiaditia5256 2 года назад

    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.