rsync with aging

LuKreme kremels at kreme.com
Tue Jan 29 16:59:00 MST 2013


I have two folders, let's call them Server and Archive.

What I want to do is send all the files from server that are older than… say 30 days to archive and delete them from server. OK, no problem. However, I also want to delete any files from Server that already exist on Archive.

So let's say on 28-01-2013 I have

Server:
23-10-2011
31-12-2012
14-12-2012
17-01-2013

Archive:
23-10-2011
17-01-2013

. . . run rsync command here . . .

Files left on Server:
31-12-2012 # less than 30 days old

Files on Archive:
23-10-2011 # was already there
14-12-2012 # more than 30 days old
17-01-2013 # was already there


-- 
MEGAHAL: within my penguin lies a torrid story of hate and love.



More information about the rsync mailing list