Current time: 12-23-2024, 08:39 AM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] Rsync backup&restore + remote backup
Author Message
WuChEn Offline
Junior Member
*

Posts: 192
Joined: Feb 2009
Reputation: 2
Post: #21
RE: [HowTo] Rsync backup&restore + remote backup
OMG sorry, it´s my mistake. Smile

Greatz WuChEn
11-25-2009 05:58 AM
Visit this user's website Find all posts by this user Quote this message in a reply
mad max Offline
Junior Member
*

Posts: 47
Joined: Aug 2007
Reputation: 0
Post: #22
RE: [HowTo] Rsync backup&restore + remote backup
works this version with ispCP ω 1.0.3-1 ???? I had a problem with the code in the "ispcp-dmn-mngr". When i added this:

Code:
my $zip = $main::cfg{ZIP};
  my $restore_cmd = undef;

  # Restore rsync
  if ($zip eq "rsync") {
    $rs = opendir(DIR, "$dmn_bk_dir/$dmn_name");
    if (!$rs) {
      push_el(\@main::el, 'dmn_restore_data()', "ERROR: Can't open '$dmn_bk_dir/$dmn_name' directory.");
      return -1;
    }
    my @bk_files = readdir(DIR);
    closedir(DIR);
    return 0 if (scalar(@bk_files) == 0);
    foreach(@bk_files) {
      my ($fname) = ($_);
      if ($fname ne "." && $fname ne "..") {
        if ( -d "$dmn_bk_dir/$dmn_name/$fname" ) {.
          $restore_cmd = "rsync -azv --delete-excluded $dmn_bk_dir/$dmn_name/$fname/ $dmn_dir/$fname/";
          $rs = sys_command($restore_cmd);
        } else {
          $restore_cmd = "rsync -azv --delete-excluded $dmn_bk_dir/$dmn_name/$fname $dmn_dir/$fname";
          $rs = sys_command($restore_cmd);
        }
      }
    }
  }


..and i added a new Domain the Domain status becoms no ready. Whats wrong with this Code?? can anybody help me?

Sorry for my bad Englisch :-)

greets
Mad Max
(This post was last modified: 12-30-2009 10:29 PM by mad max.)
12-30-2009 10:26 PM
Find all posts by this user Quote this message in a reply
Kika Offline
Member
***

Posts: 293
Joined: Feb 2007
Reputation: 8
Post: #23
RE: [HowTo] Rsync backup&restore + remote backup
I now upgrading to the 1.0.3-1, i will check this as soon as possible.
I found an error:

wrong:
Code:
if ( -d "$dmn_bk_dir/$dmn_name/$fname" ) {.

good:
Code:
if ( -d "$dmn_bk_dir/$dmn_name/$fname" ) {

Sorry, that was a space, but the mcedit show the spaces with ".", and i copied that too. I updated the howto.

I checked this and i could add/delete domains now.
(This post was last modified: 01-03-2010 01:49 AM by Kika.)
01-03-2010 01:00 AM
Find all posts by this user Quote this message in a reply
MasterTH Offline
Member
***

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #24
RE: [HowTo] Rsync backup&restore + remote backup
this should be added as improvement for the backup-process. if the backup-type of each domain could be edited by the admin or reseller this would be a really cool function.

i hope u understand what i mean. The admin is able to enable the backup of each domain to another destination.
01-03-2010 09:32 AM
Find all posts by this user Quote this message in a reply
Boter Offline
Junior Member
*

Posts: 42
Joined: Jan 2010
Reputation: 0
Post: #25
RE: [HowTo] Rsync backup&restore + remote backup
It would be maybe a good solution for remote backup to use ftp, not ssh. not all backup machines are linux/unix, but will test this. looks perfect Smile
(This post was last modified: 02-15-2010 08:02 PM by Boter.)
02-15-2010 08:02 PM
Find all posts by this user Quote this message in a reply
uwe Offline
Junior Member
*

Posts: 68
Joined: Feb 2008
Reputation: 0
Post: #26
RE: [HowTo] Rsync backup&restore + remote backup
rsync has a brilliant option, --link-dest, this allows using less space by hard linking to unchanged files from previous backups! this saves both disk space and bandwidth when backing up to remote site ( maybe just if backup initiated from remote site, not sure)
01-03-2011 08:04 PM
Find all posts by this user Quote this message in a reply
WuChEn Offline
Junior Member
*

Posts: 192
Joined: Feb 2009
Reputation: 2
Post: #27
RE: [HowTo] Rsync backup&restore + remote backup
Any updates for 1.0.7?

Greatz WuChEn
01-05-2011 10:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
WuChEn Offline
Junior Member
*

Posts: 192
Joined: Feb 2009
Reputation: 2
Post: #28
RE: [HowTo] Rsync backup&restore + remote backup
No One has an update vor 1.0.7? Sad

Greatz WuChEn
02-03-2011 10:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Dylan Offline
Junior Member
*

Posts: 100
Joined: Mar 2010
Reputation: 1
Post: #29
RE: [HowTo] Rsync backup&restore + remote backup
I made it under 1.0.7, now test it. If it work perfectly, I will write instructions.
05-17-2011 04:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
JCircle Offline
Junior Member
*

Posts: 32
Joined: May 2011
Reputation: 0
Post: #30
RE: [HowTo] Rsync backup&restore + remote backup
I wanted to take the time and thank you for a great write up.

This change took my backup times from 2 hrs @ 40% CPU
down to 4 min. @ 20% CPU durring.
I don't know why this backup method is not in the core!!!


also happy to say this works on the 1.1.0 beta
line numbers in the files are just a bit off but works.
(This post was last modified: 08-27-2011 03:26 AM by JCircle.)
08-27-2011 03:25 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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