From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] Fixes for 'backup.pl' (Bug #11816) Date: Tue, 14 Aug 2018 21:34:38 +0200 Message-ID: <20180814193438.1961-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7387522242845884895==" List-Id: --===============7387522242845884895== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, Fixes #11816 (https://bugzilla.ipfire.org/show_bug.cgi?id=3D11816 and https://bugzilla.ipfire.org/attachment.cgi?id=3D608): "[root(a)ipfire ~]# backupctrl exclude ... tar: The following options were used after any non-optional arguments in archive create or update mode. These options are positional and affect only arguments that follow them. Please, rearrange them properly. tar: --exclude-from '/var/ipfire/backup/exclude.user' has no effect tar: Exiting with failure status due to previous errors" Please test - I got no errors anymore. Best, Matthias Signed-off-by: Matthias Fischer --- config/backup/backup.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index d430f3467..ce16e7f42 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -46,7 +46,7 @@ if (($ARGV[0] eq 'include') || ($ARGV[0] eq 'iso')) { print DATEI @include; print "/var/log/messages"; close(DATEI); - system("tar -cvzf /var/ipfire/backup/$Jahr$Monat$Monatstag-$Stunden$Minute= n.ipf --files-from=3D'/tmp/include' --exclude-from=3D'/var/ipfire/backup/excl= ude' --files-from=3D'/var/ipfire/backup/include.user' --exclude-from=3D'/var/= ipfire/backup/exclude.user'"); + system("tar -cvzf /var/ipfire/backup/$Jahr$Monat$Monatstag-$Stunden$Minute= n.ipf --exclude-from=3D'/var/ipfire/backup/exclude' --exclude-from=3D'/var/ip= fire/backup/exclude.user' --files-from=3D'/tmp/include' --files-from=3D'/var/= ipfire/backup/include.user'"); system("rm /tmp/include"); if ($ARGV[0] eq 'iso') { system("/usr/local/bin/backupiso $Jahr$Monat$Monatstag-$Stunden$Minuten &= "); @@ -57,7 +57,7 @@ elsif ($ARGV[0] eq 'exclude') { open(DATEI, ">/tmp/include") || die "Could not save temp include file"; print DATEI @include; close(DATEI); - system("tar -cvzf /var/ipfire/backup/$Jahr$Monat$Monatstag-$Stunden$Minute= n.ipf --files-from=3D'/tmp/include' --exclude-from=3D'/var/ipfire/backup/excl= ude' --files-from=3D'/var/ipfire/backup/include.user' --exclude-from=3D'/var/= ipfire/backup/exclude.user'"); + system("tar -cvzf /var/ipfire/backup/$Jahr$Monat$Monatstag-$Stunden$Minute= n.ipf --exclude-from=3D'/var/ipfire/backup/exclude' --exclude-from=3D'/var/ip= fire/backup/exclude.user' --files-from=3D'/tmp/include' --files-from=3D'/var/= ipfire/backup/include.user'"); system("rm /tmp/include"); } elsif ($ARGV[0] eq 'restore') { @@ -158,7 +158,7 @@ sub createinclude(){ open(DATEI, "<${General::swroot}/backup/include") || die "Can not open inc= lude file"; my @Zeilen =3D ; close(DATEI); - =20 + foreach (@Zeilen){ chomp($_); my @files =3D `find $_ -maxdepth 0 2>/dev/null`; --=20 2.18.0 --===============7387522242845884895==--