Backing up all data from a postgreSQL DB (Django Site)
===

I've tried going through the documentation on the postgres site and i'm having now luck. What i'd like to do is back up all my data within my database so i can transfer it to my dev site. I've managed to do a pg_dump and it pull the actual database down but doesn't include any of the content.

I try and restore the data and it just tries to all the fields in the database again. I've tested it by creating a news post before the dump then deleting the post before a restore. Yet nothing changes.

Here are the commands i've ran in the backend (logged in as my user, as don't have a sudo password for the database user):

sudo pg_dump database_name | gzip -c > joshdump.gz
gunzip joshdump.gz

sudo psql -d database_name -f joshdump


Is this correct? Or do i need to run something else to add all content on the site into the database to?

I'm new to postgreSQL and every tutorial on the web pretty much does the same thing.

Please let me know if you need anymore details!

Thanks,

Josh


