Quote:
Originally posted by eaglegst
Well, that works fine if you have a small-sized directory to backup, but if the full backup is something like a few GB files, and only a few MB get changed since then, I do not really want to tar the whole thing again. The more you need to backup, the worse this approach works.
That heavy weigh backup is not really my case though. I am just thinking how I can do it, given an extreme situation.
|
Tar can't do incremental backups as far as I know.
There is the '--compare option' to see if files in the tar are different from the file system.
You could see what's different , e.g., new files on the system, yank out and delete the old files in the tar and then add the new ones.
It ain't as straight forward as you're hoping it would be. 8-]
Take a look at the [URL=http://rsync.samba.org]rsync.samba.org[/URL rsync] command.
After you set up an initial backup directory using rsync, any time you use it again, it only copies files that have changed. rsync plus the tar --compare option would be a good place to start.
Skip the man page and read the info file for tar. It has a tutorial walk-through that may benefit you.
vls
Updating my original statements.
You can get incremental behavior from tar, just not the way you want it to or think how it works.
If what you want to do is replace a file in a tar archive with a newer versioin, that just ain't happening. Not directly. You would need to do the compare delete , append route.
With the --listed-incremental option,
you can create a
new archive containing only the new versions of
of files in the archive that have changed on the file system.
Of course I could be absolutely wrong, but I don't think I am. (not trying to be funny)