I made a Snapshot yesterday of a Django app running on a development server. I made sure to run sudo poweroff
before the Power Cycle.
After the App restarted, I couldn’t access the domain in my browser. I then try to dump my database, but I get the following error:
pg_dump: [archiver (db)] connection to database "db" failed: could not connect to server: Connection refused
Is the server running on host "####" and accepting
TCP/IP connections on port ###?
It actually seems like I can’t get any response from the DB or the app.
Response from nmap ip##
PORT STATE SERVICE
80/tcp closed http````
But the logs from the Django app tell me that it should be running.
How do I retrieve the data from my database and get the app running again?
Thank you!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hi!
So it sounds like you are using the Dokku postgres plugin. If that’s the case, then to dump a database, you’ll need to do it with Dokku as it is running inside a container.
and to restore one:
As to the question of will
dokku postgresql:create original_db_name
will destroy the old one, looking at the code:it looks like it will attempt to reuse the persistent volume.