incremental backup with tar revisited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all.

A while ago I asked some questions about doing incremental backups
with tar. I have done my initial backup using the g flag, and that
went
just fine, giving me the list file, along with the 2 gb archive that I
was expecting. However, when I did the same thing the next day, the
resulting tar file was only about 765 K in size. My idea of an
incremental backup was that tar would keep the original archive, and
delete in that archive only the stuff that wasn't on the hd anymore,
and add stuff to the archive that is on the hd now, but that wasn't
there when the archive was created. Obviously, as I found out, the g
flag doesn't modify  the behavior of the c flag, like I was assuming
that it would.

What I'm trying to achieve here is to have a full tar archive. Upon
subsequent backups, I would like for tar to delete in the archive
whatever doesn't exist in the backup source directories anymore, and
for tar to add to the archive any new files that are in the source
backup directories, but that weren't in the archive before. I'd also
like for tar to update files in the archive that are still in the
backup source directories, but that have been modified since the last
backup.

Looking at the tar man page, I see the --delete flag, and the --update
flag which should do  what I want, but I'm not sure if I can use these
together.

If someone knows how to get tar to do what I'm looking for, could you
please post a sample command line for tar, which backs up dir1/ dir2/
dir3/ into backup.tar? I've been doing these backups before, but I
always had tar create a whole new archive every time, and it would of
course be better if tar could only update what has changed between the
source backup directories and the archive, rather then creating a new
archive every time. I hope that what I'm looking for makes sense, and
thanks in advance for any ideas.

Greg
 
- -- 
Free domains: http://www.eu.org/ or mail dns-manager at EU.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFBjlDD7s9z/XlyUyARAnp0AKCR7Iyzk36w0HsTPwTXO1b+tQ8rXwCgkKS9
bHW5XeUMRPz963qz0uHSx3U=
=Ee92
-----END PGP SIGNATURE-----




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux