Skip site navigation (1)Skip section navigation (2)
Date:      15 Jun 2004 08:35:39 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        "Reed L. O'Brien" <reed@intersiege.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: incremental tar question
Message-ID:  <44n03580dg.fsf@be-well.ilk.org>
In-Reply-To: <cakup7$83a$1@sea.gmane.org>
References:  <cakup7$83a$1@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"Reed L. O'Brien" <reed@intersiege.com> writes:

> FreeBSD 5.2.1
> 
> I am using the folowing to backup saturday
> 
> tar -jcf etc.bz2 /etc /usr/local/etc
> 
> in /bak/saturday.
> 
> I would like to do an incremental on monday (et al) in /bak/monday (et al)
> 
> tar -cf etc.bz2 /etc/ /usr/local/etc/ -g /bak/saturday/etc.bz2
> 
> Is this the correct format? I cannot get it to work. I can get it to
> leave a big enough bz2 file in /bak/monday but I can't untar
> it. though I can the initial full backup from saturday.
> 
> Do I need to copy the bz2 archive to /bak/monday?
> Do I need a different command?
> Does -g not support bzip2?

The parameter to -g is not the backup itself, but a snapshot file that
stores information about the previous tar dump.  It needs to have been
created by that previous backup.  For example, you could do something
like the following to get a daily incremental backup:

tar -cjf backup'+%Y%m%d'.tar.bz2 -g daily-snapshot-file /etc /usr/local/etc

I use this mechanism as part of a multiple-level backup system.
http://be-well.ilk.org:8088/~lowell/systuff/scripts/systemBackup



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44n03580dg.fsf>