Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 13th October 2008, 03:23
_X_ _X_ is offline
Senior Member
Join Date: Oct 2008
Posts: 247
Thanks: 8
Thanked 37 Times in 35 Posts
Question Client Site BackUp for more than one day?

When autobackup is enabled ISPConfig delete all files in backup folder and creates backup for last day.


Is there a way to set how many days to keep backups or how to set ISPConfig not to delete backup files?
Reply With Quote
Sponsored Links
Old 13th October 2008, 13:53
falko falko is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts

This is currently not possible.
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Old 13th October 2008, 20:56
mccharlet mccharlet is offline
Senior Member
Join Date: Feb 2007
Posts: 262
Thanks: 65
Thanked 13 Times in 8 Posts


I have modify the backup script to redirect the backup to /backup

I have change this

HTML Code:
                // Move file in /backup directory
//                $backup_dir = $httpd_root ."/web".$web_id."/backup";
                $backup_dir = "/backup/web".$web_id;
//                $web_user = fileowner($web_pfad);
//                $web_group = filegroup($web_pfad);
                if(!@is_dir($backup_dir)) {
                } else {
                  exec("rm -rf $backup_dir/*");
/*                if(@fileowner($backup_dir) != $web_user) {
                if(@filegroup($backup_dir) != $web_group) {
I have create a perl script for moving the backup file to the same folder and rename them

HTML Code:
$repertoire = @ARGV[0];
$rep_backup= @ARGV[1];
$fichier_log= @ARGV[2];

open LOG,">".$fichier_log;
if ( @ARGV != 3 )
        print "\nSyntax: perl mv-backup.pl repertoire_sources repertoire_dest fichier_log \n\n";
        exit 1;

if (substr($repertoire,length($repertoire)-1) ne "/"){
        $repertoire = $repertoire."/";

#lecture des fichiers d'un repertoire
opendir REP,$repertoire or die "impossible d'ouvrir le repertoire";
@fichiers = readdir REP;
closedir REP;
foreach $fichier (@fichiers){
        $prefixe= $fichier."_";
        $fichier = $repertoire.$fichier;

        if (($fichier ne $repertoire."..") and ($fichier ne $repertoire.".") and (-d $fichier)){
                opendir REP,$fichier or die "impossible d'ouvrir le repertoire";
                @fichiers2 = readdir REP;
                closedir REP;

          foreach $fichier2 (@fichiers2){
                        $nom_fichier = $fichier2;
                        $fichier2 = $fichier.$fichier2;
                        if (-f $fichier2){
                                print LOG "$fichier2\n";

                                rename $fichier2,$rep_backup.$prefixe.$nom_fichier;
                                print $fichier2,$rep_backup.$prefixe.$nom_fichier."\n\r";

close LOG;
perl mv-backup.pl /backup/ /sites/ log_file_mv.txt

And with this command i delete older than four days
find /sites/ -mtime +4 -exec rm {} \;

Sorry for my english

Hosting : http://www.jheberge.ch
Reply With Quote
The Following User Says Thank You to mccharlet For This Useful Post:
_X_ (13th October 2008)
Old 22nd July 2010, 23:42
scottrill2 scottrill2 is offline
HowtoForge Supporter
Join Date: Dec 2009
Posts: 93
Thanks: 21
Thanked 2 Times in 1 Post
Default Is this still valid?

Hello folks,

I find myself making lots of mistakes while learning about webs etc. Im trying to teach myself multiple things so I have for instance a practice drupal site, practice joomla site, practice word press site etc.

I often forget to make a backup then I screw the proverbial pooch on something, and have to start waaaaay back to my last backup. (which maybe isnt a bad thing since it makes me practice over and over lol)

I have a few questions regarding this autobackup setup.

1. Is this still the best way to do autobackups, with the post being two years old? I found this one searching http://www.howtoforge.com/forums/sho...=backup+script But that one looks highly complex and also says restoring etc can have very bad results, should I pursue this route or the other one?

2. The code that is in swiss or french, can that just be plugged into google translate? I know sometimes things don't translate well because of verb conjugation etc.

3. Once translated I would save it to cgi bin? and run the command listed at the bottom?

Thanks as always,

Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a site to a client kippi General 2 25th January 2007 12:51
problems moving website, doesnt delete site from original client... lyndros Installation/Configuration 7 11th October 2006 11:27
Add Existing Site to Client? mphetameme General 3 10th September 2006 01:59
ISPConfig wont backup a site PortMan General 8 22nd July 2006 16:49
change report client / site fpl General 18 29th June 2006 14:25

All times are GMT +2. The time now is 18:30.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.