As I was following through the tutorial on this subject https://www.digitalocean.com/community/tutorials/how-to-install-the-django-web-framework-on-ubuntu-18-04 I successfully deployed my django application with postgresql db on digital ocean. However I constantly fail to upload content of the db from my local computer to digital ocean. I always get an empty db after upload. Is there a way to fix it?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I opened the las log file & that’s what is says: “Cannot allocate memory” “Could not fork autovacuum worker process” "Worker took too long to start; cancelled “Autovacuum started without a worker entry” To me it looks chinese
I am trying to restore the file on DO in DO console using different commands, such as: psql dbname < dumpfile and others. It doesn’ work.
Hi,
If you need to do initial data upload to your database, consider the method with a dump file. It is quite reliable one. So, make a dump file of a database on your local computer, then send the dump file to your droplet, and restore your database from it on your droplet.
You can obtain detailed info on each step from the following resources:
Creating a database dump file, and restoring a database from a file: https://www.postgresql.org/docs/13/backup-dump.html
Transferring files using SFTP https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server
Try this article https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-16-04