Re: RSYNC & INFORMIX
Posted in 2004
Hari Gupta wrote: > Question about rsync and Informix. > > Many of you may be using rsync to sync or backup their servers which > has a beauty of sending ONLY changes in data across network. That's' > fine. > My question here is that while engine is running: > > 1. Can the changes in data in various DBSPACES will be synced ? > 2. BTW if it does, how far it is safe and reliable ? Roughly speaking No and Not Very, but you probably want more information than that. One question for you: how does rsync know how to back up a file? Because its timestamps altered, or a checksum changed, or by some other mechanism? And when a file changes, it sends the whole file, I assume - not just the pages that have changed? OK - analysis based on the assumption that I'm not too far off track. Informix provides complex archiving tools like ON-Tape and ON-Bar (and EBR - aka XBR) to allow you ensure that backups are consistent, even if people are changing the database(s) while the backup takes place. Since rsync cannot be instantaneous - especially not on terabytes of data - it is likely that it will copy self-inconsistent data to your backup, and self-inconsistent backups are worse than useless. At a (hard) checkpoint, the data on disk and the data in shared memory are consistent. If anybody has changed the values anywhere in a database since the last checkpoint, the information about the changes may, or may not, be on disk. Informix will not be cognizant of any locks placed by rsync. If your system is off-line (so it is not being used), then you can rsync your database reasonably safely. At controlled shutdown, a hard checkpoint ensures that the data on disk is accurate. If your system is in quiescent, single-user (next release) or online modes, your rsync backup is unreliable at best, and should not be used. For most people, having the DBMS unavailable for use during the backup process is sufficient reason not to use a mechanism that won't work unless the DBMS is offline. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/