I need to make a backup of the database and be able to download. Is it possible to do that?
I need to make a backup of the database and be able to download. Is it possible to do that?
There is pgdump
https://www.postgresql.org/docs/9.6/app-pgdump.html
also:
https://help.pythonanywhere.com/pages/RegularPostgresBackups/
so for example
pg_dump --host='someone.postgres.pythonanywhere-services.com' --port='373737' --username=blobby -w --format=c --file=pgbackup`date +%F-%H%M`.dump mydatabase
Which formats the filename nicely as well.
hi, i've run this command in bash command line and don't see any backup file in folder. Should i see them? Where are they located and how i could access them? tnx
It should put the file into the directory where you can the command. Did the command print anything out? Could you post the exact command that you ran?
Hi, I have the same issue.
Ran the command, with all the right settings, but can't locate the file anywhere. nothing was printed out or so after running the command
Found the answer myself, I was running this from a Postgress Console, I need to run this from a bash console ! Solved
Glad to hear that you figured it out!