On 26/12/2009 12:44 AM, Brian Modra wrote:
use select pg_start_backup('some-name') (in psql logged in a postres) then start a tar of /var/lib/pgsql/data/, to stdout and pipe this to tar on another server using ssh
This won't work on a Windows machine. Windows does not permit files that are open for write by one process to be opened by another, unless the first process makes special efforts to permit it.
In general, people get around this by using the Volume Shadow Copy Service (VSS) via dedicated backup software. This takes a consistent snapshot of the file system and permits the backup software to access that snapshot.
If you were going to take filesystem-level backups on Windows, that'd be how you'd want to do it - have a pre hook in your backup software that called pg_start_backup() and a post hook that called pg_stop_backup(), letting the backup software handle the snapshot and filesystem copy.
-- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general