rajankn
By:
rajankn

Transferring postgresql data from linode to digital ocean

August 28, 2014 1.3k views

Hi,

What would be the steps to transfer data from linode to digital ocean ? I am using postgresql and have gone through this https://www.digitalocean.com/community/tutorials/migrate-your-current-vps-linode-rackspace-aws-ec2-to-digitalocean but it does not seem to help as when I dump the databse the file seems to be empty .

1 Answer

If you are using Postgres, the commands will differ from MySql. To dump the database (and compress it), run:

pg_dump dbname | gzip > filename.gz

Then you can restore it on your new server with:

cat filename.gz | gunzip | psql dbname

Check out the official Postgres docs on backing up.

Have another answer? Share your knowledge.