I haven't fully studied your script, but I had two things jump out at me. First on this line:
tar -zcvfT "$public_backup/public_diff_$6-$2-$3.tgz" "/tmp/backuplist_tmp.txt" > "$public_backup/public_diff_$6-$2-$3.log"
The -f and -T options each take a file argument. -f <archivename> -T <filelist>
Don't separate the options from their arguments.
The second thing is I don't see how it is an incremental backup unless that you know that all of the files with "Tue" in the listing are new.
For an incremental backup use -g <timestamp_file> or --listed-incremental <timestamp_file>.
See the tar info manual (section 5.2) for examples.
|