suggestions for archive_command to a remote standby
suggestions for archive_command to a remote standby
От:
John DeSoi <desoi@pgedit.com>
Дата:
rsync seems to be suggested in a number of references for the archive_command when copying WAL files to another server. But the documentation states in bold letters that the command should refuse to overwrite existing files, *and that it returns nonzero status in this case*. You can keep rsync from overwriting files, but I don't see any options for generating an error if the file exists. Anyone care to share a method or script for handling this correctly with rsync or some other common utility? Thanks! John DeSoi, Ph.D.
Re: suggestions for archive_command to a remote standby
От:
Rich Shepard <rshepard@appl-ecosys.com>
Дата:
On Thu, 11 Aug 2011, John DeSoi wrote: > rsync seems to be suggested in a number of references for the > archive_command when copying WAL files to another server. But the > documentation states in bold letters that the command should refuse to > overwrite existing files, *and that it returns nonzero status in this > case*. You can keep rsync from overwriting files, but I don't see any > options for generating an error if the file exists. John, I've not followed this thread, but I think you misunderstand rsync. I use it (via dirvish) to back up files every night to an external drive (all files on the server) and to copy files between my server/workstation and my laptop computer. If I change a file on the workstation, then want the latest version on the laptop I run rsync with the -avz options and I get the file revised. Of course, I may be completely off base here with your needs. Rich