using rsync on files that are being written to
wayned at samba.org
Tue Jun 21 17:01:17 GMT 2005
On Thu, Jun 16, 2005 at 01:35:32PM -0600, lamad wrote:
> I know people who shutdown the services on their *nix box before
> backing up with rsync. this is to avoid accidentily backing up files
> that are being written to, which might result in a corrupt backup of
> that file.
> is this even a concern? if it is, what methods are available for a
> small shop to schedule regular backups but still maintain uptime?
This depends on what you're backing up -- things like a database might
either have an incomplete on-disk image of the current state, or they
might update in the middle of the backup, giving you an inconsistent set
Solutions are also specific to the thing being backed-up, but typically
fall into two categories: (1) ask the service to dump all its data and
to temporarily lock any changes, unlocking after the backup completes,
or (2) ask the service to create a local backup of its data, and when
that is done, backup that to the remote system.
More information about the rsync