Rysnc Schedule
Rick Romero
rick at havokmon.com
Thu Jul 19 13:43:19 GMT 2007
On Thu, 2007-07-19 at 09:30 -0400, Matt McCutchen wrote:
> On 7/19/07, Rick Romero <rick at havokmon.com> wrote:
> > /usr/bin/find /var/backup/* -mtime +30 -exec rm -rf {} \;
> >
> > Anything older than 30 days gets deleted from /var/backup/
>
> That's no good: it deletes individual files that happen to be older
> than 30 days from even yesterday's backup. This is better:
>
> find /var/backup -maxdepth 1 -mtime +30 -exec rm -rf {} \;
Oh of course - that's what I get for copying an existing cronjob and not
thinking it through.
> Sparty2809, are you sure you don't want to use rsnapshot? It does all
> of this for you.
I very well may use rsnapshot - I've been putting off trying to do a
rotation like that on my own, it looks like a great solution.
Rick
More information about the rsync
mailing list