I need a little clarification in understanding why there would be a need for a benchmark file when used with a backup script. Logically thinking would tell me that the backups itself(backuptest.tgz) would have the time created and etc. So what would be the purpose of such a file:
touch .benchmark
??
The backup files may be deleted, dumped on tape and put in a fire safe, or what have you. Why keep them on the same system?
thanks for the reply. I think I confused you. This is what I am talking about
includefile=$tmpdir/include
excludefile=$tmpdir/exclude
benchmark=$logdir/.backup_benchmark
if [ $level = 0 ]; then
touch $benchmark
$TAR czXf $excludefile - `cat $includefile`
else
# -N arg must start with dot to be interpreted as a filename
$TAR czNXf ./$benchmark $excludefile - `cat $includefile`
They create a .backup_benchmark before the backup is created. Why is that?
They use the -N option, to archive files newer than the benchmark file. So next backup they take, avoids previously backed up files.
I have created a script that performs that same function but I use find and CPIO instead, so just to make sure, I dont need a benchmark file if I am using:
Full Backup Stuff
sudo find /home -depth ! -path "*/\.*" -print| grep -f includefile | grep -v -f excludefile
Incremental Stuff
sudo find /home -depth -mtime 0 ! -path "*/\.*" -print | grep -f includefile | grep -v -f excludefile
??
find isn't psychic, it won't know when you took your last backup.