ispCP - Board - Support
[HowTo] Rsync backup&restore + remote backup - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Howtos (/forum-41.html)
+--- Thread: [HowTo] Rsync backup&restore + remote backup (/thread-5156.html)

Pages: 1 2 3 4


RE: [HowTo] Rsync backup&restore + remote backup - WuChEn - 11-25-2009 05:58 AM

OMG sorry, it´s my mistake. Smile

Greatz WuChEn


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

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


RE: [HowTo] Rsync backup&restore + remote backup - Kika - 01-03-2010 01:00 AM

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.


RE: [HowTo] Rsync backup&restore + remote backup - MasterTH - 01-03-2010 09:32 AM

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.


RE: [HowTo] Rsync backup&restore + remote backup - Boter - 02-15-2010 08:02 PM

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


RE: [HowTo] Rsync backup&restore + remote backup - uwe - 01-03-2011 08:04 PM

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)


RE: [HowTo] Rsync backup&restore + remote backup - WuChEn - 01-05-2011 10:04 PM

Any updates for 1.0.7?

Greatz WuChEn


RE: [HowTo] Rsync backup&restore + remote backup - WuChEn - 02-03-2011 10:28 PM

No One has an update vor 1.0.7? Sad

Greatz WuChEn


RE: [HowTo] Rsync backup&restore + remote backup - Dylan - 05-17-2011 04:11 PM

I made it under 1.0.7, now test it. If it work perfectly, I will write instructions.


RE: [HowTo] Rsync backup&restore + remote backup - JCircle - 08-27-2011 03:25 AM

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.