Hey -
I just finished building myself a nice little auto-backup shells script using a few other threads from this forum. The resultant backup files are stored in my account directory (as opposed to ftp'ed or ssh'ed to another box).
What I'd like to do is add additional commands to the script so that it removes the backup directories who have a timestamp that's past a certain date. In a nutshell, date-based pruning. Unfortunately, I'm not a *nix person, so I have no idea where to begin (or to start looking up stuff online)
It'll essentially be a list of directories (with the backed up files inside), and I need to remove the whole directories if they are..say...1 month old.
Thanks in advance!
(ps: I have no doubts I could whip together a php script to handle this, but I'd prefer the simplicity of keeping all backup related info in a single .sh script)


LinkBack URL
About LinkBacks
. The resultant backup files are stored in my account directory (as opposed to ftp'ed or ssh'ed to another box).



Reply With Quote

Bookmarks