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


Post Reply 
[HowTo] Rsync backup&restore + remote backup
Author Message
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
Post Reply 


Messages In This Thread
RE: [HowTo] Rsync backup&restore + remote backup - mad max - 12-30-2009 10:26 PM

Forum Jump:


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