public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Kazantsev <mike_kazantsev@fraggod.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] rsync + tar + bz2 ?
Date: Sat, 7 Mar 2009 22:42:13 +0500	[thread overview]
Message-ID: <20090307224214.342848ba@coercion> (raw)
In-Reply-To: <49bf44f10903070804h585ffd1agdd88f75bb4c9310@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]

On Sat, 7 Mar 2009 08:04:17 -0800
Grant <emailgrant@gmail.com> wrote:

> I'm backing up numerous large files on another machine on my local
> network.  I've only been using rsync, but it occured to me that I
> might be able to save some time and space if I incorporate tar and
> bzip2.  How will rsync interact with those?  If I turn the whole
> backup into a big tar.bz2, would rsync need to redownload the whole
> thing if I change one file?  If so, maybe I should turn different
> groups of files into tar.bz2 archives so rsync only needs to
> redownload an archive if one of its files has changed?

It's not a default behavior, but there is an '--inplace' option.

Also,there is a '--compress' option, if the bandwith is the only
problem, otherwise you can use lzma (with normal-best ratio) to either
acheive much better compression than bzip2 or still slightly better
ratio with improved speed / less cpu time with 'lzma -1' (fast mode).

And if you're going to put a lot of files (like whole fs) into a
single tar just to transfer it to some remote destination, prehaps you
shouldn't be using rsync at all, since you'll end up reading all the
files anyway to create the tar.
Alternatively, you can save disk space on the source machine by piping
tar directly to destination, with compression either on the source to
lessen the banwidth, or on the remote to lessen the load on the source
machine cpu.

That said, you can also use tar to create (or pipe) incremental backups
- just the changes since the time last one was made. Tar can handle that
as easily as rsync does, since it checks what needs to be transferred
each time anyway.

-- 
Mike Kazantsev // fraggod.net

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2009-03-07 17:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 16:04 [gentoo-user] rsync + tar + bz2 ? Grant
2009-03-07 17:42 ` Mike Kazantsev [this message]
2009-03-07 18:33   ` Grant
2009-03-07 20:13 ` Dirk Heinrichs
2009-03-07 21:01   ` Dirk Heinrichs
2009-03-08 18:51     ` Alejandro
2009-03-08 21:48 ` Daniel Troeder
2009-03-09 17:03 ` Dirk Heinrichs
2009-03-09 19:14   ` Hung Dang
2009-03-09 19:33     ` Saphirus Sage
2009-03-13  4:01 ` Enrico Weigelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090307224214.342848ba@coercion \
    --to=mike_kazantsev@fraggod.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox