Re: Problem with updating an archive (Option -u )

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

 



On 14:40 30 Dec 2003, Ingo Lantschner <ingo.lists@xxxxxx> wrote:
| I try to backup the homedirectory of several users into a file home.tar 
| using 
| 
| $ tar -uvf /some/path/home.tar ~
| 
| Each time I do the backup, ALL of the files are appended to the tar-file 
| instead of just the ones which have changed. I have no explanation for 
| this behavior.

RTFM. The info file for tar says:

    `--update' `-u' Adds files to the end of the archive, but only if they
    are newer than their counterparts already in the archive, or if they do
    not already exist in the archive. see "update".

This about this for a moment: tar is made to work on tapes, and you
can't arbitrarily insert/delete data on a tape. In fact you can't do
that with UNIX files either (you can overwrite stuff, but not remove
things in the middle or insert things i.e. change the lengths of stuff
in the middle of a file). And this is why the above mechanism is used.

The only way to do what you probably imagined would happen is to construct
a whole new archive. Now consider the expense involved in that for a large
archive needing only a small update (which is the typical screnario for
the "-u" option).

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Who are all you people and why are you in my computer?  - Kibo


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux