Current time: 05-19-2024, 08:01 PM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] How can I keep my backups for x days?
Author Message
Kami Offline


Posts: 4
Joined: Jul 2009
Reputation: 0
Post: #12
RE: How can I keep my backups for x days?
Here is a working and improved version (tested on Debian Lenny).

.php  sitebackups.php (Size: 3.08 KB / Downloads: 18)

Obviously previous version threw an error and didn't delete the file on some systems, because file name is the 8th and not 9th parameter in the ls -lrt output.

I've also added an --color=never switch, because colors could cause problems with the file names on some systems.

Oh, and if you don't want your crontab log file to be filled with the script output, use this cron entry:

Quote:0 4 * * * root /var/www/ispcp/engine/backup/sitebackups.php > /dev/null

Regards
(This post was last modified: 08-02-2009 07:03 PM by Kami.)
08-01-2009 04:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How can I keep my backups for x days? - Kami - 08-01-2009 04:13 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)