Syncing open files
jw at pegasys.ws
Thu May 30 14:47:26 EST 2002
On Wed, May 22, 2002 at 11:57:17AM -0400, dejongm at secdog.com wrote:
> Just a few quick questions..
> Does rsync copy open files?
> If so, does file integrity remain intact?
> Im looking to backup IIS log files and maybe Oracle and SQL Server DB files. If rsync isnt appropriate, what would you recommend?
rsync is perfectly appropriate. You just need to prevent
corrupting changes from happening while rsync runs.
My guess is that IIS log files are, like apache's,
append-only and not machine read. Therefore if copied
during a change the worst that can happen is the copy will
have a partial entry at the end.
Oracle is far more delicate. _IF_ there is an update query
in progress the tablespaces will be inconsistant. If you
flush and copy the redo logs _after_ the tablespaces you can
recover by replaying the redo logs just like you would after
a crash. I don't reccomend that method but it will work.
Far better is to sync and lock the tablespaces while rsync
runs. The Oracle documentation includes poorly designed
example code on how to do this in a section on on-line
backups. The ultimate safe way is to shut down Oracle
for the backups but i recognize the shutdown+startup time
can be prohibitive.
As for MS SQL server, I can't say. I expect it has
facilities to assist in backups.
In sum, what you need to do is bracket the rsync run with
commands to stop and then restart those processes that
may corrupt files. Any good backup system will provide a
facility for doing so.
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync