From: Joe Z. <jz...@us...> - 2004-01-04 03:45:25
|
Update of /cvsroot/bobs/bobs In directory sc8-pr-cvs1:/tmp/cvs-serv14169 Modified Files: NEWS systemcheck.php Log Message: Added: Test rsync over ssh in systemcheck.php. Fixed: Was using incorrect share field in rsync test. Index: NEWS =================================================================== RCS file: /cvsroot/bobs/bobs/NEWS,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NEWS 4 May 2003 19:51:59 -0000 1.2 +++ NEWS 4 Jan 2004 03:45:22 -0000 1.3 @@ -15,3 +15,10 @@ 05-04-2003 Released version 0.6.0pre2. + + 06-22-2003 + Released version 0.6.0. + + 01-03-2004 + Jochen Metzger joins bobs as a developer. + Jochen created a patch to allow rsync over ssh as a backup method. Index: systemcheck.php =================================================================== RCS file: /cvsroot/bobs/bobs/systemcheck.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- systemcheck.php 10 May 2003 17:37:50 -0000 1.4 +++ systemcheck.php 4 Jan 2004 03:45:22 -0000 1.5 @@ -427,9 +427,8 @@ // Try to mount the selected share. $config = $srvcfg->get_config(); - $method = $config['backup_method']; - if ($method != "rsync"){ + if (($method != "rsync") && ($method != "rsync_ssh")){ $mntcmd = $srvcfg->get_mount_cmd('backup'); $t->assign ('ITEM', "Attempting to mount for backup method type \"$method\" using this command:<br> $mntcmd"); @@ -496,7 +495,8 @@ // See if rsync works if ($method == "rsync"){ - $rsync = "rsync -n " . $server . '::' . $share; + $rsync_share = $config['rsync_share']; + $rsync = "rsync -n " . $server . '::' . $rsync_share; $t->assign ('ITEM', "Using rsync to list files for backup method \"$method\" using this command:<br> $rsync"); $srvtmpl->assign ('COMMAND', "$rsync"); // the mount command @@ -514,12 +514,34 @@ } } + // Test rsync over ssh + + if ($method == "rsync_ssh"){ + $rsync_ssh_path = $config['rsync_ssh_path']; + $rsync = "rsync -n -e ssh " . $server . ':' . $rsync_ssh_path; + $t->assign ('ITEM', "Testing rsync over ssh for backup method \"$method\" using this command:<br> + $rsync"); + $srvtmpl->assign ('COMMAND', "$rsync"); // the mount command + $srvtmpl->parse ('ROW', 'cmdwoutput'); + $rtnval = submit(); // submit the mount cmd + $srvtmpl->clear_dynamic ('cmdwoutput'); + $cmdoutput = getcmdout($rtnval); // Get the command's output + if ($rtnval[0] == 0) { + $t->assign ('STATUS', 'PASS'); + putpass(); + } else { + $t->assign ('STATUS', 'FAIL'); + $t->assign ('HELP', "Rsync over ssh failed with this message:<br>$cmdoutput"); + putfail(); + } + } + // Test mounting and unmounting the 'restore' method // and reading and writing a file. sleep(5); // Allow time for last operation to finish $method = $config['restore_method']; - if ($method != "rsync"){ + if (($method != "rsync") && ($method != "rsync_ssh") && ($method != "none")){ $mntcmd = $srvcfg->get_mount_cmd('restore'); $t->assign ('ITEM', "Attempting to mount for restore method type \"$method\" using this command:<br> $mntcmd"); |