Gentoo Archives: gentoo-user

From: Florian Philipp <lists@××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] backup to a cold-swap drive
Date: Wed, 28 Apr 2010 15:32:15
Message-Id: 4BD854DD.7040004@f_philipp.fastmail.net
In Reply to: [gentoo-user] backup to a cold-swap drive by Iain Buchanan
1 Am 28.04.2010 03:41, schrieb Iain Buchanan:
2 > Hi,
3 >
4 > A winblows colleague said he uses a utility to backup his internal hard
5 > drive to an external disk, such that if his internal disk fails he can
6 > replace it with the external disk and continue straight away.
7 >
8 > Since I go to weird locations with unreliable power and sometimes drop
9 > my laptop I thought it should be simple to do the same in Linux. I have
10 > an external disk the same size, but now what?
11 >
12 > * I want to copy changes intelligently (ie. no dd, gparted, or
13 > Ghost4Linux).
14 > * I want to copy a specific device only (no usb keys, etc) to a
15 > specific external device.
16 > * Windows partitions can be ignored.
17 > * It doesn't matter if the copy is not unmounted properly, eg. if
18 > power is shut of without shutting down.
19 > * The external disk must be able to be absent
20 >
21 > Can md use one internal and one external disk in a RAID 1 setup, with
22 > the external disk not always there? Any other suggestions?
23 >
24 > thanks :)
25
26 md would be extremely slow because it has to rebuild/resync the complete
27 array.
28
29 I suggest you manually recreate the partitioning scheme, install grub,
30 then mount it with some little script and call some backup tool to do
31 the actual copying.
32
33 If you can live with just one big partition as a backup (probably with
34 separate /boot), you should replace fstab and grub.conf on the backup
35 medium and blacklist them from the files which you want to back up.
36
37 Concerning the backup tool, I would use `rsync --delete` plus all
38 relevant switches for permissions, times, acls, etc. If you use another
39 tool, just make sure it doesn't put some metadata onto the backup medium
40 and that it can delete files which no longer exist on the original medium.
41
42 With regard to your requirement to just 'pull the cord' without
43 umounting it: Better mount it with '-o sync' to increase your chance
44 that everything works fine afterwards. But in reality, nothing can
45 really protect you from filesystem corruption in this situation. If you
46 can afford, better keep two backup media which you round-robin.
47
48 Hope this helps,
49 Florian Philipp

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

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