1 |
On 06/24/2014 03:43 PM, meino.cramer@×××.de wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I bought two identical external harddrives, USB 3.0, with 1 TByte each |
5 |
> (no SSD - the good ole mechanical ones...;). |
6 |
> |
7 |
> The intended use is for backup of longer files. The drives will |
8 |
> contain the same contents. |
9 |
> |
10 |
> Currently there are still "clean metal" (no partitioning, no fs). |
11 |
> |
12 |
> Data integrity and recoverability (Uhhh...that words looks wrong...) in |
13 |
> case of an desaster is more important than speed. |
14 |
> |
15 |
> What is the recommended way of partitioning ? |
16 |
> What filesystem to choose? |
17 |
> |
18 |
> |
19 |
> Thank you very much in advance for any help! |
20 |
> Best regards, |
21 |
> mcc |
22 |
> |
23 |
> |
24 |
> PS: Running vanilla kernel 3.15.1.... |
25 |
> |
26 |
> |
27 |
> |
28 |
> |
29 |
|
30 |
I do this using hard links and rsync to only copy changed data. |
31 |
this creates a dated folder structure that i can then rsync / cp using a |
32 |
livecd to baremetal and basically allows best recoverability, imho. |
33 |
so long as the filesystem supports hard links you are golden. |
34 |
you might want btrfs for this for long term storage to help in case of |
35 |
bitrot, but rsync should refresh the file if it is suddenly unreadable |
36 |
(meaning any other hard lnked versoins are also up the swanny) |
37 |
ymmv depending on what it is you are backing up |
38 |
|
39 |
#!/bin/bash |
40 |
echo 'preparing..' |
41 |
date=`date "+%Y-%m-%d_%H.%M.%S"` |
42 |
workingfolder="/mnt/usb/backupsyncs/myhost1" |
43 |
fromfolder="root@myhost1:/* --exclude=/var/tmp --exclude=/dev |
44 |
--exclude=/mnt --exclude=/opt --exclude=/proc --exclude=/sys |
45 |
--exclude=/usr/portage --exclude=/usr/src" |
46 |
|
47 |
echo "Date " $date |
48 |
echo "From " $fromfolder |
49 |
echo "To " $workingfolder |
50 |
|
51 |
echo "move current to be dated" |
52 |
mv $workingfolder/current $workingfolder/backup-$date |
53 |
|
54 |
echo "now syncing into dated folder" |
55 |
rsync -vz --partial --modify-window 5 -W --delete -a $fromfolder |
56 |
$workingfolder/backup-$date |
57 |
|
58 |
echo "cleaning up..linkcopying dated folder to <current>" |
59 |
cp -al $workingfolder/backup-$date $workingfolder/current |