[slbackup-commit] CVS update: slbackup/src slbackup-cron
werner at alioth.debian.org
werner at alioth.debian.org
Fri Feb 3 23:19:54 UTC 2006
User: werner
Date: 06/02/03 23:19:54
Modified: src slbackup-cron
Log:
last updates before release .. some testing is always good :)
Revision Changes Path
1.17 +24 -3 slbackup/src/slbackup-cron
Index: slbackup-cron
===================================================================
RCS file: /cvsroot/slbackup/slbackup/src/slbackup-cron,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- slbackup-cron 2 Feb 2006 22:59:32 -0000 1.16
+++ slbackup-cron 3 Feb 2006 23:19:53 -0000 1.17
@@ -85,11 +85,14 @@
logger ("Successfully running scripts in $scripts_predir.");
} elsif ( $retval_predir eq -1 ) {
logger ("Failed reading $scripts_predir.");
+ $errorclient += 1;
} elsif ( $retval_predir eq -2 ) {
logger ("Failed to run one or more scripts in $scripts_predir.");
+ $errorclient += 1;
} else {
logger ("Something strange happened when running scripts in\n" . \
"$scripts_predir");
+ $errorclient += 1;
}
# run rdiff-backup for each client in configuration
@@ -109,6 +112,7 @@
logger ("Address for server is not present in configuration " .
"file... please fix!");
logger("Failed backing up clients.");
+ $errorclient += 1;
last;
}
@@ -124,6 +128,7 @@
logger ("Couldn't resolve host " .
"\'$config->{server_address}\' ");
logger ("Failed backing up clients.");
+ $errorclient += 1;
last;
}
}
@@ -133,6 +138,7 @@
logger ("Username for server is not present in configuration " .
"file... please fix!");
logger("Failed backing up clients.");
+ $errorclient += 1;
last;
}
@@ -143,6 +149,7 @@
if (`$sshteststr` ne "1") {
logger ("ssh-connection to server $key failed...");
logger ("Failed backing up clients.");
+ $errorclient += 1;
last;
}
@@ -153,6 +160,7 @@
logger ("rdiff-backup does not have the same version on " .
"this computer and the backup server... please fix!");
logger ("Failed backing up clients.");
+ $errorclient += 1;
last;
}
@@ -165,6 +173,7 @@
logger ("Destination directory (server_destdir) does not seem \n" .
"to exist on the backup server... please fix!");
logger ("Failed backing up clients.");
+ $errorclient += 1;
last;
}
@@ -179,6 +188,7 @@
logger ("Destination directory (server_destdir) does not seem \n" .
"to exist on the backup server... please fix!");
logger ("Failed backing up clients.");
+ $errorclient += 1;
last;
}
}
@@ -189,6 +199,7 @@
logger ("Destination directory on the server is not specified " .
"in the configuration... please fix!");
logger ("Failed backing up clients.");
+ $errorclient += 1;
last;
}
$execstr_serverpart .= "$config->{server_destdir}/$key";
@@ -209,6 +220,7 @@
logger ("Address for client $key is not present in " .
"configuration... please fix!");
logger ("Backup of client $key failed.");
+ $errorclient += 1;
next;
}
@@ -226,6 +238,7 @@
logger ("Couldn't resolve host " .
"\'$config->{client}->{$key}->{address}\' ");
logger ("Backup of client $key failed.");
+ $errorclient += 1;
next;
}
}
@@ -235,6 +248,7 @@
logger ("Username for client $key is not present in " .
"configuration... please fix!");
logger ("Backup of client $key failed");
+ $errorclient += 1;
next;
}
@@ -245,6 +259,7 @@
if (`$sshteststr` ne "1") {
logger ("ssh-connection to $key failed...");
logger ("Failed backing up client $key.");
+ $errorclient += 1;
next;
}
@@ -255,6 +270,7 @@
logger ("rdiff-backup does not have the same version on this " .
"computer and the client $key... please fix!");
logger ("Failed backing up client $key.");
+ $errorclient += 1;
next;
}
@@ -302,6 +318,7 @@
logger ("Locations for client $key is not present in " .
"configuration... please fix!");
logger ("No files from client $key will be backed up.");
+ $errorclient += 1;
next;
} elsif (ref ($config->{client}->{$key}->{location}) eq "ARRAY") {
# there are more than one location => location is an array
@@ -355,6 +372,7 @@
logger ("Removing backups older than $client_keep days succeeded!");
} else {
logger ("Failed removing backups older than $client_keep.");
+ $errorclient += 1;
}
}
@@ -380,11 +398,14 @@
logger ("Successfully running of scripts in $scripts_postdir.");
} elsif ( $retval_postdir eq -1 ) {
logger ("Failed reading $scripts_postdir.");
+ $errorclient += 1;
} elsif ( $retval_postdir eq -2 ) {
logger ("Failed to run one or more scripts in $scripts_postdir.");
+ $errorclient += 1;
} else {
logger ("Something strange happened when running scripts in\n" . \
"$scripts_postdir");
+ $errorclient += 1;
}
logger ("Finished slbackup.");
@@ -399,8 +420,8 @@
if ( $errorclients gt 0 ) {
# exit 1 if any of the client's failed
- print STDERR "Error: backup failed for one or more of your clients.";
- print STDERR " Please take a look at $logfile for details.";
+ print STDERR "Error: backup failed for one or more of your clients.\n";
+ print STDERR " Please take a look at $logfile for details.\n";
exit 1;
}
More information about the slbackup-commit
mailing list