Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] backup to a cold-swap drive
Date: Thu, 29 Apr 2010 14:45:14
Message-Id: 201004291644.34796.wonko@wonkology.org
In Reply to: [gentoo-user] backup to a cold-swap drive by Iain Buchanan
1 Iain Buchanan writes:
2
3 > A winblows colleague said he uses a utility to backup his internal hard
4 > drive to an external disk, such that if his internal disk fails he can
5 > replace it with the external disk and continue straight away.
6
7 I do the same, but with a 2nd internal drive. The drive is partitioned
8 similar, with some partitions being a bit larger so I can do incremental
9 backups, too.
10
11 I am using rdiff-backup, which makes use of rsync. The backup partition
12 has exactly the same contents as the source partition, except for an
13 additional 'rdiff-backup' directory that contains incremental backups of
14 files that were modified from backup to backup, gzipped.
15
16 Some other partitions are handled differently: /boot is just being dd'ed,
17 contents of /usr/src are tarred each, and /var/portage/packages/ is just
18 plain rsynced. Some unnecessary stuff like .ccache and /var/tmp/portage is
19 excluded.
20
21 All my partitions are LVM volumes, so before the backup starts, I make a
22 LVM snapshot of the partition. This way I can modify it while the backup
23 is still in progress.
24
25 I wrote a shell script to do this, so I do not have to issue a lot of
26 commands every time I want to do the backup. As there are now some others
27 using this script, adapted to their needs, I started to rewrite it in a
28 way that it reads a config file, and no modification of the script itself
29 is necessary. If anyone is interested, send me an email.
30
31
32 Some time ago my first drive started having bad blocks. Without LVM, I
33 could just have swapped the disks, but so I had to rename the backup
34 volume group to the original volume group from a live cd. And the system
35 was running from the new drive as it was before - only that I no longer
36 had a backup until the new drive arrived. This makes an uneasy feeling
37 with these 1.5 TB drives.
38
39 Wonko

Replies

Subject Author
Re: [gentoo-user] backup to a cold-swap drive Iain Buchanan <iaindb@××××××××××××.au>