Gentoo Archives: gentoo-user

From: Tom Smith <tom71713-gentoo52478932@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] tar over ssh
Date: Tue, 24 Jan 2006 21:51:59
Message-Id: 43D6A060.50400@yahoo.com
In Reply to: Re: [gentoo-user] tar over ssh by Ernst Herzberg
1 Ernst Herzberg wrote:
2
3 >On Tuesday 24 January 2006 21:40, Jeff wrote:
4 >
5 >
6 >>DUH ME! Open mouth, insert face...
7 >>
8 >>Ok, what I *meant* to say from post #1, is, the filesystem I'm
9 >>tarballing is quite large - 25g. The tar command should be able to
10 >>digest this, yes? Should I be worried?
11 >>
12 >>
13 >
14 >Last week i back'ed up a machine with 4 80G disks as RAID5 with the method
15 >mentioned before. tar-size on the desination machine was about 120GB
16 >compressed (yes, one File:). Both filesystems are reiserfs.
17 >
18 >Restore again wih the same method, only the other way around, to 4
19 >250GB-disks. No problems.
20 >
21 >Tip: check your destination tar file with tar -tzf ... or tar -tjf ... before
22 >you delete the source. Compression is a good check that no data has been
23 >changed during transfer of the data.
24 >
25 ><earny/>
26 >
27 >
28 Hey, I think I might have something useful to add here... :-D
29
30 To keep my tar file sizes more manageable, any directories containing
31 large directories have script blocks within the backup script that
32 create a tar file for each directory in that directory. (Whoa! Did I
33 just say that!?) Here's the block of code that, for example, handles my
34 /home directories:
35
36 <code>
37 dt=`date +%G%m%d-%H%M%S`
38 find /home/ -type s > /tmp/home-sockets.tmp
39 for x in `ls -lA /home/ | awk '{print $9}'`
40 do
41 tar cpPj -X /tmp/home-sockets.tmp -f
42 /var/backups/home-$x-$dt.tbz2 /home/$x
43 done
44 rm -f /tmp/home-sockets.tmp
45 </code>
46
47 This creates a separate tar file for each directory in /home. The $dt
48 var isn't required, of course... I just use it to "time stamp" all of my
49 backup files as it makes it easier to track them.
50
51 Regardless of whether or not the kernel or file system can support the
52 huge tar files others have referred to, I prefer to always make things
53 as manageable and "modular" as possible. The smaller the files, the
54 easier (quicker, really) they are to work with.
55
56 Just food for thought...
57 --
58 gentoo-user@g.o mailing list