Current time: 11-23-2024, 06:35 AM Hello There, Guest! (LoginRegister)


Post Reply 
Do not delete daily backups
Author Message
gilbert Offline
Junior Member
*

Posts: 45
Joined: May 2007
Reputation: 0
Post: #1
Do not delete daily backups
Hi,

Is there a way to have the daily backups not deleted?

Thanks,
Gilbert.
08-04-2009 08:29 PM
Find all posts by this user Quote this message in a reply
Knut Offline
Member
***

Posts: 736
Joined: Nov 2006
Reputation: 10
Post: #2
RE: Do not delete daily backups
Take a look at this: http://www.isp-control.net/forum/thread-6129.html
08-04-2009 08:36 PM
Find all posts by this user Quote this message in a reply
gilbert Offline
Junior Member
*

Posts: 45
Joined: May 2007
Reputation: 0
Post: #3
RE: Do not delete daily backups
My concern is to patch and then have to worry when the next version comes out.

Is there a simple modification to the backup script that would just not delete the previous ones?
08-04-2009 09:04 PM
Find all posts by this user Quote this message in a reply
gilbert Offline
Junior Member
*

Posts: 45
Joined: May 2007
Reputation: 0
Post: #4
RE: Do not delete daily backups
Hi,

Does anyone have any suggestions and advise on how to do this?

The advice on upgrades would be very helpful, I would love to add this functionality by patching as long as it doesn't create complications when I do an upgrade.

Thanks,
Gilbert.
08-10-2009 08:57 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: Do not delete daily backups
Hi Gilbert

without changing the code you don't get what you want.
But maybe just a small change in the backup script might do what you need:

have a look at
/var/www/ispcp/engine/backup/ispcp-backup-all, around line 390

Code:
if ($rs == 0) { # everything ok
      $rs = sys_command("$cmd_rm -rf $dmn_dir/$backup_filename.log");
      return $rs if ($rs != 0);
      $rs = sys_command("$cmd_rm -rf $dmn_backup_dir/$dmn_name-*.tar.*");
      return $rs if ($rs != 0);
      $rs = sys_command("$cmd_mv -f $dmn_dir/$backup_filename $dmn_backup_dir");
      return $rs if ($rs != 0);
...
(I shortened the whitespaces...)

if you comment the line where the old tar are deleted, then this might fullill your wishes :-)

just a # in front of the line.
# $rs = sys_command("$cmd_rm -rf $dmn_backup_dir/$dmn_name-*.tar.*");

of course, you have to find the line after every update of ispcp - but it's a fast correction.

/J
08-10-2009 09:25 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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