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:
pg_basebackup
on the main host- 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.