PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Tue Jan 18, 2011 10:39 pm
In my backup script I use on my web appliance I expected some code to delete aged backups. It does not seem to be working right.
Code: Select all
#remove older backups so as not to consume infinite space
ROTATE=90
STALE=`date --date="$ROTATE days ago"`
rm -f "$STALE.sql.gz"
rm -f "$STALE.tar.gz"
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Peter Kelly
Forum Contributor
Posts: 143 Joined: Fri Jan 14, 2011 5:33 pm
Location: England
Contact:
Post
by Peter Kelly » Wed Jan 19, 2011 3:29 am
Any errors? What is it doing?
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Wed Jan 19, 2011 8:07 pm
Nothing, I was expecting files older than 90 days to disappear.
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP