From owner-freebsd-questions@FreeBSD.ORG Tue Jun 15 12:36:00 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7225416A4CE for ; Tue, 15 Jun 2004 12:36:00 +0000 (GMT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3663643D5E for ; Tue, 15 Jun 2004 12:36:00 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.no-ip.com ([66.30.196.44]) by comcast.net (sccrmhc11) with ESMTP id <2004061512354001100fiuhoe>; Tue, 15 Jun 2004 12:35:40 +0000 Received: by be-well.no-ip.com (Postfix, from userid 1147) id F34A374; Tue, 15 Jun 2004 08:35:39 -0400 (EDT) Sender: lowell@be-well.ilk.org To: "Reed L. O'Brien" References: From: Lowell Gilbert Date: 15 Jun 2004 08:35:39 -0400 In-Reply-To: Message-ID: <44n03580dg.fsf@be-well.ilk.org> Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: incremental tar question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 12:36:00 -0000 "Reed L. O'Brien" 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