forked from pool/storeBackup
- Update to 3.5.2
storeBackup.pl
- option --maxHardLinks was not configurable in the
configuration file
- pipe buffering was changed to new needs since
about kernel 5.13 (relevant only if you backup devices)
storeBackupRecover.pl
- restoring of devices (eg. sda) didn't work because of
bug in option checkDevicesDir0 in storeBackup.pl when
using more than one directory level like "Devs/Sticks"
storeBackupUpdateBackup.pl
- added log file entry about number of WARNINGs and
ERRORs happend (like at storeBackup.pl)
- update to 3.5.1
storeBackup.pl
- linkToRecent didn't work when used for the very first time
in a series
- added option suppressInfo with key readCheckSums
- changed the order of execution:
write backup -> sync -> write 'finished' -> write linkToRecent
-> delete old backups -> start postcommand
storeBackupMergeIsolatedBackup.pl
- added option --move
storeBackupSearch.pl
- option 'backupDir' didn't work (normally not needed)
lib/fileDir.pl
- more detailed error messages when copying of a file does
not succeed
lib/checkParam2.pl
- overwriting settings from config file via commandline didn't
OBS-URL: https://build.opensuse.org/request/show/1150475
OBS-URL: https://build.opensuse.org/package/show/Archiving:Backup/storeBackup?expand=0&rev=15
109 lines
2.9 KiB
Diff
109 lines
2.9 KiB
Diff
Index: bin/storeBackup.pl
|
|
===================================================================
|
|
--- bin/storeBackup.pl.orig
|
|
+++ bin/storeBackup.pl
|
|
@@ -2805,6 +2805,8 @@ if ($@)
|
|
unless exists $suppressWarning{'use_DB_File'};
|
|
}
|
|
|
|
+
|
|
+
|
|
# OS-Typ feststellen, um ARG_MAX zu setzen
|
|
# Default wird vorsichtshalber auf 4 KB gesetzt!
|
|
{
|
|
@@ -2856,6 +2858,48 @@ $prLog->print('-kind' => 'I',
|
|
'-str' => ["preserve Perms is not set"])
|
|
if $preservePerms eq 'no';
|
|
|
|
+
|
|
+#
|
|
+# precommand ausführen
|
|
+#
|
|
+if (defined $precommand)
|
|
+{
|
|
+ $prLog->print('-kind' => 'I',
|
|
+ '-str' => ["starting pre command <@$precommand> ..."]);
|
|
+ my ($preComm, @preParam) = (@$precommand);
|
|
+ my $preco = forkProc->new('-exec' => $preComm,
|
|
+ '-param' => \@preParam,
|
|
+ '-workingDir' => '.',
|
|
+ '-outRandom' => "$tmpdir/precomm-",
|
|
+ '-prLog' => $prLog);
|
|
+ $preco->wait();
|
|
+ my $out = $preco->getSTDOUT();
|
|
+ $prLog->print('-kind' => 'W',
|
|
+ '-str' => ["STDOUT of <@$precommand>:", @$out])
|
|
+ if (@$out > 0);
|
|
+ $out = $preco->getSTDERR();
|
|
+ $prLog->print('-kind' => 'E',
|
|
+ '-str' => ["STDERR of <@$precommand>:", @$out])
|
|
+ if (@$out > 0);
|
|
+
|
|
+ my $status = $preco->get('-what' => 'status');
|
|
+ if ($status == 0)
|
|
+ {
|
|
+ $prLog->print('-kind' => 'I',
|
|
+ '-str' =>
|
|
+ ["pre command <@$precommand> finished with status 0"]);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ $prLog->print('-kind' => 'E',
|
|
+ '-str' => ["pre command <@$precommand> finished with " .
|
|
+ "status $status, exiting"]);
|
|
+ unlink $lockFile if $lockFile;
|
|
+ exit 1;
|
|
+ }
|
|
+}
|
|
+
|
|
+
|
|
#
|
|
# initialise include, exclude and checkBlocks rules
|
|
#
|
|
@@ -3385,45 +3429,7 @@ $ENV{'STBU_logFile'} = $logFile;
|
|
$ENV{'STBU_logInBackupDir'} = $logInBackupDir;
|
|
$ENV{'logInBackupDirFileName'} = $logInBackupDirFileName;
|
|
|
|
-#
|
|
-# precommand ausführen
|
|
-#
|
|
-if (defined $precommand)
|
|
-{
|
|
- $prLog->print('-kind' => 'I',
|
|
- '-str' => ["starting pre command <@$precommand> ..."]);
|
|
- my ($preComm, @preParam) = (@$precommand);
|
|
- my $preco = forkProc->new('-exec' => $preComm,
|
|
- '-param' => \@preParam,
|
|
- '-workingDir' => '.',
|
|
- '-outRandom' => "$tmpdir/precomm-",
|
|
- '-prLog' => $prLog);
|
|
- $preco->wait();
|
|
- my $out = $preco->getSTDOUT();
|
|
- $prLog->print('-kind' => 'W',
|
|
- '-str' => ["STDOUT of <@$precommand>:", @$out])
|
|
- if (@$out > 0);
|
|
- $out = $preco->getSTDERR();
|
|
- $prLog->print('-kind' => 'E',
|
|
- '-str' => ["STDERR of <@$precommand>:", @$out])
|
|
- if (@$out > 0);
|
|
|
|
- my $status = $preco->get('-what' => 'status');
|
|
- if ($status == 0)
|
|
- {
|
|
- $prLog->print('-kind' => 'I',
|
|
- '-str' =>
|
|
- ["pre command <@$precommand> finished with status 0"]);
|
|
- }
|
|
- else
|
|
- {
|
|
- $prLog->print('-kind' => 'E',
|
|
- '-str' => ["pre command <@$precommand> finished with " .
|
|
- "status $status, exiting"]);
|
|
- unlink $lockFile if $lockFile;
|
|
- exit 1;
|
|
- }
|
|
-}
|
|
|
|
|
|
#
|