Bugs in tar?
I am using tar for backups, and I want to use the incremental option of
tar. There are two ways to do this. The first is the -G option together
with -N TIME, which will tar only those files that have changed since TIME.
The other is the -g SNAPSHOT-FILE option that will use SNAPSHOT-FILE to see
which files are new/changed. If SNAPSHOT-FILE doesn't exist, tar will
create it and backup all files.
However, this just doesn't work.
With both -G and -g tar will backup all files, instead of only the files
that have changed. I use a script, adapted from the tar documentation,
printed below.
Does anyone have an idea why this doesn't work?
Wouter...
-----
#!/bin/csh
# Incremental dump thingie
set now = `date -u`
set date = `date '+%Y-%m-%d'`
set backupfile = /tmp/backup-$date
cd /
tar -c -g /opt/dump/snapshot -vv --atime-preserve\
-f /tmp/mytapedrive.tar\
-V "Incremental Dump made on $now"\
root/testje1\
> $backupfile
gzip $backupfile
mv $backupfile.gz /opt/dump/
-----
Reply to: