Hi, I try to rsync files only X days old. This is my setup. The backup server needs to store all servers' backup and only has space for 7 days backup. But each individual server has backup for 21 days. On the backup server, i remove files older than 7 days. When backup server pulls files, I want rsync only pull files with mtime last 7 days. Searching through the archive, someone suggested using (cd src && find . -atime +6 -print) | rsync --files-from=- src/ dest/ This works on the source server, but not on the dest server. Anyone knows how to get the job done on the backup server? Thanks,
On 1/30/07, Richard Z <rzheng@gmail.com> wrote:> I try to rsync files only X days old. > > This is my setup. The backup server needs to store all servers' backup > and only has space for 7 days backup. But each individual server has > backup for 21 days. On the backup server, i remove files older than 7 > days. When backup server pulls files, I want rsync only pull files > with mtime last 7 days.I'm not clear on exactly why you would want to pull these files, but I'll show you how...> (cd src && find . -atime +6 -print) | rsync --files-from=- src/ dest/ > > This works on the source server, but not on the dest server. > > Anyone knows how to get the job done on the backup server?Try this: rsync --rsync-path='rsync --files-from=<(cd src && find . -atime +6 -print)' \ remote:src/ dest/ (Do you want -mtime, perhaps, instead of -atime?) Matt
Possibly Parallel Threads
- rsync files with certain mtime
- problem cloning storage pool volume
- mtime, atime, ctime
- rsync: always modify atime of all destination files
- [Bug 13735] New: Synchronize files when the sending side has newer change times while modification times and sizes are identical on both sides