[SATLUG] Live backup / hot imaging software for Linux?
bruce.dubbs at gmail.com
Thu Feb 3 17:13:15 CST 2011
David Salisbury wrote:
> > That can be a bit tricky since other processes may be updating the
> partition as
> > you are copying. You really don't want to copy the partition
> superblock and related
> > data.
> But, if I'm wanting a full image of the drive (so as to just plug the
> backup in and go in case of drive failure) don't I need the partition
> superblock and structure data as well?
No. It is created when the partition is formatted.
> I know that the partition
> content can change during the copy, and with the data/processes on this
> drive/system that's OK. I guess I'd just like to be able to make a
> full, fully-bootable copy of a drive without having to shut down the
> machine that it's running on, if I can.
> Oh, and I'd tried the copy command before with "cp /dev/hda /dev/hdb",
You don't want to specify devices. Use files. I have used tar to copy
a root partition to a file and then to another system. A few files need
to be changed for hostname, ip address, etc.
> but sometimes the result in /dev/hdb would work and would boot and
> sometimes it wouldn't, even after booting with a rescue disc and
> repairing anything bootloader-related. I was just curious if there's
> something that will do this type of backup on a more "consistent" basis.
Yes. Copy the files:
mount /dev/hdb /mnt
tar --one-file-system /mnt -cf - . | (cd /mnt; tar -xf -)
Note that you do not want to copy some mounts like /proc, /sys, etc.
/dev could be copied, but it is generally populated dynamically by udev.
More information about the SATLUG