my backup script has problems

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

Post Reply
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

my backup script has problems

Post by Vegan »

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:

Re: my backup script has problems

Post by Peter Kelly »

Any errors? What is it doing?
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: my backup script has problems

Post by Vegan »

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
Post Reply