### List backups ``` heroku login heroku pg:backups --app skillbox-prod ``` ### Create a backup `heroku pg:backups:capture --app ` The following command will provide a URL to where the backup can be downloaded (expires after 60 minutes) `heroku pg:backups:url b001 --app ` To restore a backup, use `heroku pg:backups:restore b001 DATABASE_URL --app ` To see the backup schedule `heroku pg:backus:schedules --app ` To download a backup use `heroku pg:backups:download --app ` ### Load a backup locally Be careful since you download user data as well. Therefore use preprod app by default, it is anonymized. ####Download backup `heroku pg:backups:download --app ` ####Load dump file into your db To download a backup `pg_restore --verbose --clean --no-acl --no-owner -h localhost -U skillbox -d skillbox latest.dump` Add python manage.py migrate python manage.py dummy_users