System backup vs. system images
Random October 13th, 2006
Creating a system image is IMHO different from creating a level 0 backup.
A backup is destined for the one host it was taken from, no other. MBR, partitioning, filesystems will all stay the same. Whereas a system image is used to multiply an installation to different hosts, with probably different partitioning, eventually different mount points. Differences of configuration is not part of this post, so yes, there are definitly different setting for network, hostname, …, but that has to be handled after restoring the image.
Target systems are Intel-based, so a Rescue-CD like RIP (Rescue Is Possible) can be used. The whole system is to be backed up, so unmounting of the root partition is going to be hard, meaning a boot from external media (e.g. CD) is required. We sure want to have a consistant state, so changes to the running filesystem must not be possible during backup. The backup destination is either an external storage like a DVD burner, tape or USB harddisk, but can also be a network storage like nfs directory, netcat tcp backup, …
Let’s take a closer look at the steps involved for either of the possibilities:
Blockbased
Operates on the block level. Similar to saving bit by bit from the blockdevice in question. This should never ever be done on a mounted filesystem.
Procedure:
- Boot from CD
- Prepare backup destination
- Backup MBR(s)
- Backup partition table(s)
- Backup whole disk(s) or required block devices
- Reboot
Advantages:
- independence of the filesystem used (so indirectly all filesystem features are supported)
- can be used for non-linux filesystems (e.g. backup NTFS partitions)
Disadvantages:
- inflexible
- unable to restore single files or directories
- no listing / index possible
Tools:
Filesystem based
Operates on the filesystem level. The supported filesystems are known, usually with all the features they offer (e.g. extended attributes, ACLs). This should never ever be done on a mounted filesystem.
Procedure:
- Boot from CD
- Prepare backup destination
- Backup MBR(s)
- Backup partition table(s)
- Backup required filesystems
- Reboot
Advantages:
- independence of the blockdevice
- all filesystem features supported
- only a limited number of filesystems supported (mostly linux)
Disadvantages:
- some flexibility
- unable to restore single files or directories
- no listing / index possible
- partition sizes must be at least as large as the original one
Tools:
Filebased
to be written
Blockbased backups are definitly more suitable for level 0 backups, as we definitly restore to the same host, and everything should be the same, bit by bit.
That leaves filebased archives for system images, as they are extremly flexible.
References
http://www.halfgaar.net/backing-up-unix
- Category: Bits & Bytes S-Tags: Linux, SysAdmin
- Comments Off on System backup vs. system images