From: Ian Lea <ian.lea@gmail.com>
To: droland <david.roland@soapware.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_start_backup - backups
Date: Fri, 8 Apr 2011 09:55:00 +0100
Message-ID: <BANLkTik2vMyXb7EyeQLVUW8waAKDBaU4rA@mail.gmail.com> (raw)
In-Reply-To: <1302200280041-4289135.post@n5.nabble.com>
References: <1302200280041-4289135.post@n5.nabble.com>
> Attempting to run a backup with the database online. I first issue
> 'PG_START_BACKUP', then copy the contents of the postgresql data folder,
> then issue 'PG_STOP_BACKUP'. The database service remains running during the
> copy. If queries continue to hit the database after the PG_START_BACKUP
> command is issued changes to the data folder are possible, which can cause
> copy errors (for instance, a file not found exception). The file copy method
> first creates a string array of the data folder contents (all folders and
> files) and then processes the array, copying one file at a time. What am I
> doing wrong?
You need to use a program to do the copying that can accept changes to
files as it runs. rsync is a common choice and has the massive
advantage that it only takes changes and is therefore, after the first
run, quick.
See http://www.postgresql.org/docs/9.0/static/continuous-archiving.html#BACKUP-BASE-BACKUP
or use your favourite search engine to find more info.
--
Ian.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ian.lea@gmail.com, david.roland@soapware.com
Subject: Re: pg_start_backup - backups
In-Reply-To: <BANLkTik2vMyXb7EyeQLVUW8waAKDBaU4rA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox