Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have two server machines with PostgreSQL: (A) is version 9.0.15 and (B) version 9.2. I wish to make backups of the databases stored in (A) and (B) - and be able to do restore if needed too! - to a 'storage' machine (C) where I have postgresql-commons clients installed (9.3).

Which is the cleanest/better way to obtain my goal?

I've made scripts on (C) to use pg_dump to make local backups from (A) and (B), but being a newer version I've problems with restore, also when using Plain sql format.

Do I need to install clients pg_dump/restore for 9.0 and 9.2 version on the client machine (C) and if so, how? thanks.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I would run the backup jobs on A and B at specified times using the local native pg_dump, then push them to C for storage.

sudo su -c 'pg_dump -f ~/backupfile.sql -C "MyDB"' myuserid
scp ~/backupfile.sql myuserid@cmachine.mydomain.com:

Restoring from the backup file can be done with:

psql -d <database> -f backup-file.sql
share|improve this answer
Indeed this is the way I'm doing, I'd liked to have an option to do all from the 'client' C. –  stefan0n May 26 '14 at 13:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.