incremental tar question
freebsd-questions-local at be-well.ilk.org
Tue Jun 15 05:36:00 PDT 2004
"Reed L. O'Brien" <reed at 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.
More information about the freebsd-questions