* Fixed several Xfer charset conversions.
* Added some CGI utf8 conversions from Rodrigo Real and Vincent
Fleuranceau.
* Host name is forced to lower case, to match 2.x.
* Fixed LOG file naming in BackupPC_restore and BackupPC_archive.
* GFK applied fr.pm corrections from Nicolas Stransky.
* Updated init.d/src scripts for FHS (ie: replaced __TOPDIR__/log
with __LOGDIR__ and __TOPDIR__/conf with __CONFDIR__). Patch
provided by Rodrigo Real.
* Added --log-dir and --conf-dir options to configure.pl.
Reported by Vincent Fleuranceau.
* Updated File::RsyncP version check in configure.pl, reported
by Vincent Fleuranceau. Changed File::RsyncP version to 0.64.
# Version __VERSION__, __RELEASEDATE__
#------------------------------------------------------------------------
+* Fixed several Xfer charset conversions.
+
+* Added some CGI utf8 conversions from Rodrigo Real and Vincent
+ Fleuranceau.
+
+* Host name is forced to lower case, to match 2.x.
+
+* Fixed LOG file naming in BackupPC_restore and BackupPC_archive.
+
+* GFK applied fr.pm corrections from Nicolas Stransky.
+
+* Updated init.d/src scripts for FHS (ie: replaced __TOPDIR__/log
+ with __LOGDIR__ and __TOPDIR__/conf with __CONFDIR__). Patch
+ provided by Rodrigo Real.
+
+* Added --log-dir and --conf-dir options to configure.pl.
+ Reported by Vincent Fleuranceau.
+
+* Updated File::RsyncP version check in configure.pl, reported
+ by Vincent Fleuranceau. Changed File::RsyncP version to 0.64.
+
+#------------------------------------------------------------------------
+# Version 3.0.0beta0, 11 Jul 2006
+#------------------------------------------------------------------------
+
* Added configuration and host CGI editor.
* Added rsync hardlink support. Requires latest version of
__RELEASEDATE__
- Copyright (C) 2001-2003 Craig Barratt. All rights reserved.
+ Copyright (C) 2001-2006 Craig Barratt. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License.
perl configure.pl
This will automatically determine some system information and prompt you
-for install paths.
+for install paths. Do "perldoc configure.pl" to see the various options
+that configure.pl provides.
INTRODUCTION:
------------
-BackupPC is a high-performance, enterprise-grade system for
-backing up Linux and WinXX PCs and laptops to a server's disk.
+BackupPC is a high-performance, enterprise-grade system for backing
+up Linux, WinXX, and MacOS PCs and laptops to a server's disk.
BackupPC is highly configurable and easy to install and maintain.
Given the ever decreasing cost of disks and raid systems, it is now
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
if ( !-f "$Dir/LOCK" ) {
open(LOCK, ">", "$Dir/LOCK") && close(LOCK);
}
-open(LOG, ">>", "$Dir/LOG");
-select(LOG); $| = 1; select(STDOUT);
+my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
+my $logPath = sprintf("$Dir/LOG.%02d%04d", $mon + 1, $year + 1900);
+
+if ( !-f $logPath ) {
+ #
+ # Compress and prune old log files
+ #
+ my $lastLog = $Conf{MaxOldPerPCLogFiles} - 1;
+ foreach my $file ( $bpc->sortedPCLogFiles($client) ) {
+ if ( $lastLog <= 0 ) {
+ unlink($file);
+ next;
+ }
+ $lastLog--;
+ next if ( $file =~ /\.z$/ || !$Conf{CompressLevel} );
+ BackupPC::FileZIO->compressCopy($file,
+ "$file.z",
+ undef,
+ $Conf{CompressLevel}, 1);
+ }
+}
+open(LOG, ">>", $logPath);
+select(LOG); $| = 1; select(STDOUT);
#
# Read the request file
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
use BackupPC::Xfer::Tar;
use BackupPC::Xfer::Rsync;
use BackupPC::Xfer::BackupPCd;
+use Encode;
use Socket;
use File::Path;
use File::Find;
for my $shareName ( @$ShareNames ) {
local(*RH, *WH);
+ #
+ # Convert $shareName to utf8 octets
+ #
+ $shareName = encode("utf8", $shareName);
$stat{xferOK} = $stat{hostAbort} = undef;
$stat{hostError} = $stat{lastOutputLine} = undef;
if ( -d "$Dir/new/$shareName" ) {
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
if ( !-f "$Dir/LOCK" ) {
open(LOCK, ">", "$Dir/LOCK") && close(LOCK);
}
-open(LOG, ">>", "$Dir/LOG");
-select(LOG); $| = 1; select(STDOUT);
+my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
+my $logPath = sprintf("$Dir/LOG.%02d%04d", $mon + 1, $year + 1900);
+
+if ( !-f $logPath ) {
+ #
+ # Compress and prune old log files
+ #
+ my $lastLog = $Conf{MaxOldPerPCLogFiles} - 1;
+ foreach my $file ( $bpc->sortedPCLogFiles($client) ) {
+ if ( $lastLog <= 0 ) {
+ unlink($file);
+ next;
+ }
+ $lastLog--;
+ next if ( $file =~ /\.z$/ || !$Conf{CompressLevel} );
+ BackupPC::FileZIO->compressCopy($file,
+ "$file.z",
+ undef,
+ $Conf{CompressLevel}, 1);
+ }
+}
+open(LOG, ">>", $logPath);
+select(LOG); $| = 1; select(STDOUT);
#
# Read the request file
$Conf{CompressLevel});
my $tarCreateFileCnt = 0;
my $tarCreateByteCnt = 0;
+my $tarCreateDirCnt = 0;
my $tarCreateErrCnt = 1; # assume not ok until we learn otherwise
my $tarCreateErr;
my($logMsg, $xfer);
@tarPathOpts,
@{$RestoreReq{fileList}},
);
- my $logMsg = "Running: "
+ my $runMsg = "Running: "
. $bpc->execCmd2ShellCmd("$BinDir/BackupPC_tarCreate", @tarArgs)
. "\n";
- $RestoreLOG->write(\$logMsg);
+ $RestoreLOG->write(\$runMsg);
if ( !defined($tarPid = open(TAR, "-|")) ) {
close(WH);
# FIX: need to cleanup xfer
if ( /^Done: (\d+) files, (\d+) bytes, (\d+) dirs, (\d+) specials, (\d+) errors/ ) {
$tarCreateFileCnt = $1;
$tarCreateByteCnt = $2;
+ $tarCreateDirCnt = $3;
$tarCreateErrCnt = $5;
}
}
#
# otherwise the xfer module does everything for us
#
- print(LOG $bpc->timeStamp, "Starting restore\n");
+ print(LOG $bpc->timeStamp, $logMsg . "\n");
print("started_restore\n");
($tarCreateFileCnt, $tarCreateByteCnt,
$tarCreateErrCnt, $tarCreateErr) = $xfer->run();
if ( $stat{hostAbort} && $stat{hostError} eq "" ) {
$stat{hostError} = "lost network connection during restore";
}
- $RestoreLOG->write(\"Restore failed: $stat{hostError}\n")
+ $RestoreLOG->write(\"restore failed: $stat{hostError}\n")
if ( defined($RestoreLOG) );
}
$bpc->RestoreInfoWrite($client, @Restores);
if ( !$stat{xferOK} ) {
- print(LOG $bpc->timeStamp, "Restore failed ($stat{hostError})\n");
+ print(LOG $bpc->timeStamp, "restore failed ($stat{hostError})\n");
print("restore failed: $stat{hostError}\n");
return 1;
} else {
+ $stat{xferErrCnt} ||= 0;
+ print(LOG $bpc->timeStamp, "restore $lastNum complete"
+ . " ($tarCreateFileCnt files, $tarCreateByteCnt bytes,"
+ . " $tarCreateDirCnt dirs, $stat{xferErrCnt} xferErrs)\n");
print("restore complete\n");
return;
}
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
my $PathRemove = $1 if ( $opts{r} =~ /(.+)/ );
my $PathAdd = $1 if ( $opts{p} =~ /(.+)/ );
-if ( ($opts{s} !~ /^([\w\s.@\/$(){}[\]-]+)$/
- || $opts{s} =~ m{(^|/)\.\.(/|$)}) && $opts{s} ne "*" ) {
+if ( $opts{s} =~ m{(^|/)\.\.(/|$)} ) {
print(STDERR "$0: bad share name '$opts{s}'\n");
exit(1);
}
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
exit(1);
}
my $client = $1;
-if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
+if ( $ARGV[1] =~ m{(^|/)\.\.(/|$)} ) {
print("$0: bad share name '$ARGV[1]'\n");
exit(1);
}
-my $ShareNameUM = $1;
+my $ShareNameUM = $1 if ( $ARGV[1] =~ /(.*)/ );
my $ShareName = $bpc->fileNameEltMangle($ShareNameUM);
if ( $ARGV[2] !~ /^(\d+)$/ ) {
print("$0: bad compress level '$ARGV[2]'\n");
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
my $PathRemove = $1 if ( $opts{r} =~ /(.+)/ );
my $PathAdd = $1 if ( $opts{p} =~ /(.+)/ );
-if ( $opts{s} !~ /^([\w\s.@\/$(){}[\]-]+)$/
- || $opts{s} =~ m{(^|/)\.\.(/|$)} ) {
+if ( $opts{s} =~ m{(^|/)\.\.(/|$)} ) {
print(STDERR "$0: bad share name '$opts{s}'\n");
exit(1);
}
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
# Filename charset encoding on the client. BackupPC uses utf8
# on the server for filename encoding. If this is empty, then
-# utf8 is assumed and client filenames will not be modified. If set
-# to a different encoding then filenames will be re-encoded in utf8.
-# A typical WinXX encoding for latin1/western europe is 'cp1252'.
+# utf8 is assumed and client filenames will not be modified.
+# If set to a different encoding then filenames will converted
+# to/from utf8 automatically during backup and restore.
+#
+# If the file names displayed in the browser (eg: accents or special
+# characters) don't look right then it is likely you haven't set
+# $Conf{ClientCharset} correctly.
+#
+# If you are using smbclient on a WinXX machine, smbclient will convert
+# to the "unix charset" setting in smb.conf. The default is utf8,
+# in which case leave $Conf{ClientCharset} empty since smbclient does
+# the right conversion.
+#
+# If you are using rsync on a WinXX machine then it does no conversion.
+# A typical WinXX encoding for latin1/western europe is 'cp1252',
+# so in this case set $Conf{ClientCharset} to 'cp1252'.
+#
+# On a linux or unix client, run "locale charmap" to see the client's
+# charset. Set $Conf{ClientCharset} to this value. A typical value
+# for english/US is 'ISO-8859-1'.
+#
# Do "perldoc Encode::Supported" to see the list of possible charset
-# values, and also see http://czyborra.com/charsets/iso8859.html.
-#
+# values. The FAQ at http://www.cl.cam.ac.uk/~mgk25/unicode.html
+# is excellent, and http://czyborra.com/charsets/iso8859.html
+# provides more information on the iso-8859 charsets.
+#
$Conf{ClientCharset} = '';
#
"cgi-dir=s",
"compress-level=i",
"config-path=s",
+ "config-dir=s",
"data-dir=s",
"dest-dir=s",
"fhs!",
"html-dir=s",
"html-dir-url=s",
"install-dir=s",
+ "log-dir=s",
"man",
"set-perms!",
"uid-ignore!",
pod2usage(-exitstatus => 0, -verbose => 2) if $opts{man};
my $DestDir = $opts{"dest-dir"};
+$DestDir = "" if ( $DestDir eq "/" );
if ( !$opts{"uid-ignore"} && $< != 0 ) {
print <<EOF;
"$Conf{ConfDir}",
"$Conf{LogDir}",
) ) {
- mkpath("$DestDir/$dir", 0, 0750) if ( !-d "$DestDir/$dir" );
- if ( !-d "$DestDir/$dir"
- || !my_chown($Uid, $Gid, "$DestDir/$dir") ) {
- die("Failed to create or chown $DestDir/$dir\n");
+ mkpath("$DestDir$dir", 0, 0750) if ( !-d "$DestDir$dir" );
+ if ( !-d "$DestDir$dir"
+ || !my_chown($Uid, $Gid, "$DestDir$dir") ) {
+ die("Failed to create or chown $DestDir$dir\n");
} else {
- print("Created $DestDir/$dir\n");
+ print("Created $DestDir$dir\n");
}
}
}
eval "use File::RsyncP;";
-if ( !$@ && $File::RsyncP::VERSION < 0.52 ) {
+if ( !$@ && $File::RsyncP::VERSION < 0.64 ) {
print("\nWarning: you need to upgrade File::RsyncP;"
- . " I found $File::RsyncP::VERSION and BackupPC needs 0.52\n");
+ . " I found $File::RsyncP::VERSION and BackupPC needs 0.64\n");
}
exit(0);
=item WinXX
-The preferred setup for WinXX clients is to set $Conf{XferMethod} to "smb".
-(Actually, for v2.0.0, rsyncd is the better method for WinXX if you are
-prepared to run rsync/cygwin on your WinXX client. More information
-about this will be provided via the FAQ.)
+One setup for WinXX clients is to set $Conf{XferMethod} to "smb".
+Actually, rsyncd is the better method for WinXX if you are prepared to
+run rsync/cygwin on your WinXX client.
If you want to use rsyncd for WinXX clients you can find a pre-packaged
zip file on L<http://backuppc.sourceforge.net>. The package is called
cygwin-rsync. It contains rsync.exe, template setup files and the
minimal set of cygwin libraries for everything to run. The README file
contains instructions for running rsync as a service, so it starts
-automatically everytime you boot your machine.
-
-If you build your own rsync, for rsync 2.6.2 it is strongly
-recommended you apply the patch in the cygwin-rsync package on
-L<http://backuppc.sourceforge.net>. This patch adds the --checksum-seed
-option for checksum caching, and also sends all errors to the client,
-which is important so BackupPC can log all file access errors.
-
+automatically everytime you boot your machine. If you use rsync
+to backup WinXX machines, be sure to set $Conf{ClientCharset}
+correctly (eg: 'cp1252') so that the WinXX file name encoding is
+correctly converted to utf8.
Otherwise, to use SMB, you can either create shares for the data you want
to backup or your can use the existing C$ share. To create a new
and then set $Conf{XferMethod} to "tar" (use tar on the network
mounted file system).
-Also, to make sure that file names with 8-bit characters are correctly
-transferred by smbclient you should add this to samba's smb.conf file
-for samba 2.x:
-
- [global]
- # Accept the windows charset
- client code page = 850
- character set = ISO8859-1
-
-For samba 3.x this should instead be:
+Also, to make sure that file names with special characters are correctly
+transferred by smbclient you should make sure that the smb.conf file
+has (for samba 3.x):
[global]
- unix charset = ISO8859-1
+ unix charset = UTF8
-This setting should work for western europe.
-See L<http://www.oreilly.com/catalog/samba/chapter/book/ch08_03.html>
-for more information about settings for other languages.
+UTF8 is the default setting, so if the parameter is missing then it
+is ok. With this setting $Conf{ClientCharset} should be emtpy,
+since smbclient has already converted the file names to utf8.
=item Linux/Unix
=back
+You need to set $Conf{ClientCharset} to the client's charset so that
+file names are correctly converted to utf8. Use "locale charmap"
+on the client to see its charset.
+
For linux/unix machines you should not backup "/proc". This directory
contains a variety of files that look like regular files but they are
special files that don't need to be backed up (eg: /proc/kcore is a
#
BINDIR=__INSTALLDIR__/bin
DATADIR=__TOPDIR__
+LOGDIR=__LOGDIR__
USER=__BACKUPPCUSER__
#
NAME=backuppc
case "$1" in
start)
echo -n "Starting $NAME: "
- start-stop-daemon --start --pidfile $DATADIR/log/BackupPC.pid \
+ start-stop-daemon --start --pidfile $LOGDIR/BackupPC.pid \
-c $USER --exec $BINDIR/$DAEMON -- -d
echo "ok."
;;
stop)
echo -n "Stopping $NAME: "
- start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid -u $USER \
+ start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid -u $USER \
--oknodo --retry 30 -x /usr/bin/perl
echo "ok."
;;
restart)
echo -n "Restarting $NAME: "
- start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid -u $USER \
+ start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid -u $USER \
--oknodo --retry 30 -x /usr/bin/perl
- start-stop-daemon --start --pidfile $DATADIR/log/BackupPC.pid \
+ start-stop-daemon --start --pidfile $LOGDIR/BackupPC.pid \
-c $USER --exec $BINDIR/$DAEMON -- -d
echo "ok."
;;
reload|force-reload)
echo "Reloading $NAME configuration files"
- start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid \
+ start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid \
--signal 1 -x /usr/bin/perl
;;
*)
-CONF_FILE=__TOPDIR__/conf/config.pl
+CONF_FILE=__CONFDIR__/config.pl
USER=__BACKUPPCUSER__
-PID_FILE=__TOPDIR__/log/BackupPC.pid
+PID_FILE=__LOGDIR__/BackupPC.pid
EXEC=__INSTALLDIR__/bin/BackupPC
EXEC_OPTIONS=-d
-
#
BINDIR=__INSTALLDIR__/bin
DATADIR=__TOPDIR__
+LOGDIR=__LOGDIR__
USER=__BACKUPPCUSER__
#
NAME=backuppc
case "$1" in
start)
echo -n "Starting $NAME: "
- startproc -f -p $DATADIR/log/BackupPC.pid -u $USER $BINDIR/$DAEMON -d
+ startproc -f -p $LOGDIR/BackupPC.pid -u $USER $BINDIR/$DAEMON -d
echo "ok."
;;
stop)
echo -n "Stopping $NAME: "
- start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid -u $USER \
+ start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid -u $USER \
--oknodo
echo "ok."
;;
restart)
echo -n "Stopping $NAME: "
- start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid -u $USER \
+ start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid -u $USER \
--oknodo
echo "ok."
echo -n "Starting $NAME: "
- startproc -f -p $DATADIR/log/BackupPC.pid -u $USER $BINDIR/$DAEMON -d
+ startproc -f -p $LOGDIR/BackupPC.pid -u $USER $BINDIR/$DAEMON -d
echo "ok."
;;
reload|force-reload)
echo "Reloading $NAME configuration files"
- start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid \
+ start-stop-daemon --stop --pidfile $LOGDIR/BackupPC.pid \
--signal 1 -x /usr/bin/perl
;;
*)
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
$attr = $view->dirAttrib($num, $share, $relDir);
if ( !defined($attr) ) {
+ $relDir = decode_utf8($relDir);
ErrorExit(eval("qq{$Lang->{Can_t_browse_bad_directory_name2}}"));
}
}
}
$share = $currDir;
- my $dirDisplay = "$share/$dir";
+ my $dirDisplay = decode_utf8("$share/$dir");
$dirDisplay =~ s{//+}{/}g;
$dirDisplay =~ s{/+$}{}g;
$dirDisplay = "/" if ( $dirDisplay eq "" );
- $dirDisplay = decode_utf8($dirDisplay);
my $filledBackup;
if ( (my @mergeNums = @{$view->mergeNums}) > 1 ) {
}
$filledBackup .= eval("qq{$Lang->{Visit_this_directory_in_backup}}");
}
+ $dir = decode_utf8($dir);
my $content = eval("qq{$Lang->{Backup_browse_for__host}}");
Header(eval("qq{$Lang->{Browse_backup__num_for__host}}"), $content);
Trailer();
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
use BackupPC::CGI::Lib qw(:all);
use BackupPC::View;
use BackupPC::Attrib qw(:all);
+use Encode;
sub action
{
my %inode2name;
my $nameCnt = 0;
(my $fDisp = "${EscHTML($f)}") =~ s/ / /g;
+ $fDisp = decode_utf8($fDisp);
$fileStr .= "<tr><td align=\"left\" class=\"histView\">$fDisp</td>";
my($colSpan, $url, $inode, $type);
my $tdClass = ' class="histView"';
$fileStr .= "</tr>\n";
}
- my $dirDisplay = "$share/$dir";
+ my $dirDisplay = decode_utf8("$share/$dir");
$dirDisplay =~ s{//+}{/}g;
$dirDisplay =~ s{/+$}{}g;
$dirDisplay = "/" if ( $dirDisplay eq "" );
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
if ( !$type->{noKeyEdit} ) {
$content .= <<EOF;
<tr><td class="border" colspan="2">
-$Lang->{CfgEdit_Button_New_Key}: <input type="text" name="addVarKey_$varName" size="20" maxlength="256" value="">
+$Lang->{CfgEdit_Button_New_Key}: <input type="text" class="editTextInput" name="addVarKey_$varName" size="20" maxlength="256" value="">
<input type="button" name="add_$varName" value="${EscHTML($Lang->{CfgEdit_Button_Add})}" onClick="addSubmit('$varName', 1)">
</td></tr>
EOF
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
# Tell the user what options they have
#
+ $pathHdr = decode_utf8($pathHdr);
$content .= eval("qq{$Lang->{Restore_Options_for__host2}}");
if ( @hosts == 1 ) {
<tr><td>$host:/$strippedShare$f</td><td>$In{hostDest}:/$strippedShareDest$targetFile</td></tr>
EOF
}
+ $In{shareDest} = decode_utf8($In{shareDest});
+ $In{pathHdr} = decode_utf8($In{pathHdr});
my $content = eval("qq{$Lang->{Are_you_sure}}");
Header(eval("qq{$Lang->{Restore_Confirm_on__host}}"), $content);
Trailer();
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
package BackupPC::CGI::RestoreFile;
use strict;
+use Encode;
use BackupPC::CGI::Lib qw(:all);
use BackupPC::FileZIO;
use BackupPC::Attrib qw(:all);
use BackupPC::View;
+
sub action
{
restoreFile($In{host}, $In{num}, $In{share}, $In{dir});
my $view = BackupPC::View->new($bpc, $host, \@Backups);
my $a = $view->fileAttrib($num, $share, $dir);
if ( $dir =~ m{(^|/)\.\.(/|$)} || !defined($a) ) {
- ErrorExit("Can't restore bad file ${EscHTML($dir)} ($num, $share, $dir)");
+ $dir = decode_utf8($dir);
+ ErrorExit("Can't restore bad file ${EscHTML($dir)} ($num, $share)");
}
my $f = BackupPC::FileZIO->open($a->{fullPath}, 0, $a->{compress});
my $data;
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
}
}
$str = shift(@{$self->{readLineBuf}}) . "\n";
- $str = decode_utf8($str) if ( $self->{utf8} );
+ if ( $self->{utf8} ) {
+ my $strUtf8 = decode_utf8($str, 0);
+ $strUtf8 = $str if ( length($strUtf8) == 0 );
+ return $strUtf8;
+ }
return $str;
}
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
my $bpc = bless {
%$paths,
- Version => '3.0.0beta0',
+ Version => '3.0.0beta1',
}, $class;
$bpc->{storage} = BackupPC::Storage->new($paths);
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
if ( @hdr ) {
if ( defined($host) ) {
next if ( lc($fld[0]) ne lc($host) );
- @{$hosts{$fld[0]}}{@hdr} = @fld;
+ @{$hosts{lc($fld[0])}}{@hdr} = @fld;
close(HOST_INFO);
close(LOCK);
return \%hosts;
} else {
- @{$hosts{$fld[0]}}{@hdr} = @fld;
+ @{$hosts{lc($fld[0])}}{@hdr} = @fld;
}
} else {
@hdr = @fld;
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
}
}
foreach my $file ( @dir ) {
- $file = $1 if ( $file =~ /(.*)/ );
+ $file = $1 if ( $file =~ /(.*)/s );
my $fileUM = $file;
$fileUM = $m->{bpc}->fileNameUnmangle($fileUM) if ( $mangle );
#print(STDERR "Doing $fileUM\n");
my @dir = readdir(DIR);
closedir(DIR);
foreach my $file ( @dir ) {
- $file = $1 if ( $file =~ /(.*)/ );
+ $file = $1 if ( $file =~ /(.*)/s );
next if ( $file eq "attrib" && $mangle
|| $file eq "."
|| $file eq ".."
my($m, $backupNum, $share, $path) = @_;
#print(STDERR "fileAttrib($backupNum, $share, $path)\n");
- if ( $path =~ s{(.*)/+(.+)}{$1} ) {
+ if ( $path =~ s{(.*)/+(.+)}{$1}s ) {
my $file = $2;
$m->dirCache($backupNum, $share, $path);
return $m->{files}{$file};
}
}
foreach my $file ( @dir ) {
- $file = $1 if ( $file =~ /(.*)/ );
+ $file = $1 if ( $file =~ /(.*)/s );
my $fileUM = $file;
$fileUM = $m->{bpc}->fileNameUnmangle($fileUM) if ( $mangle );
#print(STDERR "Doing $fileUM\n");
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
use strict;
use BackupPC::View;
use BackupPC::Xfer::RsyncFileIO;
+use Encode qw/from_to encode/;
use vars qw( $RsyncLibOK $RsyncLibErr );
#
# Note: also update configure.pl when this version number is changed!
#
- if ( $File::RsyncP::VERSION < 0.62 ) {
+ if ( $File::RsyncP::VERSION < 0.64 ) {
$RsyncLibOK = 0;
$RsyncLibErr = "File::RsyncP module version"
- . " ($File::RsyncP::VERSION) too old: need 0.62";
+ . " ($File::RsyncP::VERSION) too old: need 0.64";
} else {
$RsyncLibOK = 1;
}
$rsyncArgs = $conf->{RsyncRestoreArgs};
my $remoteDir = "$t->{shareName}/$t->{pathHdrDest}";
$remoteDir =~ s{//+}{/}g;
+ from_to($remoteDir, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
$argList = ['--server', @$rsyncArgs, '.', $remoteDir];
$fioArgs = {
client => $t->{bkupSrcHost},
}
}
foreach my $file ( @inc ) {
+ $file = encode($conf->{ClientCharset}, $file)
+ if ( $conf->{ClientCharset} ne "" );
push(@fileList, "--include=$file");
}
foreach my $file ( @exc ) {
+ $file = encode($conf->{ClientCharset}, $file)
+ if ( $conf->{ClientCharset} ne "" );
push(@fileList, "--exclude=$file");
}
}
#
# just append additional exclude lists onto the end
#
+ $file = encode($conf->{ClientCharset}, $file)
+ if ( $conf->{ClientCharset} ne "" );
push(@fileList, "--exclude=$file");
}
}
$rsyncArgs = [@$rsyncArgs, "--ignore-times"]
if ( $t->{type} eq "full" );
$rsyncClientCmd = $conf->{RsyncClientCmd};
+ my $shareNameSlash = $t->{shareNameSlash};
+ from_to($shareNameSlash, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
$argList = ['--server', '--sender', @$rsyncArgs,
- '.', $t->{shareNameSlash}];
+ '.', $shareNameSlash];
eval {
$argList = File::RsyncP->excludeStrip($argList);
};
sshPath => $conf->{SshPath},
argList => $argList,
};
+ from_to($args->{shareName}, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
+ from_to($args->{shareNameSlash}, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
$rsyncClientCmd = $bpc->cmdVarSubstitute($rsyncClientCmd, $args);
#
$remoteDir = $t->{shareNameSlash};
$remoteDirDaemon = ".";
}
+ from_to($remoteDir, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
+ from_to($remoteDirDaemon, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
+
if ( $t->{XferMethod} eq "rsync" ) {
#
# Run rsync command
my $str = "Running: "
. $t->{bpc}->execCmd2ShellCmd(@{$t->{rsyncClientCmd}})
. "\n";
+ from_to($str, $conf->{ClientCharset}, "utf8")
+ if ( $conf->{ClientCharset} ne "" );
$t->{XferLOG}->write(\$str);
$rs->remoteStart($remoteSend, $remoteDir);
} else {
#
my $module = $t->{shareName};
$module = $t->{shareNameSlash} if ( $module =~ /\// );
+ from_to($module, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
if ( defined(my $err = $rs->serverService($module,
$conf->{RsyncdUserName},
$conf->{RsyncdPasswd},
}
$rs->serverStart($remoteSend, $remoteDirDaemon);
}
- my $error = $rs->go($t->{shareNameSlash});
+ my $shareNameSlash = $t->{shareNameSlash};
+ from_to($shareNameSlash, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
+ my $error = $rs->go($shareNameSlash);
$rs->serverClose();
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
$fname = "$fio->{xfer}{pathHdrSrc}/$fname"
if ( defined($fio->{xfer}{pathHdrSrc}) );
$fname =~ s{//+}{/}g;
- if ( $fname =~ m{(.*)/(.*)} ) {
+ if ( $fname =~ m{(.*)/(.*)}s ) {
$shareM = $fio->{shareM};
$dir = $1;
$fname = $2;
my($fio, $f, $placeHolder) = @_;
my($dir, $file);
- if ( $f->{name} =~ m{(.*)/(.*)} ) {
+ if ( $f->{name} =~ m{(.*)/(.*)}s ) {
$file = $2;
$dir = "$fio->{shareM}/" . $1;
} elsif ( $f->{name} eq "." ) {
my $dir;
my $share;
- $dir = $1 if ( $d =~ m{.+?/(.*)} );
+ $dir = $1 if ( $d =~ m{.+?/(.*)}s );
$fio->viewCacheDir(undef, $dir);
##print("attribWrite $d,$dir\n");
##$Data::Dumper::Indent = 1;
if ( defined($fio->{viewCache}{$d}) ) {
foreach my $f ( keys(%{$fio->{viewCache}{$d}}) ) {
my $name = $f;
- $name = "$1/$name" if ( $d =~ m{.*?/(.*)} );
+ $name = "$1/$name" if ( $d =~ m{.*?/(.*)}s );
if ( defined(my $a = $fio->{attrib}{$d}->get($f)) ) {
#
# delete temporary attributes (skipped files)
my $dirM = $d;
$dirM = $1 . "/" . $fio->{bpc}->fileNameMangle($2)
- if ( $dirM =~ m{(.*?)/(.*)} );
+ if ( $dirM =~ m{(.*?)/(.*)}s );
my $fileName = $fio->{attrib}{$d}->fileName("$fio->{outDir}$dirM");
$fio->log("attribWrite(dir=$d) -> $fileName")
if ( $fio->{logLevel} >= 4 );
sub makePath
{
my($fio, $f) = @_;
- my $name = $1 if ( $f->{name} =~ /(.*)/ );
+ my $name = $1 if ( $f->{name} =~ /(.*)/s );
my $path;
if ( $name eq "." ) {
}
$fio->logFileAction("create", $f) if ( $fio->{logLevel} >= 1 );
$fio->log("makePath($path, 0777)") if ( $fio->{logLevel} >= 5 );
- $path = $1 if ( $path =~ /(.*)/ );
+ $path = $1 if ( $path =~ /(.*)/s );
File::Path::mkpath($path, 0, 0777) if ( !-d $path );
return $fio->attribSet($f) if ( -d $path );
$fio->log("Can't create directory $path");
sub makeSpecial
{
my($fio, $f) = @_;
- my $name = $1 if ( $f->{name} =~ /(.*)/ );
+ my $name = $1 if ( $f->{name} =~ /(.*)/s );
my $fNameM = $fio->{bpc}->fileNameMangle($name);
my $path = $fio->{outDirSh} . $fNameM;
my $attr = $fio->attribGet($f);
# need to open an output file where we will build the
# new version.
#
- $fio->{rxFile}{name} =~ /(.*)/;
+ $fio->{rxFile}{name} =~ /(.*)/s;
my $rxOutFileRel = "$fio->{shareM}/" . $fio->{bpc}->fileNameMangle($1);
my $rxOutFile = $fio->{outDir} . $rxOutFileRel;
$fio->{rxOutFd} = BackupPC::PoolWrite->new($fio->{bpc},
sub fileDeltaRxDone
{
my($fio, $md4, $phase) = @_;
- my $name = $1 if ( $fio->{rxFile}{name} =~ /(.*)/ );
+ my $name = $1 if ( $fio->{rxFile}{name} =~ /(.*)/s );
my $ret;
close($fio->{rxInFd}) if ( defined($fio->{rxInFd}) );
if ( $fio->{clientCharset} ne "" );
$fList->encode($f);
- $logName = "$fio->{xfer}{pathHdrDest}/$f->{name}";
+ $logName = "$fio->{xfer}{pathHdrDest}/$logName";
$logName =~ s{//+}{/}g;
$f->{name} = $logName;
$fio->logFileAction("restore", $f) if ( $fio->{logLevel} >= 1 );
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
package BackupPC::Xfer::Smb;
use strict;
+use Encode qw/from_to encode/;
sub new
{
$t->{fileIncludeHash} = {};
if ( defined($conf->{BackupFilesOnly}{$t->{shareName}}) ) {
foreach my $file ( @{$conf->{BackupFilesOnly}{$t->{shareName}}} ) {
+ $file = encode($conf->{ClientCharset}, $file)
+ if ( $conf->{ClientCharset} ne "" );
push(@fileList, $file);
$t->{fileIncludeHash}{$file} = 1;
}
} elsif ( defined($conf->{BackupFilesExclude}{$t->{shareName}}) ) {
foreach my $file ( @{$conf->{BackupFilesExclude}{$t->{shareName}}} )
{
+ $file = encode($conf->{ClientCharset}, $file)
+ if ( $conf->{ClientCharset} ne "" );
push(@fileList, $file);
}
#
X_option => $X_option,
timeStampFile => $timeStampFile,
};
+ from_to($args->{shareName}, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
$smbClientCmd = $bpc->cmdVarSubstitute($smbClientCmd, $args);
if ( !defined($t->{xferPid} = open(SMB, "-|")) ) {
return;
}
my $str = "Running: " . $bpc->execCmd2ShellCmd(@$smbClientCmd) . "\n";
+ from_to($str, $conf->{ClientCharset}, "utf8")
+ if ( $conf->{ClientCharset} ne "" );
$t->{XferLOG}->write(\$str);
alarm($conf->{ClientTimeout});
$t->{_errStr} = undef;
#
alarm($conf->{ClientTimeout}) if ( !$t->{abort} );
$t->{lastOutputLine} = $_ if ( !/^$/ );
+
+ from_to($_, $conf->{ClientCharset}, "utf8")
+ if ( $conf->{ClientCharset} ne "" );
#
# This section is highly dependent on the version of smbclient.
# If you upgrade Samba, make sure that these regexp are still valid.
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
package BackupPC::Xfer::Tar;
use strict;
+use Encode qw/from_to encode/;
sub new
{
if ( defined($conf->{BackupFilesExclude}{$t->{shareName}}) ) {
foreach my $file ( @{$conf->{BackupFilesExclude}{$t->{shareName}}} )
{
- $file = ".$file" if ( $file =~ /^\// );
+ $file = $2 if ( $file =~ m{^(\./+|/+)(.*)}s );
+ $file = "./$file";
+ $file = encode($conf->{ClientCharset}, $file)
+ if ( $conf->{ClientCharset} ne "" );
push(@fileList, "--exclude=$file");
}
}
if ( defined($conf->{BackupFilesOnly}{$t->{shareName}}) ) {
foreach my $file ( @{$conf->{BackupFilesOnly}{$t->{shareName}}} ) {
- $file = ".$file" if ( $file =~ /^\// );
+ $file = $2 if ( $file =~ m{^(\./+|/+)(.*)}s );
+ $file = "./$file";
+ $file = encode($conf->{ClientCharset}, $file)
+ if ( $conf->{ClientCharset} ne "" );
push(@fileList, $file);
}
} else {
tarPath => $conf->{TarClientPath},
sshPath => $conf->{SshPath},
};
+ from_to($args->{shareName}, "utf8", $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
$tarClientCmd = $bpc->cmdVarSubstitute($tarClientCmd, $args);
if ( !defined($t->{xferPid} = open(TAR, "-|")) ) {
$t->{_errStr} = "Can't fork to run tar";
return;
}
my $str = "Running: " . $bpc->execCmd2ShellCmd(@$tarClientCmd) . "\n";
+ from_to($str, $conf->{ClientCharset}, "utf8")
+ if ( $conf->{ClientCharset} ne "" );
$t->{XferLOG}->write(\"Running: @$tarClientCmd\n");
alarm($conf->{ClientTimeout});
$t->{_errStr} = undef;
$t->{tarOut} .= $mesg;
}
}
+ my $logFileThres = $t->{type} eq "restore" ? 1 : 2;
while ( $t->{tarOut} =~ /(.*?)[\n\r]+(.*)/s ) {
$_ = $1;
$t->{tarOut} = $2;
+ from_to($_, $conf->{ClientCharset}, "utf8")
+ if ( $conf->{ClientCharset} ne "" );
#
# refresh our inactivity alarm
#
$t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 1 );
$t->{xferOK} = 1;
} elsif ( /^\./ ) {
- $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
+ $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= $logFileThres );
$t->{fileCnt}++;
} else {
#
#
#========================================================================
#
-# Version 3.0.0beta0, released 11 Jul 2006.
+# Version 3.0.0beta1, released 30 Jul 2006.
#
# See http://backuppc.sourceforge.net.
#
umask(0022);
-my $Version = "3.0.0beta0";
-my $ReleaseDate = "11 Jul 2006";
+my $Version = "3.0.0beta1";
+my $ReleaseDate = "30 Jul 2006";
my $DistDir = "dist/BackupPC-$Version";
my @PerlSrc = qw(