[Linux-disciples] saving the whole shabang
Adam Rosi-Kessel
adam at rosi-kessel.org
Tue Sep 14 19:02:52 EDT 2004
On Tue, Sep 14, 2004 at 03:10:52PM -0700, Karl Sokol wrote:
> Is there an easy way to back up an entire computer? I
> am running Debian and it going quite nicely, but I am
> going to be doing some hefty experimenting and would
> like a hassle free way of restoring it to its present
> state some time in the futere.
There are many ways to do this. Unlike win32, with linux "what you see
is (basically) what you get." This means that if you copy a filesystem
(say, with cp) to some place and then later put it back, it will be just
what it was. There are no hidden files or special sectors that should
present a problem.
One easy way to do this, if you have enough disk space or disks, is just
to create a backup partition/disk. Let's say the spare disk is hdb and
has one partition, you would mount it
mkdir /mnt/backup
mount /dev/hdb1 /mnt/backup
then copy your whole filesystem over to it
cp -a / /mnt/backup
And voila, your backup is done.
This could also be another partition on your main disk, e.g., hda2.
As a caveat, it will work better generally if the main disk is mounted
read-only at the time. You can do this by editing the boot-up parameters
(with lilo or grub) to include init=/bin/sh. A better way is to boot
into knoppix from CD, and then mount both the source and destination hard
drive from there, e.g.
mount /dev/hda1 /mnt/hda1 -o ro
(assuming hda1 is your main drive, ro = read-only)
You can also do this backup over the network, using scp or rsync
(preferably rsync -a).
You can also use rdiff-backup to do this, which has the advantage of
allowing you to incremental backups from day to day.
Once you've backed up, if you want to go back to your backup, you can
just copy it back over the original. Again, booting with knoppix is a
preferable way to do this, although it is possible having booted right
from the hard drive.
You could also just boot into your backup drive; with your bootloader
(grub/lilo) you could set root=/dev/hdb1 and then you would boot into
your old setup.
Now if you don't have a spare hard drive/partition, you could backup over
the network, assuming you have enough space somewhere (bostoncoop is a
possibility). But I highly recommend getting an extra drive or two. 20G
drives can usually be pulled out of the trash or purchased for
next-to-nothing on ebay.
Another option would be to backup to CD/DVD, if you have a burner. There
are various Debian utilities that will do this--split your installation
across sufficient number of CDRs, but this is a bit more of a pain to
restore from.
So that's a start--ask more questions if/when you get stuck.
--
Adam Rosi-Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20040914/c4d0e013/attachment.pgp
More information about the Linux-disciples
mailing list