Answer the question
In order to leave comments, you need to log in
How to transfer files of backups of the last day to rsynch?
I have a backup script
find $source -type f -ctime +1 -printf '%P\0' | rsync --remove-source-files -Pr v --log-file=/root/rsync.log --delete -e ssh --files-from=- --from0 $source root @10.204.5.62:/$dest
Answer the question
In order to leave comments, you need to log in
well, you're passing a list of specific files to rsync. It is clear that when trying to delete, you can only delete from this list, which is not correct.
You specify what exactly you have stored in $source
For example, you can just sync everything that is "-1" a day through find | rsync
And delete old files with a separate command like:
find /my_synced_files/ -type f -ctime +1 -delete
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question