# Version __VERSION__, __RELEASEDATE__
#------------------------------------------------------------------------
+* Fixed handling of >= 8GB files in BackupPC_tarExtract and >= 4GB
+ files in BackupPC_tarCreate.
+
+* Removed smbclient size repair in BackupPC_tarExtract for files
+ between 2GB and 4GB. This means that BackupPC_tarExtract 2.0.1
+ doesn't behave the same as 2.0.0 for file sizes between 2GB and 4GB
+ extacted using smbclient 2.2.x. If you have problems backing up
+ files whose size is between 2GB and 4GB using smbclient 2.2.x
+ you should upgrade smbclient to 3.0, since it now generates
+ correct file sizes.
+
+* Fixed additional print to stdout for BackupPC_dump -v in
+ BackupPC::FileZIO. Now prints to stderr.
+
+#------------------------------------------------------------------------
+# Version 2.0.1beta1, 13 Sep 2003
+#------------------------------------------------------------------------
+
* Fixed handling of $Conf{HardLinkMax} in BackupPC/Lib.pm. Reported
by Ross Skaliotis.
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC: Main program for PC backups.
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
use vars qw(%Status %Info $Hosts);
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_compressPool: Compress existing pool
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use File::Path;
use Compress::Zlib;
use Getopt::Std;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_dump: Dump a single client.
#
#========================================================================
#
-# Version 2.0.0, released 14 Jun 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
use BackupPC::Xfer::Smb;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_link: link new backup into pool
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::Attrib;
use BackupPC::PoolWrite;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_nightly: Nightly cleanup & statistics script.
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_restore: Restore files to a client.
#
#========================================================================
#
-# Version 2.0.0, released 14 Jun 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
use BackupPC::Xfer::Smb;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_sendEmail: send status emails to users and admins
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_serverMesg: Send one or more commands to the BackupPC server.
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_tarCreate: create a tar archive of an existing dump
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use File::Path;
use Getopt::Std;
use BackupPC::Lib;
: "";
my $devminor = defined($hdr->{devminor}) ? sprintf("%07o", $hdr->{devminor})
: "";
+ my $sizeStr;
+ if ( $hdr->{size} >= 2 * 65536 * 65536 ) {
+ #
+ # GNU extension for files >= 8GB: send size in big-endian binary
+ #
+ $sizeStr = pack("c4 N N", 0x80, 0, 0, 0,
+ $hdr->{size} / (65536 * 65536),
+ $hdr->{size} % (65536 * 65536));
+ } elsif ( $hdr->{size} >= 1 * 65536 * 65536 ) {
+ #
+ # sprintf octal only handles up to 2^32 - 1
+ #
+ my $sizeStr = sprintf("%03o", $hdr->{size} / (1 << 24))
+ . sprintf("%08o", $hdr->{size} % (1 << 24));
+ } else {
+ $sizeStr = sprintf("%011o", $hdr->{size});
+ }
my $data = pack($tar_pack_header,
substr($hdr->{name}, 0, 99),
sprintf("%07o", $hdr->{mode}),
sprintf("%07o", $hdr->{uid}),
sprintf("%07o", $hdr->{gid}),
- sprintf("%011o", $hdr->{size}),
+ $sizeStr,
sprintf("%011o", $hdr->{mtime}),
"", #checksum field - space padded by pack("A8")
$hdr->{type},
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_tarExtract: extract data from a dump
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::Attrib qw(:all);
use BackupPC::FileZIO;
$mode = oct $mode;
$uid = oct $uid;
$gid = oct $gid;
- $size =~ s/^6/2/; # fix bug in smbclient for >=2GB files
- $size =~ s/^7/3/; # fix bug in smbclient for >=2GB files
- $size = oct $size;
+ if ( ord($size) == 128 ) {
+ #
+ # GNU tar extension: for >=8GB files the size is stored
+ # in big endian binary.
+ #
+ $size = 65536 * 65536 * unpack("N", substr($size, 4, 4))
+ + unpack("N", substr($size, 8, 4));
+ } else {
+ #
+ # We used to have a patch here for smbclient 2.2.x. For file
+ # sizes between 2 and 4GB it sent the wrong size. But since
+ # samba 3.0.0 has been released we no longer support this
+ # patch since valid files could have sizes that start with
+ # 6 or 7 in octal (eg: 6-8GB files).
+ #
+ # $size =~ s/^6/2/; # fix bug in smbclient for >=2GB files
+ # $size =~ s/^7/3/; # fix bug in smbclient for >=2GB files
+ #
+ # To avoid integer overflow in case we are in the 4GB - 8GB
+ # range, we do the conversion in two parts.
+ #
+ $size = oct(substr($size, 0, 2)) * (1 << 24)
+ + oct(substr($size, 3));
+ }
$mtime = oct $mtime;
$chksum = oct $chksum;
$devmajor = oct $devmajor;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_trashClean: remove all the files in $TopDir/trash.
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
die("BackupPC::Lib->new failed\n") if ( !(my $bpc = BackupPC::Lib->new) );
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_zcat: uncompress files to stdout
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use Compress::Zlib;
use BackupPC::FileZIO;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_zipCreate: create a zip archive of an existing dump
# Based on Backup_tarCreate by Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2002-2003 Craig Barratt and Guillaume Filion
+# Copyright (C) 2002 Craig Barratt and Guillaume Filion
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use Archive::Zip qw(:ERROR_CODES);
use File::Path;
use Getopt::Std;
-#!/bin/perl -T
+#!/bin/perl
#============================================================= -*-perl-*-w
#
# BackupPC_Admin: Apache/CGI interface for BackupPC.
#
#========================================================================
#
-# Version 2.0.0, released 14 Jun 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
use strict;
no utf8;
use CGI;
-use lib "/usr/local/BackupPC/lib";
+use lib "/usr/local/BackupPC2.0.1/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
use BackupPC::Attrib qw(:all);
if ( /smb: \\>/
|| /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/
|| /^tar: dumped \d+ files/
- || /^added interface/i
- || /^restore tar file /i
- || /^restore directory /i
- || /^tarmode is now/i
- || /^Total bytes written/i
- || /^Domain=/i
- || /^Getting files newer than/i
- || /^Output is \/dev\/null/
+ || /^\s*added interface/i
+ || /^\s*restore tar file /i
+ || /^\s*restore directory /i
+ || /^\s*tarmode is now/i
+ || /^\s*Total bytes written/i
+ || /^\s*Domain=/i
+ || /^\s*Getting files newer than/i
+ || /^\s*Output is \/dev\/null/
|| /^\([\d\.]* kb\/s\) \(average [\d\.]* kb\/s\)$/
|| /^\s+directory \\/
- || /^Timezone is/
+ || /^\s*Timezone is/
+ || /^\s*creating lame (up|low)case table/i
|| /^\.\//
|| /^ /
) {
};
#
-# Additional CGI header text. For example, if you wanted each CGI page
-# to auto refresh every 900 seconds, you could add this text:
-#
-# <meta http-equiv="refresh" content="900">
+# Additional CGI header text.
#
$Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
If you are using smb to backup WinXX machines you need smbclient and
nmblookup from the samba package. You will also need nmblookup if
you are backing up linux/unix DHCP machines. See L<http://www.samba.org>.
-Version 2.2.0 or later of Samba is required (smbclient's tar feature in
-2.0.8 and prior has bugs for file path lengths around 100 characters
-and generates bad output when file lengths change during the backup).
+Version 2.2.0 or later of Samba is required.
See L<http://www.samba.org> for source and binaries. It's pretty easy to
fetch and compile samba, and just grab smbclient and nmblookup, without
doing the installation. Alternatively, L<http://www.samba.org> has binary
distributions for most platforms.
-Note: samba version 3.0.0rc2 (the latest version as of 9/1/03) still
-has several smbclient bugs. If you want to use samba 3.0.0, be sure
-to use the latest release. If that's still rc2, please apply the
-following patches:
+Note: samba version 3.0.0 (the first official 3.0 release as of 9/24/03)
+still has two known smbclient bugs. If you want to use samba 3.0.0, be sure
+to use the latest release. For 3.0.0 please apply the following two patches:
- https://bugzilla.samba.org/show_bug.cgi?id=308
- https://bugzilla.samba.org/show_bug.cgi?id=388
https://bugzilla.samba.org/show_bug.cgi?id=389
+ https://bugzilla.samba.org/show_bug.cgi?id=563
-Hopefully any release after 3.0.0rc2 will have all these patches
-applied.
+Hopefully any release after 3.0.0 will have these patches applied.
+Smbclient does not work correctly in earlier versions of 3.0.0
+(eg: 3.0.0rc1); you must use the official 3.0.0.
=item *
GNU tar maximum file size is limited by the tar header format. The tar
header uses 11 octal digits to represent the file size, which is 33 bits
-or 8GB. I vaguely recall (but I haven't recently checked) that GNU tar
-uses an extra octal digit (replacing a trailing delimiter) if necessary,
-allowing 64GB files. So tar transport limits the maximum file size to
-8GB or perhaps 64GB. It is possible that files >= 8GB don't work; this
-needs to be looked into.
-
-Smbclient is limited to 4GB file sizes. Moreover, a bug in smbclient
-(mixing signed and unsigned 32 bit values) causes it to incorrectly
-do the tar octal conversion for file sizes from 2GB-4GB. BackupPC_tarExtract
-knows about this bug and can recover the correct file size. So smbclient
-transport works up to 4GB file sizes.
-
-Rsync running on Cygwin is limited to either 2GB or 4GB file sizes.
-More testing needs to be done to verify the file size limit for
-rsync on various platforms.
+or 8GB. But GNU tar has a binary file size convention for files bigger
+than 8GB, which is supported in BackupPC as of 2.0.1. So GNU tar can
+support very large files.
+
+Smbclient 2.2.x is limited to 4GB file sizes. Moreover, a bug in
+smbclient (mixing signed and unsigned 32 bit values) causes it to
+incorrectly do the tar octal conversion for file sizes from 2GB-4GB.
+Up to 2.0.0, BackupPC_tarExtract knows about this bug and can recover
+the correct file size. So smbclient 2.2.x transport works up to 4GB
+file sizes with BackupPC 2.0.0.
+
+But as of BackupPC 2.0.1 this repair was removed. The reason is
+that smbclient 3.0.x now supports large files, so it can validly
+generate file sizes that would have been incorrectly "repaired" by
+BackupPC_tarExtract. So with smbclient 3.0.x and BackupPC 2.0.1
+or later, files bigger than 4GB are supported. Files larger than
+8GB have been tested, provided the patch in this smbclient bug
+is applied to samba 3.0.0:
+
+ https://bugzilla.samba.org/show_bug.cgi?id=563
+
+However, due to some bug in smbclient, restores only work up to 2GB file
+sizes. This is mentioned in this bug report.
+
+Rsync running on linux supports large files, bigger than 4GB.
+Cygwin 1.3.x is limited to either 2GB or 4GB file sizes. Cygwin
+1.5.x allows large file support but I haven't tested it yet with
+rsync. More testing needs to be done to verify the file size
+limit for rsync on various platforms.
=back
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
my $n = length($$dataRef);
return if ( !$self->{write} );
- print($$dataRef) if ( $self->{writeTeeStdout} );
+ print(STDERR $$dataRef) if ( $self->{writeTeeStdout} );
return 0 if ( $n == 0 );
if ( !$self->{compress} ) {
#
<li> Sie browsen das Backup #\$num, erstellt am \$backupTime
(vor \$backupAge Tagen),
\$filledBackup
-<li> Klicken Sie auf ein Verzeichnis um dieses zu durchsuchen,
-<li> Klicken Sie auf eine Datei um diese per download wiederherzustellen,
-<li> (ENGLISH) You can view the backup <a href="\$MyURL?action=dirHistory&host=\${EscURI(\$host)}&share=\$shareURI&dir=\$pathURI">history</a> of the current directory.
+<li> Klicken Sie auf ein Verzeichnis um dieses zu durchsuchen.
+<li> Klicken Sie auf eine Datei um diese per download wiederherzustellen.
</ul>
\${h2("Inhalt von \${EscHTML(\$dirDisplay)}")}
</form>
EOF
-# ------------------------------
-$Lang{DirHistory_backup_for__host} = "(ENGLISH) BackupPC: Directory backup history for \$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} = "(ENGLISH) dir";
-$Lang{DirHistory_fileLink} = "(ENGLISH) v";
-
-$Lang{DirHistory_for__host} = <<EOF;
-\${h1("Directory backup history for \$host")}
-(ENGLISH)
-<p>
-This display shows each unique version of files across all
-the backups:
-<ul>
-<li> Click on a backup number to return to the backup browser,
-<li> Click on a directory link (\$Lang->{DirHistory_dirLink}) to navigate
- into that directory,
-<li> Click on a file version link (\$Lang->{DirHistory_fileLink}0,
- \$Lang->{DirHistory_fileLink}1, ...) to download that file,
-<li> Files with the same contents between different backups have the same
- version number,
-<li> Files or directories not present in a particular backup have an
- empty box.
-<li> Files shown with the same version might have different attributes.
- Select the backup number to see the file attributes.
-</ul>
-
-\${h2("History of \${EscHTML(\$dirDisplay)}")}
-
-<br>
-<table border bgcolor="#ffffcc">
-<tr bgcolor="\$Conf{CgiHeaderBgColor}"><td>Backup number</td>\$backupNumStr</tr>
-<tr bgcolor="\$Conf{CgiHeaderBgColor}"><td>Backup time</td>\$backupTimeStr</tr>
-\$fileStr
-</table>
-EOF
-
# ------------------------------
$Lang{Restore___num_details_for__host} = "BackupServer: Restore #\$num Details für Computer \$host";
(\$backupAge days ago),
\$filledBackup
<li> Click on a directory below to navigate into that directory,
-<li> Click on a file below to restore that file,
-<li> You can view the backup <a href="\$MyURL?action=dirHistory&host=\${EscURI(\$host)}&share=\$shareURI&dir=\$pathURI">history</a> of the current directory.
+<li> Click on a file below to restore that file.
</ul>
\${h2("Contents of \${EscHTML(\$dirDisplay)}")}
</form>
EOF
-# ------------------------------
-$Lang{DirHistory_backup_for__host} = "BackupPC: Directory backup history for \$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} = <<EOF;
-\${h1("Directory backup history for \$host")}
-<p>
-This display shows each unique version of files across all
-the backups:
-<ul>
-<li> Click on a backup number to return to the backup browser,
-<li> Click on a directory link (\$Lang->{DirHistory_dirLink}) to navigate
- into that directory,
-<li> Click on a file version link (\$Lang->{DirHistory_fileLink}0,
- \$Lang->{DirHistory_fileLink}1, ...) to download that file,
-<li> Files with the same contents between different backups have the same
- version number,
-<li> Files or directories not present in a particular backup have an
- empty box.
-<li> Files shown with the same version might have different attributes.
- Select the backup number to see the file attributes.
-</ul>
-
-\${h2("History of \${EscHTML(\$dirDisplay)}")}
-
-<br>
-<table border bgcolor="#ffffcc">
-<tr bgcolor="\$Conf{CgiHeaderBgColor}"><td>Backup number</td>\$backupNumStr</tr>
-<tr bgcolor="\$Conf{CgiHeaderBgColor}"><td>Backup time</td>\$backupTimeStr</tr>
-\$fileStr
-</table>
-EOF
-
# ------------------------------
$Lang{Restore___num_details_for__host} = "BackupPC: Restore #\$num details for \$host";
(hace \$backupAge dias),
\$filledBackup
<li> Haga click en uno de los directorios de abajo para revisar sus contenidos,
-<li> Haga click en un archivo para restaurarlo,
-<li> (ENGLISH) You can view the backup <a href="\$MyURL?action=dirHistory&host=\${EscURI(\$host)}&share=\$shareURI&dir=\$pathURI">history</a> of the current directory.
+<li> Haga click en un archivo para restaurarlo.
</ul>
\${h2("Contenido de \${EscHTML(\$dirDisplay)}")}
</form>
EOF
-# ------------------------------
-$Lang{DirHistory_backup_for__host} = "(ENGLISH) BackupPC: Directory backup history for \$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} = "(ENGLISH) dir";
-$Lang{DirHistory_fileLink} = "(ENGLISH) v";
-
-$Lang{DirHistory_for__host} = <<EOF;
-\${h1("Directory backup history for \$host")}
-(ENGLISH)
-<p>
-This display shows each unique version of files across all
-the backups:
-<ul>
-<li> Click on a backup number to return to the backup browser,
-<li> Click on a directory link (\$Lang->{DirHistory_dirLink}) to navigate
- into that directory,
-<li> Click on a file version link (\$Lang->{DirHistory_fileLink}0,
- \$Lang->{DirHistory_fileLink}1, ...) to download that file,
-<li> Files with the same contents between different backups have the same
- version number,
-<li> Files or directories not present in a particular backup have an
- empty box.
-<li> Files shown with the same version might have different attributes.
- Select the backup number to see the file attributes.
-</ul>
-
-\${h2("History of \${EscHTML(\$dirDisplay)}")}
-
-<br>
-<table border bgcolor="#ffffcc">
-<tr bgcolor="\$Conf{CgiHeaderBgColor}"><td>Backup number</td>\$backupNumStr</tr>
-<tr bgcolor="\$Conf{CgiHeaderBgColor}"><td>Backup time</td>\$backupTimeStr</tr>
-\$fileStr
-</table>
-EOF
-
# ------------------------------
$Lang{Restore___num_details_for__host} = "BackupPC: Detalles de la restauración Nº\$num de \$host";
(il y a \$backupAge jours),
\$filledBackup
<li> Cliquer dans un répertoire ci-dessous pour y naviguer,
-<li> Cliquer dans un fichier ci-dessous pour le restaurer,
-<li> Vous pouvez voir l'<a href="\$MyURL?action=dirHistory&host=\${EscURI(\$host)}&share=\$shareURI&dir=\$pathURI">historique</a> de sauvegarde du répertoire courant.
+<li> Cliquer dans un fichier ci-dessous pour le restaurer.
</ul>
\${h2("Contenu de \${EscHTML(\$dirDisplay)}")}
</form>
EOF
-# ------------------------------
-$Lang{DirHistory_backup_for__host} = "BackupPC: Historique de sauvegarde des répertoires de \$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} = "(ENGLISH) dir";
-$Lang{DirHistory_fileLink} = "(ENGLISH) v";
-
-$Lang{DirHistory_for__host} = <<EOF;
-\${h1("Historique de sauvegarde des répertoires de \$host")}
-<p>
-Voici les versions des fichiers pour toutes les sauvegardes:
-<ul>
-<li> Cliquez sur un numéro de sauvegarde pour revenir à la navigation de sauvegarde,
-<li> Cliquez sur un répertoire (\$Lang->{DirHistory_dirLink}) pour naviguer
- dans celui-ci,
-<li> Cliquez sur une version d'un fichier (\$Lang->{DirHistory_fileLink}0,
- \$Lang->{DirHistory_fileLink}1, ...) pour la télécharger.
-<li> (ENGLISH) Files with the same contents between different backups have the same
- version number,
-<li> (ENGLISH) Files or directories not present in a particular backup have an
- empty box.
-<li> (ENGLISH) Files shown with the same version might have different attributes.
- Select the backup number to see the file attributes.
-</ul>
-
-\${h2("Historique de \${EscHTML(\$dirDisplay)}")}
-
-<br>
-<table border bgcolor="#ffffcc">
-<tr bgcolor="\$Conf{CgiHeaderBgColor}"><td>No. de sauvegarde</td>\$backupNumStr</tr>
-<tr bgcolor="\$Conf{CgiHeaderBgColor}"><td>Date</td>\$backupTimeStr</tr>
-\$fileStr
-</table>
-EOF
# ------------------------------
+
$Lang{Restore___num_details_for__host} = "BackupPC: Détails de la restauration n° \$num pour \$host";
$Lang{Restore___num_details_for__host2 } = <<EOF;
#
#========================================================================
#
-# Version 2.0.0, released 14 Jun 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
my($topDir, $installDir, $noUserCheck) = @_;
my $bpc = bless {
- TopDir => $topDir || '/data/BackupPC',
- BinDir => $installDir || '/usr/local/BackupPC',
- LibDir => $installDir || '/usr/local/BackupPC',
- Version => '2.0.0',
+ TopDir => $topDir || '/data/BackupPC2.0.1',
+ BinDir => $installDir || '/usr/local/BackupPC2.0.1',
+ LibDir => $installDir || '/usr/local/BackupPC2.0.1',
+ Version => '2.0.1',
BackupFields => [qw(
num type startTime endTime
nFiles size nFilesExist sizeExist nFilesNew sizeNew
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2002-2003 Craig Barratt
+# Copyright (C) 2002 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
return @backupList;
}
-#
-# Return the history of all backups for a particular directory
-#
-sub dirHistory
-{
- my($m, $share, $dir) = @_;
- my($i, $level);
- my $files = {};
-
- $dir = "/$dir" if ( $dir !~ m{^/} );
- $dir =~ s{/+$}{};
-
- #
- # merge backups, starting at the first one, and working
- # forward.
- #
- for ( $i = 0 ; $i < @{$m->{backups}} ; $i++ ) {
- $level = $m->{backups}[$i]{level};
- my $backupNum = $m->{backups}[$i]{num};
- my $mangle = $m->{backups}[$i]{mangle};
- my $compress = $m->{backups}[$i]{compress};
- my $path = "$m->{topDir}/pc/$m->{host}/$backupNum/";
- my $sharePathM;
- if ( $mangle ) {
- $sharePathM = $m->{bpc}->fileNameEltMangle($share)
- . $m->{bpc}->fileNameMangle($dir);
- } else {
- $sharePathM = $share . $dir;
- }
- $path .= $sharePathM;
- #print(STDERR "Opening $path (share=$share)\n");
- if ( !opendir(DIR, $path) ) {
- #
- # Oops, directory doesn't exist.
- #
- next;
- }
- my @dir = readdir(DIR);
- closedir(DIR);
- my $attr;
- if ( $mangle ) {
- $attr = BackupPC::Attrib->new({ compress => $compress });
- if ( -f $attr->fileName($path) && !$attr->read($path) ) {
- $m->{error} = "Can't read attribute file in $path";
- $attr = undef;
- }
- }
- foreach my $file ( @dir ) {
- $file = $1 if ( $file =~ /(.*)/ );
- my $fileUM = $file;
- $fileUM = $m->{bpc}->fileNameUnmangle($fileUM) if ( $mangle );
- #print(STDERR "Doing $fileUM\n");
- #
- # skip special files
- #
- next if ( $file eq ".."
- || $file eq "."
- || $mangle && $file eq "attrib"
- || defined($files->{$fileUM}[$i]) );
- my @s = stat("$path/$file");
- if ( defined($attr) && defined(my $a = $attr->get($fileUM)) ) {
- $files->{$fileUM}[$i] = $a;
- $attr->set($fileUM, undef);
- } else {
- #
- # Very expensive in the non-attribute case when compresseion
- # is on. We have to stat the file and read compressed files
- # to determine their size.
- #
- $files->{$fileUM}[$i] = {
- type => -d _ ? BPC_FTYPE_DIR : BPC_FTYPE_FILE,
- mode => $s[2],
- uid => $s[4],
- gid => $s[5],
- size => -f _ ? $s[7] : 0,
- mtime => $s[9],
- };
- if ( $compress && -f _ ) {
- #
- # Compute the correct size by reading the whole file
- #
- my $f = BackupPC::FileZIO->open("$path/$file",
- 0, $compress);
- if ( !defined($f) ) {
- $m->{error} = "Can't open $path/$file";
- } else {
- my($data, $size);
- while ( $f->read(\$data, 65636 * 8) > 0 ) {
- $size += length($data);
- }
- $f->close;
- $files->{$fileUM}[$i]{size} = $size;
- }
- }
- }
- $files->{$fileUM}[$i]{relPath} = "$dir/$fileUM";
- $files->{$fileUM}[$i]{sharePathM} = "$sharePathM/$file";
- $files->{$fileUM}[$i]{fullPath} = "$path/$file";
- $files->{$fileUM}[$i]{backupNum} = $backupNum;
- $files->{$fileUM}[$i]{compress} = $compress;
- $files->{$fileUM}[$i]{nlink} = $s[3];
- $files->{$fileUM}[$i]{inode} = $s[1];
- }
-
- #
- # Merge old backups. Don't merge directories from old
- # backups because every backup has an accurate directory
- # tree.
- #
- for ( my $k = $i - 1 ; $level > 0 && $k >= 0 ; $k-- ) {
- next if ( $m->{backups}[$k]{level} >= $level );
- $level = $m->{backups}[$k]{level};
- foreach my $fileUM ( keys(%$files) ) {
- next if ( !defined($files->{$fileUM}[$k])
- || defined($files->{$fileUM}[$i])
- || $files->{$fileUM}[$k]{type} == BPC_FTYPE_DIR );
- $files->{$fileUM}[$i] = $files->{$fileUM}[$k];
- }
- }
-
- #
- # Finally, remove deleted files
- #
- if ( defined($attr) ) {
- my $a = $attr->get;
- foreach my $fileUM ( keys(%$a) ) {
- next if ( $a->{$fileUM}{type} != BPC_FTYPE_DELETED );
- $files->{$fileUM}[$i] = undef if ( defined($files->{$fileUM}) );
- }
- }
- }
- #print STDERR "Returning:\n", Dumper($files);
- return $files;
-}
-
-
#
# Do a recursive find starting at the given path (either a file
# or directory). The callback function $callback is called on each
#
#========================================================================
#
-# Version 2.0.0, released 14 Jun 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2002-2003 Craig Barratt
+# Copyright (C) 2002 Craig Barratt
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
#
#========================================================================
#
-# Version 2.0.0, released 14 Jun 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
# ignore the log file time stamps from smbclient introduced
# in version 3.0.0 - don't even write them to the log file.
#
- next if ( m{^\[\d+/\d+/\d+ +\d+:\d+:\d+.*\] +client/cli.*\(\d+\)} );
+ next if ( m{^\[\d+/\d+/\d+ +\d+:\d+:\d+.*\] +(client/cli|lib/util_unistr).*\(\d+\)} );
$t->{XferLOG}->write(\"$_\n");
#
# refresh our inactivity alarm
|| /^\s*directory \\/i
|| /^\s*restore directory \\/i
|| /^\s*Output is \/dev\/null/i
- || /^\s*Timezone is/i ) {
+ || /^\s*Timezone is/i
+ || /^\s*creating lame (up|low)case table/i
+ ) {
# ignore these messages
} else {
$t->{xferErrCnt}++;
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001-2003 Craig Barratt
+# Copyright (C) 2001 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
# Based on Archive::Zip::FileMember, Copyright (c) 2000 Ned Konz.
#
# COPYRIGHT
-# Copyright (C) 2002-2003 Craig Barratt
+# Copyright (C) 2002 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 2.1.0_CVS, released 3 Jul 2003.
+# Version 2.0.1, released 5 Oct 2003.
#
# See http://backuppc.sourceforge.net.
#
umask(0022);
-my $Version = "2.0.1beta1";
-my $ReleaseDate = "13 Sep 2003";
+my $Version = "2.0.1";
+my $ReleaseDate = "5 Oct 2003";
my $DistDir = "dist/BackupPC-$Version";
my @PerlSrc = qw(
}
if ( /__CONFIGPOD__/ ) {
print OUT $ConfPod;
- } elsif ( /^use lib ".*BackupPC\/lib";/
+ } elsif ( /^use lib ".*BackupPC[^\/]*\/lib";/
|| /^use lib "\/home\/pcbackup\/install\/lib";/ ) {
print OUT "use lib \"__INSTALLDIR__/lib\";\n";
} elsif ( $file =~ /Lib.pm/ && /(.*TopDir *=> .*)'.*',/ ) {