[Gllug] Backups

Alain Williams addw at phcomp.co.uk
Tue Feb 19 09:44:44 UTC 2002


On Tue, Feb 19, 2002 at 08:55:36AM +0000, Andre van der Walt wrote:
> Hi
> 
> Anyone know of a good way to backup the 
> 
> 1 master boot record (MBR) 
> 2 a partition as a whole?

I use something like this:

	GenerateLabel > /tmp/Label
	dd if=/tmp/Label of=/dev/nst0 bs=10k
	cd /
	for MountPoint in home usr . boot var tmp
	do	echo "Backing up $MountPoint"
		find $MountPoint | cpio -ova -H crc -C 10240 > /dev/nst0
	done
	# Backup /boot / as block by block
	dd if=/dev/hda of=/dev/nst0 bs=10k
	dd if=/dev/hdb of=/dev/nst0 bs=10k

Why:
* One file system at a time makes easier recovery
* block by block of / & /boot means that when the disk goes up in smoke
  you can just repartition & dd the file systems back, reboot, format &
  cpio the other partitions back.
* GenerateLable print things like:
  today's date, df, lilo information, fdisk -l, command used to backup,
  command to read the backup, order of files on tape, ..
  All the sorts of things that you need to know in order to rebuild the box,
  things that (in theory) you know, but will probably forget on the day.

OK: the script is more complicated than that, but that is the idea.

> Are there any advantages in going for reiserfs vs ext2 filesystem in
> this regard?
Not that I can see.

-- 
Alain Williams

#include <std_disclaimer.h>

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list