Can I use the modified date and time as a suffix in rsync?

I am using rsync to sync folders and create backups of existing files if they have changed. Currently, all modified files are maintained in a separate directory, with the sync time being a suffix. This is done with the following command:

rsync --times --backup --backup-dir=OldVersions --suffix=`date +'.%y%m%d%H%M'` /SourceDir /DestDir

      

Now what I would like to do is use the modified date and time for each file to be copied, not the sync time. Any ideas how I could achieve this?

+3


source to share





All Articles