Home > front end >  Postgresql full standalone backup on remote host
Postgresql full standalone backup on remote host

Time:05-01

I am trying to figure out what is the correct way to create a full standalone backup which will be stored on a remote host(I should use pg_basebackup). I suppose that it should look like that:

  1. pg_basebackup on the main host
  2. Use scp to deliver it on a reserve host

Is it a right way?

CodePudding user response:

Sure that will work. It has the advantage that you can compress the backup before sending it over the network. And if the transfer fails, you could resume it (using rsync). It has the disadvantage that it stores the full backup on the server.

Or you could backup from the "reserve" host using -h to specify the main host. This won't compress the data for transit (until v15 comes out) and can't be resumed if interrupted.

  • Related