I have writted a bash script to backup folders and files from a machine to our backup server. My goal is to exclude all the files older than 6 months from this weekly backup. To do that, I used a find command to build a txt file which contains the path of these files.
find . -type f -mtime -200 -fprintf $SCRIPT_DIR/Exclusions.txt "%P\n"
And then I used the option "--include-from" of rsync.
rsync . -e ssh -qrtl --exclude-from=$SCRIPT_DIR/Exclusions.txt $USER@$DEST_SRV:$DEST_DIR
The result was the backup worked but not the inclusion. So all the files were backuped even these older than 6 months.
How can I do for this ?
Thanks in advance