LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync: only backup recently modified files (https://www.linuxquestions.org/questions/linux-software-2/rsync-only-backup-recently-modified-files-360046/)

hamish 09-04-2005 06:31 AM

rsync: only backup recently modified files
 
hello

I run rsync on Windows machines in order to back them up to backup servers.

My questions is:

is there a way that I can tell rsync only to backup files which have been modified on the Windows machine within, say, the last month?

For that matter, how could I do this in if I were rsync-ing from Linux?

Thanks
Hamish

homey 09-04-2005 11:08 PM

Find allows you to do things based on age. For example:
#Delete files that haven't been modified for 90 days with the following command
find /mnt/backup -type f \( -name '*.gz' -o -name '*.log' \) \
-mtime +90 -exec rm {} \;

rsync already does move changed files, that saves it from having to do every file.

More options with man find

hamish 09-05-2005 02:51 PM

hey

yeah I have now got it working with a find > list_of_files and then using list_of_files as the include list for rsync

Cheers
Hamish

silveraxela 09-20-2011 09:55 AM

Quote:

Originally Posted by hamish (Post 1837272)
hey

yeah I have now got it working with a find > list_of_files and then using list_of_files as the include list for rsync

Cheers
Hamish

I'm looking to do the exact same thing. Can you provide me with the syntax you used to achieve this?


All times are GMT -5. The time now is 09:24 PM.