Gentoo Archives: gentoo-user

From: Mike Kazantsev <mike_kazantsev@×××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] rsync + tar + bz2 ?
Date: Sat, 07 Mar 2009 17:45:33
Message-Id: 20090307224214.342848ba@coercion
In Reply to: [gentoo-user] rsync + tar + bz2 ? by Grant
1 On Sat, 7 Mar 2009 08:04:17 -0800
2 Grant <emailgrant@×××××.com> wrote:
3
4 > I'm backing up numerous large files on another machine on my local
5 > network. I've only been using rsync, but it occured to me that I
6 > might be able to save some time and space if I incorporate tar and
7 > bzip2. How will rsync interact with those? If I turn the whole
8 > backup into a big tar.bz2, would rsync need to redownload the whole
9 > thing if I change one file? If so, maybe I should turn different
10 > groups of files into tar.bz2 archives so rsync only needs to
11 > redownload an archive if one of its files has changed?
12
13 It's not a default behavior, but there is an '--inplace' option.
14
15 Also,there is a '--compress' option, if the bandwith is the only
16 problem, otherwise you can use lzma (with normal-best ratio) to either
17 acheive much better compression than bzip2 or still slightly better
18 ratio with improved speed / less cpu time with 'lzma -1' (fast mode).
19
20 And if you're going to put a lot of files (like whole fs) into a
21 single tar just to transfer it to some remote destination, prehaps you
22 shouldn't be using rsync at all, since you'll end up reading all the
23 files anyway to create the tar.
24 Alternatively, you can save disk space on the source machine by piping
25 tar directly to destination, with compression either on the source to
26 lessen the banwidth, or on the remote to lessen the load on the source
27 machine cpu.
28
29 That said, you can also use tar to create (or pipe) incremental backups
30 - just the changes since the time last one was made. Tar can handle that
31 as easily as rsync does, since it checks what needs to be transferred
32 each time anyway.
33
34 --
35 Mike Kazantsev // fraggod.net

Attachments

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

Replies

Subject Author
Re: [gentoo-user] rsync + tar + bz2 ? Grant <emailgrant@×××××.com>