[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Backing up a running system



Hi,

On Tue, 28 Dec 2004, Robert S wrote:

> I have a debian (woody) server running at work and would like to back up the
> entire system onto some sort of removable media (USB hard drive, DVD,
> removable harddrive etc).  I do daily backups of /etc and /home using tar,
> but would like to be able to restore my system quickly in the event of a
> disaster.  I don't change things much on my system, so I'd only need to do
> this once every 6 months or so.
>
> To date I've been using partimage - but that requires that the partition
> being backed up is unmounted.  I've done a bit of googling, but haven't
> found something that fits the bill.
>
> Is there a way of doing this (preferably remotely) without unmounting the
> filesystem (like the new version of Norton Ghost is able to do in Windows)?
>
I would write an image from the partitions. If you have no 'spare' disks
in the computer, or only one partition you have to mount a remote drive
directly, like USB, Samba, or similar.

A backup is easily done with dd, for example:
dd if=/dev/sda1 bs=1M | gzip -c9 > /media/usbdrive/sda1.bin.gz

This backs up the partition, zips it and writes it to a removable drive.

When restoring you might run into some discontinuities with files which
were open during the backup, but as long as these are logfiles, it
shouldn't be a big problem. Just make sure you closed all importand files
(if any) before backing up this way.

Restoring the image is almost the same:
gunzip -c /media/usbdrive/sda1.bin.gz | dd of=/dev/sda1 bs=1M

Cheers,
Sebastiaan


--

English written by Dutch people is easily recognized by the improper use of 'In principle ...'

The software box said 'Requires Windows 95 or better', so I installed Linux.

Als Pacman in de jaren '80 de kinderen zo had be?nvloed zouden nu veel jongeren rondrennen
in donkere zalen terwijl ze pillen eten en luisteren naar monotone electronische muziek.
(Kristian Wilson, Nintendo, 1989)




Reply to: