From 2a19fd178108b0898e79d2b8908236429ca4c6a3 Mon Sep 17 00:00:00 2001
From: cbarratt
Date: Mon, 22 Jan 2007 07:50:00 +0000
Subject: [PATCH] Changes for 2.1.3:
* Fixes to lib/BackupPC/Xfer/Tar.pm for tar 1.16: allow 1
(ie: 256) as a successful exit status and match "Total
bytes read" message for restores. First reported by
Torsten Sadowski and debugged by Ralf Gross and Holger
Parplies.
* Fix to bin/BackupPC to correctly re-queue multiple restore
requests directed at the same host.
* Added pt_br.pm language file provided by Reginaldo Ferreira.
* In conf/config.pl, changed --devices to -D in $Conf{RsyncArgs}
and $Conf{RsyncRestoreArgs} to fix "fileListReceive failed" and
"Can't open .../f%2f for empty output" errors with rsync 2.6.7+.
Fix proposed by Justin Pessa and Vincent Ho, and confirmed by
Dan Niles.
* Added patch from Michael (mna.news) to ignore "file is unchanged"
message from tar 1.15.x during incremental backups.
* Fixed creation of .rsrc directories in bin/BackupPC_tarExtract
when used with xtar on MacOS. Reported by Samuel Bancal and
Matthew Radey, who helped with debugging.
* Fixed bug in BackupPC_tarExtract for files >8GB in size whose
lengths are multiples of 256. Reported by Jamie Myers and
Marko Tukiainen, who both helped debugging the problem.
* Fixed bug in lib/BackupPC/Xfer/RsyncFileIO.pm that caused
incorrected deleted attributes to be set in directories
where one of the files had an rsync phase 1 retry during
an incremental. Reported by Tony Nelson.
---
ChangeLog | 37 +
bin/BackupPC | 6 +-
bin/BackupPC_archive | 2 +-
bin/BackupPC_archiveHost | 2 +-
bin/BackupPC_compressPool | 2 +-
bin/BackupPC_dump | 2 +-
bin/BackupPC_link | 2 +-
bin/BackupPC_nightly | 2 +-
bin/BackupPC_restore | 2 +-
bin/BackupPC_sendEmail | 2 +-
bin/BackupPC_serverMesg | 2 +-
bin/BackupPC_tarCreate | 2 +-
bin/BackupPC_tarExtract | 26 +-
bin/BackupPC_trashClean | 2 +-
bin/BackupPC_zcat | 2 +-
bin/BackupPC_zipCreate | 2 +-
cgi-bin/BackupPC_Admin | 2 +-
conf/config.pl | 4 +-
lib/BackupPC/Attrib.pm | 2 +-
lib/BackupPC/CGI/AdminOptions.pm | 2 +-
lib/BackupPC/CGI/Archive.pm | 2 +-
lib/BackupPC/CGI/ArchiveInfo.pm | 2 +-
lib/BackupPC/CGI/Browse.pm | 2 +-
lib/BackupPC/CGI/DirHistory.pm | 2 +-
lib/BackupPC/CGI/EmailSummary.pm | 2 +-
lib/BackupPC/CGI/GeneralInfo.pm | 2 +-
lib/BackupPC/CGI/HostInfo.pm | 2 +-
lib/BackupPC/CGI/LOGlist.pm | 2 +-
lib/BackupPC/CGI/Lib.pm | 2 +-
lib/BackupPC/CGI/Queue.pm | 2 +-
lib/BackupPC/CGI/ReloadServer.pm | 2 +-
lib/BackupPC/CGI/Restore.pm | 2 +-
lib/BackupPC/CGI/RestoreFile.pm | 2 +-
lib/BackupPC/CGI/RestoreInfo.pm | 2 +-
lib/BackupPC/CGI/StartServer.pm | 2 +-
lib/BackupPC/CGI/StartStopBackup.pm | 2 +-
lib/BackupPC/CGI/StopServer.pm | 2 +-
lib/BackupPC/CGI/Summary.pm | 2 +-
lib/BackupPC/CGI/View.pm | 6 +-
lib/BackupPC/FileZIO.pm | 2 +-
lib/BackupPC/Lang/pt_br.pm | 1312 +++++++++++++++++++++++++++
lib/BackupPC/Lib.pm | 4 +-
lib/BackupPC/PoolWrite.pm | 2 +-
lib/BackupPC/View.pm | 2 +-
lib/BackupPC/Xfer/Archive.pm | 2 +-
lib/BackupPC/Xfer/Rsync.pm | 2 +-
lib/BackupPC/Xfer/RsyncDigest.pm | 2 +-
lib/BackupPC/Xfer/RsyncFileIO.pm | 8 +-
lib/BackupPC/Xfer/Smb.pm | 2 +-
lib/BackupPC/Xfer/Tar.pm | 20 +-
lib/BackupPC/Zip/FileMember.pm | 2 +-
makeDist | 28 +-
makePatch | 6 +-
53 files changed, 1451 insertions(+), 90 deletions(-)
create mode 100644 lib/BackupPC/Lang/pt_br.pm
diff --git a/ChangeLog b/ChangeLog
index ad28088..e96c786 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,43 @@
# Version __VERSION__, __RELEASEDATE__
#------------------------------------------------------------------------
+* Fixes to lib/BackupPC/Xfer/Tar.pm for tar 1.16: allow 1
+ (ie: 256) as a successful exit status and match "Total
+ bytes read" message for restores. First reported by
+ Torsten Sadowski and debugged by Ralf Gross and Holger
+ Parplies.
+
+* Fix to bin/BackupPC to correctly re-queue multiple restore
+ requests directed at the same host.
+
+* Added pt_br.pm language file provided by Reginaldo Ferreira.
+
+* In conf/config.pl, changed --devices to -D in $Conf{RsyncArgs}
+ and $Conf{RsyncRestoreArgs} to fix "fileListReceive failed" and
+ "Can't open .../f%2f for empty output" errors with rsync 2.6.7+.
+ Fix proposed by Justin Pessa and Vincent Ho, and confirmed by
+ Dan Niles.
+
+* Added patch from Michael (mna.news) to ignore "file is unchanged"
+ message from tar 1.15.x during incremental backups.
+
+* Fixed creation of .rsrc directories in bin/BackupPC_tarExtract
+ when used with xtar on MacOS. Reported by Samuel Bancal and
+ Matthew Radey, who helped with debugging.
+
+* Fixed bug in BackupPC_tarExtract for files >8GB in size whose
+ lengths are multiples of 256. Reported by Jamie Myers and
+ Marko Tukiainen, who both helped debugging the problem.
+
+* Fixed bug in lib/BackupPC/Xfer/RsyncFileIO.pm that caused
+ incorrected deleted attributes to be set in directories
+ where one of the files had an rsync phase 1 retry during
+ an incremental. Reported by Tony Nelson.
+
+#------------------------------------------------------------------------
+# Version 2.1.2, 5 Sep 2005
+#------------------------------------------------------------------------
+
* Fixed simple but serious bug in bin/BackupPC_tarCreate that prevented
hardlinks being saved correctly. Debugged by Michael (mna.news)
with several other people.
diff --git a/bin/BackupPC b/bin/BackupPC
index cd69f03..b031e65 100755
--- a/bin/BackupPC
+++ b/bin/BackupPC
@@ -47,7 +47,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -559,9 +559,11 @@ sub Main_TryToRun_CmdQueue
sub Main_TryToRun_Bg_or_User_Queue
{
my($req, $host);
+ my(@deferUserQueue, @deferBgQueue);
+
while ( $RunNightlyWhenIdle == 0 ) {
local(*FH);
- my(@args, @deferUserQueue, @deferBgQueue, $progName, $type);
+ my(@args, $progName, $type);
my $nJobs = keys(%Jobs);
#
# CmdJob and trashClean don't count towards MaxBackups / MaxUserBackups
diff --git a/bin/BackupPC_archive b/bin/BackupPC_archive
index 2fedf68..a750041 100644
--- a/bin/BackupPC_archive
+++ b/bin/BackupPC_archive
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_archiveHost b/bin/BackupPC_archiveHost
index c499e44..8fde146 100755
--- a/bin/BackupPC_archiveHost
+++ b/bin/BackupPC_archiveHost
@@ -38,7 +38,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_compressPool b/bin/BackupPC_compressPool
index a8caa4f..acf3604 100755
--- a/bin/BackupPC_compressPool
+++ b/bin/BackupPC_compressPool
@@ -49,7 +49,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump
index 592fb59..1e1521b 100755
--- a/bin/BackupPC_dump
+++ b/bin/BackupPC_dump
@@ -70,7 +70,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_link b/bin/BackupPC_link
index 20fc627..658e4dd 100755
--- a/bin/BackupPC_link
+++ b/bin/BackupPC_link
@@ -39,7 +39,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_nightly b/bin/BackupPC_nightly
index f7df54c..88df06c 100755
--- a/bin/BackupPC_nightly
+++ b/bin/BackupPC_nightly
@@ -52,7 +52,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_restore b/bin/BackupPC_restore
index 565563f..5f7d03c 100755
--- a/bin/BackupPC_restore
+++ b/bin/BackupPC_restore
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_sendEmail b/bin/BackupPC_sendEmail
index 9a4ab7c..2e81ed4 100755
--- a/bin/BackupPC_sendEmail
+++ b/bin/BackupPC_sendEmail
@@ -31,7 +31,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_serverMesg b/bin/BackupPC_serverMesg
index a83ce30..c518ffc 100755
--- a/bin/BackupPC_serverMesg
+++ b/bin/BackupPC_serverMesg
@@ -43,7 +43,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate
index 34f61fa..8c9b620 100755
--- a/bin/BackupPC_tarCreate
+++ b/bin/BackupPC_tarCreate
@@ -51,7 +51,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_tarExtract b/bin/BackupPC_tarExtract
index eb33006..c442f9e 100755
--- a/bin/BackupPC_tarExtract
+++ b/bin/BackupPC_tarExtract
@@ -27,7 +27,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -58,7 +58,7 @@ if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) {
exit(1);
}
my $client = $1;
-if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
+if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
print("$0: bad share name '$ARGV[1]'\n");
exit(1);
}
@@ -101,7 +101,7 @@ $SIG{TTIN} = \&catch_signal;
# Copyright 1998 Stephen Zander. All rights reserved.
#
my $tar_unpack_header
- = 'Z100 A8 A8 A8 A12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
+ = 'Z100 A8 A8 A8 a12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
my $tar_header_length = 512;
my $BufSize = 1048576; # 1MB or 2^20
@@ -251,7 +251,7 @@ sub TarReadFileInfo
$name = $longName if ( defined($longName) );
$linkname = $longLink if ( defined($longLink) );
$name =~ s{^\./+}{};
- $name =~ s{/+$}{};
+ $name =~ s{/+\.?$}{};
$name =~ s{//+}{/}g;
return {
name => $name,
@@ -313,7 +313,7 @@ sub TarReadFile
#
my($nRead);
#print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n");
- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
my $poolWrite = BackupPC::PoolWrite->new($bpc,
"$OutDir/$ShareName/$f->{mangleName}",
$f->{size}, $Compress);
@@ -351,7 +351,7 @@ sub TarReadFile
# a plain file.
#
$f->{size} = length($f->{linkname});
- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
my $poolWrite = BackupPC::PoolWrite->new($bpc,
"$OutDir/$ShareName/$f->{mangleName}",
$f->{size}, $Compress);
@@ -369,7 +369,7 @@ sub TarReadFile
# contents.
#
$f->{size} = length($f->{linkname});
- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
my $poolWrite = BackupPC::PoolWrite->new($bpc,
"$OutDir/$ShareName/$f->{mangleName}",
$f->{size}, $Compress);
@@ -393,7 +393,7 @@ sub TarReadFile
} else {
$data = "$f->{devmajor},$f->{devminor}";
}
- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
+ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
my $poolWrite = BackupPC::PoolWrite->new($bpc,
"$OutDir/$ShareName/$f->{mangleName}",
length($data), $Compress);
@@ -487,17 +487,21 @@ sub logFileAction
#
sub pathCreate
{
- my($dir, $fullPath, $file, $f) = @_;
+ my($dir, $fullPath, $f) = @_;
#
# Get parent directory of each of $dir and $fullPath
#
- $dir =~ s{/[^/]*$}{};
+ # print("pathCreate: dir = $dir, fullPath = $fullPath\n");
+ $dir =~ s{/([^/]*)$}{};
+ my $file = $bpc->fileNameUnmangle($1);
$fullPath =~ s{/[^/]*$}{};
- return if ( -d $fullPath );
+ return if ( -d $fullPath || $file eq "" );
+ unlink($fullPath) if ( -e $fullPath );
mkpath($fullPath, 0, 0777);
$Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress })
if ( !defined($Attrib{$dir}) );
+ # print("pathCreate: adding file = $file to dir = $dir\n");
$Attrib{$dir}->set($file, {
type => BPC_FTYPE_DIR,
mode => 0755,
diff --git a/bin/BackupPC_trashClean b/bin/BackupPC_trashClean
index 2380fb6..085a4c3 100755
--- a/bin/BackupPC_trashClean
+++ b/bin/BackupPC_trashClean
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_zcat b/bin/BackupPC_zcat
index 141e2a6..943379c 100755
--- a/bin/BackupPC_zcat
+++ b/bin/BackupPC_zcat
@@ -32,7 +32,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/bin/BackupPC_zipCreate b/bin/BackupPC_zipCreate
index 88a5742..fb89310 100755
--- a/bin/BackupPC_zipCreate
+++ b/bin/BackupPC_zipCreate
@@ -51,7 +51,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/cgi-bin/BackupPC_Admin b/cgi-bin/BackupPC_Admin
index e1df31e..8dbcadf 100755
--- a/cgi-bin/BackupPC_Admin
+++ b/cgi-bin/BackupPC_Admin
@@ -39,7 +39,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/conf/config.pl b/conf/config.pl
index aafaa8c..c4e33a5 100644
--- a/conf/config.pl
+++ b/conf/config.pl
@@ -1052,7 +1052,7 @@ $Conf{RsyncArgs} = [
'--perms',
'--owner',
'--group',
- '--devices',
+ '-D',
'--links',
'--times',
'--block-size=2048',
@@ -1086,7 +1086,7 @@ $Conf{RsyncRestoreArgs} = [
'--perms',
'--owner',
'--group',
- '--devices',
+ '-D',
'--links',
'--times',
'--block-size=2048',
diff --git a/lib/BackupPC/Attrib.pm b/lib/BackupPC/Attrib.pm
index a5bbd6f..7002677 100644
--- a/lib/BackupPC/Attrib.pm
+++ b/lib/BackupPC/Attrib.pm
@@ -30,7 +30,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/AdminOptions.pm b/lib/BackupPC/CGI/AdminOptions.pm
index 756d0e5..163ef3c 100644
--- a/lib/BackupPC/CGI/AdminOptions.pm
+++ b/lib/BackupPC/CGI/AdminOptions.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Archive.pm b/lib/BackupPC/CGI/Archive.pm
index 0ecd751..da1cf35 100644
--- a/lib/BackupPC/CGI/Archive.pm
+++ b/lib/BackupPC/CGI/Archive.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/ArchiveInfo.pm b/lib/BackupPC/CGI/ArchiveInfo.pm
index 6db9153..98d2a0a 100644
--- a/lib/BackupPC/CGI/ArchiveInfo.pm
+++ b/lib/BackupPC/CGI/ArchiveInfo.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Browse.pm b/lib/BackupPC/CGI/Browse.pm
index 942df16..5b3aff1 100644
--- a/lib/BackupPC/CGI/Browse.pm
+++ b/lib/BackupPC/CGI/Browse.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/DirHistory.pm b/lib/BackupPC/CGI/DirHistory.pm
index 0614bcb..afb9c52 100644
--- a/lib/BackupPC/CGI/DirHistory.pm
+++ b/lib/BackupPC/CGI/DirHistory.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/EmailSummary.pm b/lib/BackupPC/CGI/EmailSummary.pm
index dd7d9f5..768b8d6 100644
--- a/lib/BackupPC/CGI/EmailSummary.pm
+++ b/lib/BackupPC/CGI/EmailSummary.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/GeneralInfo.pm b/lib/BackupPC/CGI/GeneralInfo.pm
index dbcfa02..b203ca5 100644
--- a/lib/BackupPC/CGI/GeneralInfo.pm
+++ b/lib/BackupPC/CGI/GeneralInfo.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/HostInfo.pm b/lib/BackupPC/CGI/HostInfo.pm
index 4edd3d9..e28bb72 100644
--- a/lib/BackupPC/CGI/HostInfo.pm
+++ b/lib/BackupPC/CGI/HostInfo.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/LOGlist.pm b/lib/BackupPC/CGI/LOGlist.pm
index 6aa7355..88791e4 100644
--- a/lib/BackupPC/CGI/LOGlist.pm
+++ b/lib/BackupPC/CGI/LOGlist.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Lib.pm b/lib/BackupPC/CGI/Lib.pm
index 3345d99..b22a657 100644
--- a/lib/BackupPC/CGI/Lib.pm
+++ b/lib/BackupPC/CGI/Lib.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Queue.pm b/lib/BackupPC/CGI/Queue.pm
index e0826ea..b65e345 100644
--- a/lib/BackupPC/CGI/Queue.pm
+++ b/lib/BackupPC/CGI/Queue.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/ReloadServer.pm b/lib/BackupPC/CGI/ReloadServer.pm
index 89e3959..6d115d9 100644
--- a/lib/BackupPC/CGI/ReloadServer.pm
+++ b/lib/BackupPC/CGI/ReloadServer.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Restore.pm b/lib/BackupPC/CGI/Restore.pm
index 1beb089..a2941c2 100644
--- a/lib/BackupPC/CGI/Restore.pm
+++ b/lib/BackupPC/CGI/Restore.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/RestoreFile.pm b/lib/BackupPC/CGI/RestoreFile.pm
index 9e347f8..a9ac661 100644
--- a/lib/BackupPC/CGI/RestoreFile.pm
+++ b/lib/BackupPC/CGI/RestoreFile.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/RestoreInfo.pm b/lib/BackupPC/CGI/RestoreInfo.pm
index 5d315de..c09d3b5 100644
--- a/lib/BackupPC/CGI/RestoreInfo.pm
+++ b/lib/BackupPC/CGI/RestoreInfo.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/StartServer.pm b/lib/BackupPC/CGI/StartServer.pm
index 225b3e8..ead153e 100644
--- a/lib/BackupPC/CGI/StartServer.pm
+++ b/lib/BackupPC/CGI/StartServer.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/StartStopBackup.pm b/lib/BackupPC/CGI/StartStopBackup.pm
index b1031ef..86202e4 100644
--- a/lib/BackupPC/CGI/StartStopBackup.pm
+++ b/lib/BackupPC/CGI/StartStopBackup.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/StopServer.pm b/lib/BackupPC/CGI/StopServer.pm
index 22b8e8f..d4d1088 100644
--- a/lib/BackupPC/CGI/StopServer.pm
+++ b/lib/BackupPC/CGI/StopServer.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/Summary.pm b/lib/BackupPC/CGI/Summary.pm
index dfafa06..b4fc8d9 100644
--- a/lib/BackupPC/CGI/Summary.pm
+++ b/lib/BackupPC/CGI/Summary.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/CGI/View.pm b/lib/BackupPC/CGI/View.pm
index ce09259..eabac58 100644
--- a/lib/BackupPC/CGI/View.pm
+++ b/lib/BackupPC/CGI/View.pm
@@ -28,7 +28,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -168,7 +168,7 @@ sub action
last if ( $s eq "" );
$s =~ s/[\n\r]+//g;
$s = ${EscHTML($s)};
- $s =~ s/\b([\w-]+)\b/defined($Hosts->{$1})
+ $s =~ s/\b([\w.-]+)\b/defined($Hosts->{$1})
? ${HostLink($1)} : $1/eg;
$c .= $s . "\n";
}
@@ -194,7 +194,7 @@ sub action
$s =~ s[(\$Conf\{.*?\})][
my $c = $1;
my $s = lc($c);
- $s =~ s{(\W)}{sprintf("%%%02x", ord($1) )}gxe;
+ $s =~ s{(\W)}{_}g;
"$c"
]eg;
$c .= $s . "\n";
diff --git a/lib/BackupPC/FileZIO.pm b/lib/BackupPC/FileZIO.pm
index 9218faa..3f37924 100644
--- a/lib/BackupPC/FileZIO.pm
+++ b/lib/BackupPC/FileZIO.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/Lang/pt_br.pm b/lib/BackupPC/Lang/pt_br.pm
new file mode 100644
index 0000000..8dc58e5
--- /dev/null
+++ b/lib/BackupPC/Lang/pt_br.pm
@@ -0,0 +1,1312 @@
+#!/usr/bin/perl
+#
+# By Reginaldo Ferreira (23.07.2004 for V2.1.10)
+#
+
+#my %lang;
+
+#use strict;
+
+# --------------------------------
+
+$Lang{Start_Archive} = "Iniciar backup";
+$Lang{Stop_Dequeue_Archive} = "Parar/anular backup";
+$Lang{Start_Full_Backup} = "Iniciar Backup Completa";
+$Lang{Start_Incr_Backup} = "Iniciar Backup Incremental";
+$Lang{Stop_Dequeue_Backup} = "Parar/Anular Backup";
+$Lang{Restore} = "Restaurar";
+
+$Lang{Type_full} = "completo";
+$Lang{Type_incr} = "incremental";
+
+# -----
+
+$Lang{Only_privileged_users_can_view_admin_options} = "Somente superusuarios podem ver as opções de administração.";
+$Lang{H_Admin_Options} = "Servidor BackupPC: Opções de administração";
+$Lang{Admin_Options} = "Opções de administração";
+$Lang{Admin_Options_Page} = <
+\${h2("Controle do Servidor")}
+
+
+EOF
+$Lang{Unable_to_connect_to_BackupPC_server} = "Impossível conectar ao servidor BackupPC",
+ "Este script CGI (\$MyURL) não pode conectar-se ao servidor BackupPC"
+ . " em \$Conf{ServerHost} porta \$Conf{ServerPort}. O erro"
+ . " foi: \$err.",
+ "Talvez o servidor BackupPC não está ativo ou existe um "
+ . " erro de configuração. Por favor informe seu administrador de sistemas.";
+$Lang{Admin_Start_Server} = <
+O servidor BackupPC em \$Conf{ServerHost} port \$Conf{ServerPort}
+não está iniciando (pode ter parado ou não ainda não iniciado).
+Deseja inicia-lo agora?
+
+
+
+EOF
+
+# -----
+
+$Lang{H_BackupPC_Server_Status} = "Estado do Servidor BackupPC";
+
+$Lang{BackupPC_Server_Status_General_Info}= <
+
O PID do servidor é \$Info{pid}, no host \$Conf{ServerHost},
+ versão \$Info{Version}, iniciado em \$serverStartTime.
+
Esta informação de estado foi gerada em \$now.
+
A última configuração foi carregada às \$configLoadTime
+
A fila de PCs se ativará novamente em \$nextWakeupTime.
+
Informações adicionais:
+
+
\$numBgQueue solicitações de backup pendentes desde a última ativação programada,
+
\$numUserQueue solicitações de backup de usuarios,
+
\$numCmdQueue solicitações de comandos pendentes,
+ \$poolInfo
+
O sistema de arquivos estava recentemente em \$Info{DUlastValue}%
+ (\$DUlastTime), o máximo de hoje é \$Info{DUDailyMax}% (\$DUmaxTime)
+ e o máximo de ontem foi \$Info{DUDailyMaxPrev}%.
+
+Clique no número do Backup para revisar e restaurar arquivos.
+
+
+
Cópia Nº
+
Tipo
+
Completo
+
Data Início
+
Duração/min
+
Idade/dias
+
Rota da Cópia no Servidor
+
+\$str
+
+
+
+\$restoreStr
+
+
+\${h2("Resumo dos Erros de Transferência")}
+
+
+
Copia Nº
+
Tipo
+
Ver
+
Nº Xfer errs
+
Nº erros arquivos
+
Nº erros unidades
+
Nº erros tar
+
+\$errStr
+
+
+
+\${h2("Resumo do Total/Tamanho dos Arquivos Reutilizados")}
+
+Os arquivos existentes são aqueles que já estão no lote; os novos são
+aqueles que serão adicionados ao lote.
+Os arquivos vazios e os erros de SMB não contam nos valores de reutilizados
+nem nos de novos.
+
+
+
+
Totais
+
Arquivos Existentes
+
Arquivos Novos
+
+
+
Cópia Nº
+
Tipo
+
Nº Arquivos
+
Tamanho/MB
+
MB/seg
+
Nº Arquivos
+
Tamanho/MB
+
Nº Arquivos
+
Tamanho/MB
+
+\$sizeStr
+
+
+
+\${h2("Resumo da Compressão")}
+
+Performance de compresão para os arquivos já existentes no lote e nos
+arquivos novos comprimidos.
+
+EOF
+
+# ------------------------------
+$Lang{DirHistory_backup_for__host} = "BackupPC: Histórico do Backup do diretório em \$host";
+
+#
+# These two strings are used to build the links for directories and
+# file versions. Files are appended with a version number.
+#
+$Lang{DirHistory_dirLink} = "dir";
+$Lang{DirHistory_fileLink} = "v";
+
+$Lang{DirHistory_for__host} = <
+Este quadro mostra cada versão única disponível nos diversos backups:
+
+
Clique no número do backup para voltar ao explorador de backups,
+
Clique no atalho do diretório (\$Lang->{DirHistory_dirLink}) para navegar
+ por esse diretório,
+
Clique no atalho da versão do arquivo (\$Lang->{DirHistory_fileLink}0,
+ \$Lang->{DirHistory_fileLink}1, ...) para baixar esse arquivo,
+
Os arquivos com conteúdos diferentes entre cópias distintas de backup tem o mesmo
+ número de verssão,
+
Os arquivos ou diretórios inexistentes em um determinado backup tem uma
+ caixa vazia.
+
Os arquivos mostrados com a mesma versão podem ter diferentes atributos.
+ Selecione o número do backup para ver os atributos do arquivo.
+
+
+\${h2("Histórico de \${EscHTML(\$dirDisplay)}")}
+
+
+
+
Backup numero
\$backupNumStr
+
Backup time
\$backupTimeStr
+\$fileStr
+
+EOF
+
+# ------------------------------
+$Lang{Restore___num_details_for__host} = "BackupPC: Detalhes da restauração Nº\$num de \$host";
+
+$Lang{Restore___num_details_for__host2} = <
+
+EOF
+
+# -----------------------------------
+$Lang{Email_Summary} = "BackupPC: Resumo de Emails";
+
+# -----------------------------------
+# !! ERROR messages !!
+# -----------------------------------
+$Lang{BackupPC__Lib__new_failed__check_apache_error_log} = "BackupPC::Lib->nova falha: revise o error_log do apache\n";
+$Lang{Wrong_user__my_userid_is___} =
+ "Usuário inválido: meu userid é \$>, no lugar de \$uid"
+ . "(\$Conf{BackupPCUser})\n";
+# $Lang{Only_privileged_users_can_view_PC_summaries} = "Somente os usuários autorizados podem ver os resumos de PCs.";
+$Lang{Only_privileged_users_can_stop_or_start_backups} =
+ "Somente os usuários autorizados podem iniciar ou parar as cópias"
+ . " \${EscHTML(\$host)}.";
+$Lang{Invalid_number__num} = "Número inválido \$num";
+$Lang{Unable_to_open__file__configuration_problem} = "Não pode abrir \$file: problema de configuração?";
+$Lang{Only_privileged_users_can_view_log_or_config_files} = "Somente os usuários autorizados podem ver registros ou arquivos de configuração.";
+$Lang{Only_privileged_users_can_view_log_files} = "Somente os usuários autorizados podem ver arquivos de registro.";
+$Lang{Only_privileged_users_can_view_email_summaries} = "Somente os usuários autorizados podem ver resumos de email.";
+$Lang{Only_privileged_users_can_browse_backup_files} = "Somente os usuários autorizados podem revisar os arquivos de backup"
+ . " for host \${EscHTML(\$In{host})}.";
+$Lang{Empty_host_name} = "Número de host vazio.";
+$Lang{Directory___EscHTML} = "O diretório \${EscHTML(\"\$TopDir/pc/\$host/\$num\")}"
+ . " está vazio";
+$Lang{Can_t_browse_bad_directory_name2} = "Não pode mostrar um nome de diretório inválido"
+ . " \${EscHTML(\$relDir)}";
+$Lang{Only_privileged_users_can_restore_backup_files} = "Somente os usuários autorizados podem restaurar backups"
+ . " para o host \${EscHTML(\$In{host})}.";
+$Lang{Bad_host_name} = "Nome de host inválido \${EscHTML(\$host)}";
+$Lang{You_haven_t_selected_any_files__please_go_Back_to} = "Não foi selecionado nenhum arquivo; por favor, volte e"
+ . " selecione alguns arquivos.";
+$Lang{You_haven_t_selected_any_hosts} = "Não foi selecionado nenhum host; por favor volte e"
+ . " selecione algum host.";
+$Lang{Nice_try__but_you_can_t_put} = "Boa tentativa, mas não pode usar \'..\' nos nomes de arquivo";
+$Lang{Host__doesn_t_exist} = "O Host \${EscHTML(\$In{hostDest})} não existe";
+$Lang{You_don_t_have_permission_to_restore_onto_host} = "Sem autorização para restaurar neste host"
+ . " \${EscHTML(\$In{hostDest})}";
+$Lang{Can_t_open_create} = "Impossível abrir/criar "
+ . "\${EscHTML(\"\$TopDir/pc/\$hostDest/\$reqFileName\")}";
+$Lang{Only_privileged_users_can_restore_backup_files2} = "Somente os usuários autorizados podem restaurar backups"
+ . " do host \${EscHTML(\$host)}.";
+$Lang{Empty_host_name} = "Nome de host vazio";
+$Lang{Unknown_host_or_user} = "Usuário ou host inválido \${EscHTML(\$host)}";
+$Lang{Only_privileged_users_can_view_information_about} = "Somente os usuários autorizados podem ver informações do"
+ . " host \${EscHTML(\$host)}." ;
+$Lang{Only_privileged_users_can_view_archive_information} = "Somente os administradores podem ver informações de arquivo.";
+$Lang{Only_privileged_users_can_view_restore_information} = "Somente os usuários autorizados podem ver informações de restauração.";
+$Lang{Restore_number__num_for_host__does_not_exist} = "O número de restauração \$num del host \${EscHTML(\$host)} "
+ . " não existe.";
+$Lang{Archive_number__num_for_host__does_not_exist} = "O backup \$num do host \${EscHTML(\$host)} "
+ . " não existe.";
+$Lang{Can_t_find_IP_address_for} = "Impossível encontrar o endereço do IP de \${EscHTML(\$host)}";
+$Lang{host_is_a_DHCP_host} = <
+Até que tenha \$host um endereço num DHCP válido, se pode
+començar este processo a partir da própria máquina cliente.
+EOF
+
+# ------------------------------------
+# !! Server Mesg !!
+# ------------------------------------
+
+$Lang{Backup_requested_on_DHCP__host} = "Solicitação de backup em DHCP \$host (\$In{hostIP}) por"
+ . " \$User desde \$ENV{REMOTE_ADDR}";
+$Lang{Backup_requested_on__host_by__User} = "Solicitação de backup em \$host por \$User";
+$Lang{Backup_stopped_dequeued_on__host_by__User} = "Backup parado/desprogramado em \$host por \$User";
+$Lang{Restore_requested_to_host__hostDest__backup___num} = "Restauração solicitada para o host \$hostDest, backup #\$num,"
+ . " por \$User desde \$ENV{REMOTE_ADDR}";
+$Lang{Archive_requested} = "Arquivo solicitado por \$User desde \$ENV{REMOTE_ADDR}";
+
+# -------------------------------------------------
+# ------- Stuff that was forgotten ----------------
+# -------------------------------------------------
+
+$Lang{Status} = "Estado";
+$Lang{PC_Summary} = "Resumo PC";
+$Lang{LOG_file} = "Arquivo de Log";
+$Lang{LOG_files} = "Arquivos de Log";
+$Lang{Old_LOGs} = "Logs antigos";
+$Lang{Email_summary} = "Resumo Email";
+$Lang{Config_file} = "Arquivo configuração";
+$Lang{Hosts_file} = "Arquivo Hosts";
+$Lang{Current_queues} = "Filas atuais";
+$Lang{Documentation} = "Documentação";
+
+#$Lang{Host_or_User_name} = "Host ou usuário:";
+$Lang{Go} = "Aceitar";
+$Lang{Hosts} = "Hosts";
+$Lang{Select_a_host} = "Selecione um host...";
+
+$Lang{There_have_been_no_archives} = "
Não existem arquivos
\n";
+$Lang{This_PC_has_never_been_backed_up} = "
Nunca foi feito backup deste PC!
\n";
+$Lang{This_PC_is_used_by} = "
Este PC é utilizado por \${UserLink(\$user)}";
+
+$Lang{Extracting_only_Errors} = "(Extraindo somente Erros)";
+$Lang{XferLOG} = "TransfLOG";
+$Lang{Errors} = "Erros";
+
+# ------------
+$Lang{Last_email_sent_to__was_at___subject} = <Última mensagem enviada a \${UserLink(\$user)} foi às \$mailTime, assunto "\$subj".
+EOF
+# ------------
+$Lang{The_command_cmd_is_currently_running_for_started} = <O comando \$cmd está executando para \$host, iniciado às \$startTime.
+EOF
+
+# -----------
+$Lang{Host_host_is_queued_on_the_background_queue_will_be_backed_up_soon} = <O host \$host está em fila para ser processado em segundo plano (logo o backup estará pronto!).
+EOF
+
+# ----------
+$Lang{Host_host_is_queued_on_the_user_queue__will_be_backed_up_soon} = <Host \$host está para ser processado na fila de usuarios (logo o backup estará pronto!).
+EOF
+
+# ---------
+$Lang{A_command_for_host_is_on_the_command_queue_will_run_soon} = <Uma execução para \$host estar na fila de execuções (iniciará a seguir).
+EOF
+
+# --------
+$Lang{Last_status_is_state_StatusHost_state_reason_as_of_startTime} = <O último estado foi \"\$Lang->{\$StatusHost{state}}\"\$reason às \$startTime.
+EOF
+
+# --------
+$Lang{Last_error_is____EscHTML_StatusHost_error} = <O último erro foi \"\${EscHTML(\$StatusHost{error})}\".
+EOF
+
+# ------
+$Lang{Pings_to_host_have_failed_StatusHost_deadCnt__consecutive_times} = <Os pings para \$host falharam \$StatusHost{deadCnt} vezes consecutivas.
+EOF
+
+# -----
+$Lang{Prior_to_that__pings} = "Antes destes, pings";
+
+# -----
+$Lang{priorStr_to_host_have_succeeded_StatusHostaliveCnt_consecutive_times} = <\$priorStr a \$host obtiveram êxito \$StatusHost{aliveCnt}
+ vezes consecutivas.
+EOF
+
+$Lang{Because__host_has_been_on_the_network_at_least__Conf_BlackoutGoodCnt_consecutive_times___} = <Dado que \$host tem estado em uso na rede pelo menos \$Conf{BlackoutGoodCnt}
+vezes consecutivas, não se realizará backup das \$blackoutStr.
+EOF
+
+$Lang{__time0_to__time1_on__days} = "\$t0 até \$t1 em \$days";
+
+$Lang{Backups_are_deferred_for_hours_hours_change_this_number} = <Os backups atrazaram-se durante \$hours hours
+({Stop_Dequeue_Archive})}&host=\$host\">Troque este número).
+EOF
+
+$Lang{tryIP} = " y \$StatusHost{dhcpHostIP}";
+
+#$Lang{Host_Inhost} = "Host \$In{host}";
+
+$Lang{checkAll} = <
+ Selecionar tudo
+
+
+
+EOF
+
+$Lang{checkAllHosts} = <
+ Selecionar tudo
+
+
+
+EOF
+
+$Lang{fileHeader} = <
Nome
+
Tipo
+
Modo
+
Nº
+
Tamanho
+
Hora Mod.
+
+EOF
+
+$Lang{Home} = "Principal";
+$Lang{Browse} = "Explorar backups";
+$Lang{Last_bad_XferLOG} = "Último erro no Log de Transferência";
+$Lang{Last_bad_XferLOG_errors_only} = "Último erro no Log de transferência (erros somente)";
+
+$Lang{This_display_is_merged_with_backup} = < Este quadro pertence ao backup Nº\$numF.
+EOF
+
+$Lang{Visit_this_directory_in_backup} = < Selecione o backup que desseja ver:
+EOF
+
+$Lang{Restore_Summary} = <
+Clique no número da restauração para ver seus detalhes.
+
+
Restauração Nº
+
Resultado
+
Data Inicio
+
Dur/mins
+
Nº Arquivos
+
MB
+
Nº Err. Tar
+
Nº Err. Transf.#xferErrs
+
+\$restoreStr
+
+
+EOF
+
+$Lang{Archive_Summary} = <
+Clique no número do arquivo para mais detalhes.
+
O diretório \${EscHTML(\$dirDisplay)} está vazio
+
+EOF
+
+#$Lang{on} = "ativo";
+$Lang{off} = "inativo";
+
+$Lang{backupType_full} = "completo";
+$Lang{backupType_incr} = "incremental";
+$Lang{backupType_partial} = "parcial";
+
+$Lang{failed} = "falhado";
+$Lang{success} = "sucesso";
+$Lang{and} = "e";
+
+# ------
+# Hosts states and reasons
+$Lang{Status_idle} = "inativo";
+$Lang{Status_backup_starting} = "iniciando backup";
+$Lang{Status_backup_in_progress} = "backup em execução";
+$Lang{Status_restore_starting} = "iniciando restauração";
+$Lang{Status_restore_in_progress} = "restauração em execução";
+$Lang{Status_link_pending} = "conexão pendente";
+$Lang{Status_link_running} = "conexão em curso";
+
+$Lang{Reason_backup_done} = "backup realizado";
+$Lang{Reason_restore_done} = "restauração realizada";
+$Lang{Reason_archive_done} = "arquivamento realizado";
+$Lang{Reason_nothing_to_do} = "nada a fazer";
+$Lang{Reason_backup_failed} = "falha no backup";
+$Lang{Reason_restore_failed} = "falha na restauração";
+$Lang{Reason_archive_failed} = "falha no arquivamento";
+$Lang{Reason_no_ping} = "sem ping";
+$Lang{Reason_backup_canceled_by_user} = "backup cancelado pelo usuário";
+$Lang{Reason_restore_canceled_by_user} = "restauração cancelada pelo usuário";
+$Lang{Reason_archive_canceled_by_user} = "arquivamento cancelado pelo usuário";
+
+# ---------
+# Email messages
+
+# No backup ever
+$Lang{EMailNoBackupEverSubj} = "BackupPC: nenhum backup de \$host foi terminado com êxito";
+$Lang{EMailNoBackupEverMesg} = <<'EOF';
+To: $user$domain
+cc:
+Subject: $subj
+
+Caro $userName,
+
+Em seu PC ($host) nenhum backup foi completado por nosso programa de backup.
+Os backups deveriam ser executados automaticamente quando seu PC se conecta
+a rede. Contate seu suporte técnico se:
+
+ - Seu computador está conectado a rede com regularidade. Isto significa
+ que existe algum problema de instalação ou configuração que impessa a
+ realização dos backups.
+
+ - Não deseja realizar backups e não quer receber mais mensagens
+ como esta.
+
+Caso contrário, assegure-se de que seu PC está conectado à rede na próxima vez
+que estiver utilizando-o.
+
+Saudações:
+Agente BackupPC
+http://backuppc.sourceforge.net
+EOF
+
+# No recent backup
+$Lang{EMailNoBackupRecentSubj} = "BackupPC: não existem backups recentes de \$host";
+$Lang{EMailNoBackupRecentMesg} = <<'EOF';
+To: $user$domain
+cc:
+Subject: $subj
+
+Caro $userName,
+
+Não foi completado nenhum backup completo de seu PC ($host) durante
+$days dias.
+Seu PC tem realizado backups corretos $numBackups vezes desde
+$firstTime até $days dias.
+Os backups deveriam efetuar-se automaticamente quando seu PC estiver
+conectado a rede.
+
+Se seu PC tem estado conectado durante algumas horas a rede durante os últimos
+$days dias deveria contactar com seu suporte técnico para ver porque os backups
+não funcionam adequadamente.
+
+Por outro lado, se você não o está utilizando, não há muito o que fazer a não
+ser copiar manualmente os arquivos mais críticos para outro suporte físico.
+Deve-se estar ciente de que qualquer arquivo que tenha sido criado ou modificado
+nos últimos $days dias (incluindo todos os emails novos e arquivos anexos) não podem
+ser restaurados se seu disco danificar-se.
+
+Saudações:
+Agente BackupPC
+http://backuppc.sourceforge.net
+EOF
+
+# Old Outlook files
+$Lang{EMailOutlookBackupSubj} = "BackupPC: Oss arquivos do Outlook de \$host necessitam ser copiados";
+$Lang{EMailOutlookBackupMesg} = <<'EOF';
+To: $user$domain
+cc:
+Subject: $subj
+
+Caro $userName,
+
+Os arquivos de Outlook de seu PC tem $howLong.
+Estes arquivos contém todo seus emails, anexos, contatos e informações de
+sua agenda. Seu PC tem sido corretamente salvaguardado $numBackups vezes desde
+$firstTime até $lastTime dias. Sem fechá-lo, Outlook bloqueia todos seus
+arquivos quando estão em execução, impidindo de se fazer backup dos mesmo.
+
+Recomendamos fazer cópia de segurança dos arquivos do Outlook quando estiver
+conectado a rede fechando o Outlook e o resto das aplicações e utilizando seu
+navegador de internet. Clique neste link:
+
+ $CgiURL?host=$host
+
+Selecione "Começar backup incremental" duas vezes para começar
+um novo backup incremental.
+Pode-se selecionar "Voltar a página de $host " e clicar em "refazer"
+para ver o estado do processo de backup. Este processo deve durar
+somente alguns minutos para completar.
+
+Saudações:
+Agente BackupPC
+http://backuppc.sourceforge.net
+EOF
+
+$Lang{howLong_not_been_backed_up} = "não foi realizado nenhum backup com êxito";
+$Lang{howLong_not_been_backed_up_for_days_days} = "não foi realizado nenhum backup durante \$days dias";
+
+#end of lang_pt_BR.pm
+
+
diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm
index ae5bd3c..8eae62d 100644
--- a/lib/BackupPC/Lib.pm
+++ b/lib/BackupPC/Lib.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -59,7 +59,7 @@ sub new
TopDir => $topDir || '/data/BackupPC2.1.0',
BinDir => $installDir || '/usr/local/BackupPC2.1.0',
LibDir => $installDir || '/usr/local/BackupPC2.1.0',
- Version => '2.1.2',
+ Version => '2.1.3',
BackupFields => [qw(
num type startTime endTime
nFiles size nFilesExist sizeExist nFilesNew sizeNew
diff --git a/lib/BackupPC/PoolWrite.pm b/lib/BackupPC/PoolWrite.pm
index e6537a5..ca8dcdc 100644
--- a/lib/BackupPC/PoolWrite.pm
+++ b/lib/BackupPC/PoolWrite.pm
@@ -56,7 +56,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/View.pm b/lib/BackupPC/View.pm
index 165b762..797df8a 100644
--- a/lib/BackupPC/View.pm
+++ b/lib/BackupPC/View.pm
@@ -31,7 +31,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/Xfer/Archive.pm b/lib/BackupPC/Xfer/Archive.pm
index 08e8f88..0532635 100644
--- a/lib/BackupPC/Xfer/Archive.pm
+++ b/lib/BackupPC/Xfer/Archive.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/Xfer/Rsync.pm b/lib/BackupPC/Xfer/Rsync.pm
index 2ea58a5..09b81d2 100644
--- a/lib/BackupPC/Xfer/Rsync.pm
+++ b/lib/BackupPC/Xfer/Rsync.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/Xfer/RsyncDigest.pm b/lib/BackupPC/Xfer/RsyncDigest.pm
index 58d53c5..a516adc 100644
--- a/lib/BackupPC/Xfer/RsyncDigest.pm
+++ b/lib/BackupPC/Xfer/RsyncDigest.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/Xfer/RsyncFileIO.pm b/lib/BackupPC/Xfer/RsyncFileIO.pm
index f4853bb..005ad7f 100644
--- a/lib/BackupPC/Xfer/RsyncFileIO.pm
+++ b/lib/BackupPC/Xfer/RsyncFileIO.pm
@@ -12,7 +12,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -405,6 +405,11 @@ sub attribWrite
my($fio, $d) = @_;
my($poolWrite);
+ #
+ # Don't write attributes on 2nd phase - they're already
+ # taken care of during the first phase.
+ #
+ return if ( $fio->{phase} > 0 );
if ( !defined($d) ) {
#
# flush all entries (in reverse order)
@@ -932,6 +937,7 @@ sub fileDeltaRxDone
close($fio->{rxInFd}) if ( defined($fio->{rxInFd}) );
unlink("$fio->{outDirSh}RStmp") if ( -f "$fio->{outDirSh}RStmp" );
+ $fio->{phase} = $phase;
#
# Check the final md4 digest
diff --git a/lib/BackupPC/Xfer/Smb.pm b/lib/BackupPC/Xfer/Smb.pm
index 51ae10c..e12e30e 100644
--- a/lib/BackupPC/Xfer/Smb.pm
+++ b/lib/BackupPC/Xfer/Smb.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/lib/BackupPC/Xfer/Tar.pm b/lib/BackupPC/Xfer/Tar.pm
index b082bab..7750731 100644
--- a/lib/BackupPC/Xfer/Tar.pm
+++ b/lib/BackupPC/Xfer/Tar.pm
@@ -29,7 +29,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
@@ -198,7 +198,12 @@ sub readOutput
my $mesg;
if ( sysread($t->{pipeTar}, $mesg, 8192) <= 0 ) {
vec($$FDreadRef, fileno($t->{pipeTar}), 1) = 0;
- if ( !close($t->{pipeTar}) ) {
+ if ( !close($t->{pipeTar}) && $? != 256 ) {
+ #
+ # Tar 1.16 uses exit status 1 (256) when some files
+ # changed during archive creation. We allow this
+ # as a benign error and consider the archive ok
+ #
$t->{tarOut} .= "Tar exited with error $? ($!) status\n";
$t->{xferOK} = 0 if ( !$t->{tarBadExitOk} );
}
@@ -214,15 +219,20 @@ sub readOutput
#
alarm($conf->{ClientTimeout}) if ( !$t->{abort} );
$t->{lastOutputLine} = $_ if ( !/^$/ );
- if ( /^Total bytes written: / ) {
+ if ( /^Total bytes (written|read): / ) {
$t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 1 );
$t->{xferOK} = 1;
} elsif ( /^\./ ) {
$t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
$t->{fileCnt}++;
} else {
- $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
- $t->{xferErrCnt}++;
+ #
+ # Ignore annoying log message on incremental for tar 1.15.x
+ #
+ if ( !/: file is unchanged; not dumped$/ ) {
+ $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
+ $t->{xferErrCnt}++;
+ }
#
# If tar encounters a minor error, it will exit with a non-zero
# status. We still consider that ok. Remember if tar prints
diff --git a/lib/BackupPC/Zip/FileMember.pm b/lib/BackupPC/Zip/FileMember.pm
index efb2f22..e0357bb 100644
--- a/lib/BackupPC/Zip/FileMember.pm
+++ b/lib/BackupPC/Zip/FileMember.pm
@@ -33,7 +33,7 @@
#
#========================================================================
#
-# Version 2.1.2, released 5 Sep 2005.
+# Version 2.1.3, released 21 Jan 2007.
#
# See http://backuppc.sourceforge.net.
#
diff --git a/makeDist b/makeDist
index 058e8f0..f376975 100755
--- a/makeDist
+++ b/makeDist
@@ -42,8 +42,8 @@ use Getopt::Std;
umask(0022);
-my $Version = "2.1.2";
-my $ReleaseDate = "5 Sep 2005";
+my $Version = "2.1.3";
+my $ReleaseDate = "21 Jan 2007";
my $DistDir = "dist/BackupPC-$Version";
my @PerlSrc = qw(
@@ -93,6 +93,7 @@ my @PerlSrc = qw(
lib/BackupPC/Lang/fr.pm
lib/BackupPC/Lang/it.pm
lib/BackupPC/Lang/nl.pm
+ lib/BackupPC/Lang/pt_br.pm
lib/BackupPC/Xfer/Archive.pm
lib/BackupPC/Xfer/Smb.pm
lib/BackupPC/Xfer/Tar.pm
@@ -236,24 +237,15 @@ sub InstallFile
s/__RELEASEDATE__/$ReleaseDate/g;
if ( $file =~ /BackupPC\.html$/ ) {
#
- # fixup for perl 5.6.x
+ # fixup for conf links
#
- if ( !/A NAME="item_(%|_)24Conf/i ) {
+ if ( !/A NAME="item_(%|_)conf/i ) {
s/\$Conf{([^}]*)}/
defined($ConfName{$1})
- ? "\L\E\$Conf{$1}<\/A>"
+ ? "\L\E\$Conf{$1}<\/A>"
: "\$Conf{$1}"/eg;
}
- s/<(A NAME="item_(%|_)24Conf(%|_)7B(.*?)(%|_)7D).*?">/\L/ig;
s/^