0

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.

0

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
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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