On Tuesday 27 April 2010 14:07:07 Chris Davies wrote: > Johannes Wiedersich <johan...@physik.blm.tu-muenchen.de> wrote: > > rsync -a /mounted/partition /directory/on/mounted/backup > > backs up all I need. Read man rsync for its options. > > > > Why not just copy the data off the mounted partition. Even more simple > > and faster. > > That's great for you. It might not be so useful for the OP, because > their filesystem is fast-changing and/or contains large files (or > groups of files) that are updated but need to maintain their internal > integrity. Consider MySQL database files as one simple example of such.
For "normal" file operations, taking an LVM snapshot of the mounted filesystem and then making your backup from that should be sufficient. This should even work for postgreSQL database files (though, it is not optimal). MySQL has a history of being more flaky, but it might work there as well. If you snapshot a mounted file system, the snapshot will be approximately equivalent to the original file system, uncleanly unmounted at that exact moment (think: power failure). It's possible to then take backups of an active system with no downtime (although I/O load will certainly go up during the backup). If you mount the snapshot as part of the backup procedure, a journaled file system will want to replay the journal then. Otherwise, a journal replay will be required at restore time. PostgreSQL (etc.) will also end up doing a journal replay / recovery at restore time. If you cleanly unmount a file system, take a snapshot of it, remount it, then make your backup from the snapshot, you should be in a much better position. You will have a little bit of downtime, but the snapshot will be of a cleanly unmounted file system that will be totally quiesced during the backup process. Again, I/O load will likely be high during the backup, but that's not easily avoided. Since the file system was cleanly unmounted, no journal replay / recovery will need to occur at any level at either backup or restore time. (Honoring "Reply-To" header by including the author in the CC.) -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
signature.asc
Description: This is a digitally signed message part.