CookieCutter Django Restore Script not allowed with DigitalOcean Managed Database #4932
-
Hi all, I'll start this by saying I have exclusively used Django's ORM, and have little knowledge of Postgres itself, so apologies if this is a stupid/simple question. I have a Cookiecutter Django project I made ~2 years ago (with Docker, if that's relevant) for my job at work. The database is getting really big now, and I wanted to migrate it to a DigitalOcean Managed Database. I used the backup script to get my backup file, but I am unable to use the restore script to add the data to my new managed database. DigitalOcean say this is because the restore script is trying to drop the whole database, which they do not allow for as they need certain parts of the database to remain for their functionality. Is there a way I can adjust the restore script to simply insert the data without dropping the database, or are there reasons that this wouldn't work? Thanks for any help anyone can offer! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The Another option is to just remove the |
Beta Was this translation helpful? Give feedback.
The
.sql.gz
file is a gzip version of thepg_dump
output. If yougunzip
it you can use it with your favorite database tools.Another option is to just remove the
dropdb
andcreatedb
command from https://github.com/cookiecutter/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/compose/production/postgres/maintenance/restore