Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2001 01:33:43 -0600 (MDT)
From:      FreeBSD <freebsd@XtremeDev.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   Merging two tar.gz archives?
Message-ID:  <20010813012249.S49416-100000@Amber.XtremeDev.com>

next in thread | raw e-mail | index | archive | help
I'm trying to write a simple home-brewed backup script using tar with the
incremental switch. So far it creates a full then an incremental tar.gz,
but before I place it onto my space-limited removable media (a jaz disk),
I'd like to merge the two tar.gz archives together. Updating the files in
the full backup with the newer files in the incremental archive. Looking
through the tar man page, I've come to three separate conclusions:

1. I would need to extract the contents of the full, then the contents of
the incremental over the extracted full. Then create a new archive of the
updated files before placing it on to my jaz disk. This is both time
consuming and space wasteful. There has got to be a better way.

2. Or. I use the --list option on the incremental, pipe it to a temp file,
use the --delete arg to remove those listed files from the full archive,
then extract the incremental archive and append it with --append to the
full archive. Not as elegant as I hoped.. But much better than option #1?

3. Consult the mailing list for experienced help and hoping that someone
can point out a much better option than either of the two above.

Simply put, my goal is to merge the incremental archive into the full
archive. Is option #2 my only/best/lesser-of-the-two-evils solution?

Thanks in advance for any assistance/hint/advice.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010813012249.S49416-100000>