rsync with aging
ms at citd.de
Thu Jan 31 01:46:31 MST 2013
On 30.01.2013 19:56, LuKreme wrote:
> On 30 Jan 2013, at 18:16 , Kevin Korb <kmk at sanitarium.net> wrote:
> > cd /server ; find . -type f -mtime +30 -print | cpio -pvdm /archive/
> I *think*
> `rysnc -aRP ...` is working for what I need.
Another solution would be a tar-pipe.
cd /server ; tar -c --null -T <(find . -type f -mtime +30 -print0) | (cd /archive ; tar xv)
This will work with any filename that a unix-system allows.
And the nice thing about a tar-pipe is that you can redirect it to
another computer just by changing the last part to:
| ssh <remote> cd /target \; tar xv
The other way around (Pull vs. Push) is possible too.
More information about the rsync