--- backuppc-3.3.1.orig/bin/BackupPC +++ backuppc-3.3.1/bin/BackupPC @@ -363,11 +363,11 @@ # Write out our initial status and save our PID # StatusWrite(); - unlink("$LogDir/BackupPC.pid"); - if ( open(PID, ">", "$LogDir/BackupPC.pid") ) { + unlink("/var/run/backuppc/BackupPC.pid"); + if ( open(PID, ">", "/var/run/backuppc/BackupPC.pid") ) { print(PID $$); close(PID); - chmod(0444, "$LogDir/BackupPC.pid"); + chmod(0444, "/var/run/backuppc/BackupPC.pid"); } # @@ -1198,6 +1198,15 @@ $Info{"${p}FileRepMax"}, $Info{"${p}FileLinkMax"}, $Info{"${p}DirCnt"}); } + if (-x "/usr/bin/rrdtool") { + my $date = time() + (24*3600); + if (! -f "$LogDir/pool.rrd") { + system("/usr/bin/rrdtool create $LogDir/pool.rrd --step 86400 DS:ckb:GAUGE:172800:0:U RRA:AVERAGE:0.5:1:1400"); + } + system("/usr/bin/rrdtool update $LogDir/pool.rrd --template ckb $date:".($Info{"cpoolKb"}+$Info{"poolKb"})); + #print(LOG $bpc->timeStamp, "RRD data\n"); + #print(LOG $bpc->timeStamp, "RRD data: ".($Info{"cpoolKb"}+$Info{"poolKb"})."\n"); + } } } else { $CmdJob = ""; @@ -1846,7 +1855,7 @@ close(LOG); LogFileOpen(); print(LOG "Fatal error: unhandled signal $SigName\n"); - unlink("$LogDir/BackupPC.pid"); + unlink("/var/run/backuppc/BackupPC.pid"); confess("Got new signal $SigName... quitting\n"); } else { $SigName = shift; @@ -1968,7 +1977,7 @@ } delete($Info{pid}); StatusWrite(); - unlink("$LogDir/BackupPC.pid"); + unlink("/var/run/backuppc/BackupPC.pid"); exit(1); } --- backuppc-3.3.1.orig/bin/BackupPC_archive +++ backuppc-3.3.1/bin/BackupPC_archive @@ -299,7 +299,7 @@ if ( $NeedPostCmd ) { UserCommandRun("ArchivePostUserCmd"); if ( $? && $Conf{UserCmdCheckStatus} ) { - $stat{hostError} = "RestorePreUserCmd returned error status $?"; + $stat{hostError} = "ArchivePostUserCmd returned error status $?"; $stat{xferOK} = 0; } } --- backuppc-3.3.1.orig/bin/BackupPC_dump +++ backuppc-3.3.1/bin/BackupPC_dump @@ -92,6 +92,7 @@ use BackupPC::Xfer; use Encode; use Socket; +use Socket6; use File::Path; use File::Find; use Getopt::Std; @@ -493,7 +494,7 @@ } else { $host = $client; } - if ( !defined(gethostbyname($host)) ) { + if ( defined(getaddrinfo($host, "22")) ) { # # Ok, NS doesn't know about it. Maybe it is a NetBios name # instead. @@ -1065,7 +1066,7 @@ # Send ALRMs to BackupPC_tarExtract if we are using it # if ( $tarPid > 0 ) { - kill($bpc->sigName2num("ARLM"), $tarPid); + kill($bpc->sigName2num("ALRM"), $tarPid); } # --- backuppc-3.3.1.orig/bin/BackupPC_restore +++ backuppc-3.3.1/bin/BackupPC_restore @@ -42,6 +42,7 @@ use BackupPC::FileZIO; use BackupPC::Xfer; use Socket; +use Socket6; use File::Path; use Getopt::Std; @@ -167,7 +168,7 @@ # Find its IP address # if ( $hostIP !~ /\d+\.\d+\.\d+\.\d+/ ) { - if ( !defined(gethostbyname($host)) ) { + if ( defined(getaddrinfo($host, "22")) ) { # # Ok, NS doesn't know about it. Maybe it is a NetBios name # instead. --- backuppc-3.3.1.orig/conf/config.pl +++ backuppc-3.3.1/conf/config.pl @@ -1650,6 +1650,7 @@ # $Conf{PingPath} = '/bin/echo'; # $Conf{PingPath} = ''; +$Conf{Ping6Path} = ''; # # Ping command. The following variables are substituted at run-time: --- backuppc-3.3.1.orig/conf/hosts +++ backuppc-3.3.1/conf/hosts @@ -54,3 +54,4 @@ host dhcp user moreUsers # <--- do not edit this line #farside 0 craig jill,jeff # <--- example static IP host entry #larson 1 bill # <--- example DHCP host entry +localhost 0 backuppc --- backuppc-3.3.1.orig/configure.pl +++ backuppc-3.3.1/configure.pl @@ -243,6 +243,8 @@ $Conf{LogDir} ||= $opts{"log-dir"} || "$Conf{TopDir}/log"; } +$Conf{ConfDir} = "/etc/backuppc"; + # # These are the programs whose paths we need to find # @@ -253,6 +255,7 @@ nmblookup => "NmbLookupPath", rsync => "RsyncClientPath", ping => "PingPath", + ping6 => "Ping6Path", df => "DfPath", 'ssh/ssh2' => "SshPath", sendmail => "SendmailPath", @@ -333,7 +336,10 @@ $Conf{BackupPCUser} || "backuppc", "backuppc-user"); if ( $opts{"set-perms"} ) { - ($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser}); + #($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser}); + $name = "backuppc"; + $Uid = 0; + $Gid = 0; last if ( $name ne "" ); print <}{} +# where the keys are: "ante", "post", "baks", "level", "vislvl" +# with the first 3 keys having arrays as values and the final 2 +# keys having hashes as values. This pre-step is done since this +# same structure can be re-used when deleting multiple files and +# dirs (with potential wilcards) across multiple shares, backups, +# and hosts. The component arrays and hashes which are unique per +# host are constructed as folows: +# +# - Start by constructing the simple hash %LevelH whose keys map +# backup numbers to incremental backup levels based on the +# information in the corresponding backupInfo file. +# +# - Then, for each host selected, determine the list (@Baks) of +# individual backups from which files are to be deleted based on +# bakRange and the actual existing backups. +# +# - Based on this list determine the list of direct antecedent +# backups (@Ante) that have strictly increasing backup levels +# starting with the previous level 0 backup. This list thus +# begins with the previous level zero backup and ends with the +# last backup before @Baks that has a lower incremental level +# than the first member of @Baks. Note: this list may be empty if +# @Baks starts with a full (level 0) backup. Note: there is at +# most one (and should in general be exactly one) incremental +# backup per level in this list starting with level 0. +# +# - Similarly, constuct the list of direct descendants (@Post) of +# the elements of @Baks that have strictly decreasing backup +# levels starting with the first incremental backup after @Baks +# and continuing until we reach a backup whose level is less than +# or equal to the level of the lowest incremental backup in @Baks +# (which may or may not be a level 0 backup). Again this list may +# be empty if the first backup after @Baks is lower than the +# level of all backups in @Baks. Also, again, there is at most +# one backup per level. +# +# - Note that by construction, @Ante is stored in ascending order +# and furthermore each backup number has a strictly ascending +# incremental level. Similarly, @Post is stored in strictly +# ascending order but its successive elements have monotonically +# non-increasing incremental levels. Also, the last element of +# @Ante has an incremental level lower than the first element of +# @Baks and the the last element of @Post has an incremental +# level higher than the lowest level of @Baks. This is all +# because anything else neither affects nor is affected by +# deletions in @Baks. In contrast, note that @Baks can have any +# any pattern of increasing, decreasing, or repeated incremental +# levels. +# +# - Finally, create the second hash (%VislvlH) which has keys equal +# to levels and values equal to the most recent backup with that +# level in @Baks or @Ante that could potentially still be visible +# in @Post. So, since we need to keep @Post unchanged, we need to +# make sure that whatever showed through into @Post before the +# deletions still shows through after deletion. Specifically, we +# may need to move/copy files (or directories) and set delete +# attributes to make sure that nothing more or less is visible in +# @Post after the deletions. +# +# 2. Second, for each host, combine the share names (and/or shell +# regexs) and list of file names (and/or shell regexs) with the +# backup ranges @Ante and @Baks to glob for all files that need +# either to be deleted from @Baks or blocked from view by setting a +# type=10 delete attribute type. If a directory is on the list and +# the remove directory flag (-r) is not set, then directories are +# skipped (and an error is logged). If any of these files (or dirs) +# are or contain hard links (either type hard link or a hard link +# "target") then they are skipped and logged since hard links +# cannot easily be deleted/copied/moved (since the other links will +# be affected). Duplicate entries and entries that are a subtree of +# another entry are rationalized and combined. +# +# 3. Third, for each host and for each relevant candidate file +# deletion, start going successively through the @Ante, @Baks, and +# @Post chains to determine which files and attributes need to be +# deleted, cleared, or copied/linked to @Post. +# +# - Start by going through, @Ante, in ascending order to construct +# two visibility hashes. The first hash, %VisibleAnte, is used to +# mark whether or not a file in @Ante may be visible from @Baks +# from a higher incremental level. The presence of a file sets +# the value of the hash while intervening delete type=10 or the +# lack of a parent directory resets the value to invisible +# (-1). Later, when we get to @Baks, we will need to make these +# invisible to complete our deletion effect +# +# The second hash, %VisibleAnteBaks, (whose construction +# continues when we iterate through @Baks) determines whether or +# not a file from @Ante or @Baks was originally visible from +# @Post. And if a file was visible, then the backup number of +# that file is stored in the value of the hash. Later, we will +# use this hash to copy/link files from @Ante and @Baks into +# @Post to preserve its pre-deletion state. +# +# Note that at each level, there is at *most* one backup from +# @Ante that is visible from @Baks (coded by %VisibleAnte) and +# similarly there is at *most* one backup from @Ante and @Baks +# combined that is visible from @Post (coded by +# @VisibleAnteBaks). +# +# - Next, go through @Baks to mark for deletion any instances of the +# file that are present. Then set the attrib type to type=10 +# (delete) if %VisibleAnte indicates that a file from @Ante would +# otherwise be visible at that level. Otherwise, clear the attrib +# and mark it for deletion. Similarly, once the type=10 type has +# been set, all higher level element of @Baks can have their file +# attribs cleared whether they originally indicated a file type or +# a delete type (i.e. no need for 2 layers of delete attribs). +# +# - Finally, go through the list of @Post in ascending order. If +# there is no file and no delete flag present, then use the +# information coded in %VisibleAnteBaks to determine whether we +# need to link/copy over a version of the file previously stored +# in @Ante and/or @Baks (along with the corresponding file attrib +# entry) or whether we need to set a type=10 delete +# attribute. Conversely, if originally, there was a type=10 delete +# attribute, then by construction of @Post, the delete type is no +# longer needed since the deletion will now occur in one of its +# antecedents in @Baks, so we need to clear the delete type from +# the attrib entry. +# +# 4. Finally, after all the files for a given host have been marked +# for deletion, moving/copying or attribute changes, loop through +# and execute the changes. Deletions are looped first by host and +# then by backup number and then alphabetically by filepath. +# +# Files are deleted by unlinking (recursively via rmtree for +# directories). Files are "copied" to @Post by first attempting to +# link to pool (either using an existing link or by creating a new +# pool entry) and if not successful then by copying. Directories +# are done recursively. Attributes are either cleared (deleted) or +# set to type=10 delete or copied over to @Post. Whenever an +# attribute file needs to be written, first an attempt is made to +# link to pool (or create a new pool entry and link if not +# present). Otherwise, the attribute is just written. Empty +# attribute files are deleted. The attribute writes to filesystem +# are done once per directory per backup (except for the moves). +# +# 5. As a last step, optionally BackupPC_nightly is called to clean up +# the pool, provided you set the -c flag and that the BackupPC +# daemon is running. Note that this routine itself does NOT touch +# the pool. + +# Debugging & Verification: + +# This program is instrumented to give you plenty of "output" to see +# all the subtleties of what is being deleted (or moved) and what is +# not. The seemingly simple rules of "inheritance" of incrementals +# hide a lot of complexity (and special cases) when you try to delete +# a file in the middle of a backup chain. +# +# To see what is happening during the "calculate_deletes" stage which +# is the heart of the algorithm in terms of determining what happens +# to what, it is best to use DEBUG level 2 or higher (-d 2). Then for +# every host and for every (unique) top-level file or directory +# scheduled for deletion, you will see the complete chain of how the +# program walks sequentially through @Ante, @Baks, and @Post. +# For each file, you first see a line of form: +# LOOKING AT: [hostname] [@Ante chain] [@Baks chain] [@Post chain] +# +# Followed by a triad of lines for each of the backups in the chain of form: +# ANTE[baknum](baklevel) [file code] [attribute code] +# BAKS[baknum](baklevel) [file code] [attribute code] [action flag] +# POST[baknum](baklevel) [file code] [attribute code] [action flag] +# +# where the file code is one of: +# F = file present at that baklevel and to be deleted (if in @Baks) +# (or f if in @Ante or @Post and potentially visible) +# D = Dnir present at that baklevel and to be deleted (if in @Baks) +# (or f if in @Ante or @Post and potentially visible) +# - = File not present at that baklevel +# X = Parent directory not present at that baklevel +# (or x if in @Ante or @Post) +# and the attribute code is one of: +# n = Attribute type key (if present) +# - = If no attribute for the file (implies no file) +# and the action flag is one of the following: (only applies to @Baks & @Post) +# C = Clear attribute (if attribute was previously present) +# D = Set to type 10 delete (if not already set) +# Mn = Move file/dir here from level 'n' (@Post only) +# +# More detail on the individual actions can be obtained by increasing +# the debugging level. +# +# The other interesting output is the result of the "execute_deletes" +# stage which shows what actually happens. Here, for every host and +# every backup of that host, you see what happens on a file by file +# level. The output is of form: +# [hostname][@Ante chain] [@Baks chain] [@Post chain] +# **BACKUP: [hostname][baknum](baklevel) +# [hostname][baknum] [file code][attribute code] +# +# where the file code is one of: +# F = Single file deleted +# D(n) = Directory deleted with total of 'n' file/dir deletes +# (including the directory) +# - = Nothing deleted +# and the attribute code is one of: +# C = Attribute cleared +# D = Attribute set to type 10 delete +# d = Attribute left alone with type 10 delete +# - = Attrib (otherwise) unchanged [shouldn't happen] +# and the (optional) move code is: (applies only to @Post) +# n->m = File/dir moved by *linking* to pool from backup 'n' to 'm' +# n=> = File/dir moved by *copying* from backup 'n' to 'm' +# Finally, since the files are sorted alphabetically by name and +# directory, we only need to actually write the attribute folder after +# we finish making all the delete/clear changes in a directory. +# This is coded as: +# [hostname][baknum] /attrib [-][attribute code] +# +# where the attribute code is one of: +# W = Attribute file *linked* to pool successfully +# w = Attribute file *copied* to filesystem successfully +# R = Empty attribute file removed from filesystem +# X = Error writing attribute file +#======================================================================== + +use strict; +use warnings; + +use File::Find; +use File::Glob ':glob'; +use Data::Dumper; #Just used for debugging... + +use lib "/usr/share/BackupPC/lib"; +use BackupPC::Lib; +use BackupPC::jLib; +use BackupPC::Attrib qw(:all); +use BackupPC::FileZIO; +use Getopt::Std; + +use constant S_HLINK_TARGET => 0400000; # this file is hardlink target + +my $DeleteAttribH = { #Hash reference to attribute entry for deleted file + type => BPC_FTYPE_DELETED, #10 + mode => 0, + uid => 0, + gid => 0, + size => 0, + mtime => 0, +}; + +my %filedelsHoH; +# Hash has following structure: +# $filedelsHoH{$host}{$baknum}{$file} = +# where the mask is one of the following elements + +use constant FILE_ATTRIB_COPY => 0000001; # File and corresponding attrib copied/linked to new backup in @Post +use constant FILE_DELETED => 0000002; # File deleted (not moved) +use constant ATTRIB_CLEARED => 0000010; # File attrib cleared +use constant ATTRIB_DELETETYPE => 0000020; # File attrib deleted + + +my $DEBUG; #Note setting here will override options value + +die("BackupPC::Lib->new failed\n") if ( !(my $bpc = BackupPC::Lib->new) ); +my $TopDir = $bpc->TopDir(); +chdir($TopDir); #Do this because 'find' will later try to return to working + #directory which may not be accessible if you are su backuppc + + +(my $pc = "$TopDir/pc") =~ s|//*|/|g; +%Conf = $bpc->Conf(); #Global variable defined in jLib.pm + +my %opts; +if ( !getopts("h:n:s:lrH:mF:qtcd:u", \%opts) || defined($opts{u}) || + !defined($opts{h}) || !defined($opts{n}) || + (!defined($opts{s}) && defined($opts{m})) || + (defined $opts{H} && $opts{H} !~ /^(0|abort|1|skip|2|force)$/) || + (!$opts{l} && !$opts{F} && @ARGV < 1)) { + print STDERR < Host (or - for all) from which path is offset + -n Range of successive backup numbers to delete. + N delete files from backup N (only) + M-N delete files from backups M-N (inclusive) + -M delete files from all backups up to M (inclusive) + M- delete files from all backups up from M (inlusive) + - delete files from ALL backups + {N} if one of the numbers is in braces, then interpret + as the N\'th backup counting from the *beginning* + [N] if one of the numbers is in braces, then interpret + as the N\'th backup counting from the *end* + -s Share name (or - for all) from which path is offset + (don\'t include the 'f' mangle) + NOTE: if unmangle option (-m) is not set then the share name + is optional and if not specified then it must instead be + included in mangled form as part of the file/directory names. + + Optional options: + -l Just list backups by host (with level noted in parentheses) + -r Allow directories to be removed too (otherwise skips over directories) + -H Treatment of hard links contained in deletion tree: + 0|abort abort with error=2 if hard links in tree [default] + 1|skip Skip hard links or directories containing them + 2|force delete anyway (BE WARNED: this may affect backup + integrity if hard linked to files outside tree) + -m Paths are unmangled (i.e. apply mangle to paths; doesn\'t apply to shares) + -F Read files/directories from (or stdin if = -) + -q Don\'t show deletions + -t Trial run -- do everything but deletions + -c Clean up pool - schedule BackupPC_nightly to run (requires server running) + Only runs if files were deleted + -d level Turn on debug level + -u Print this usage message... +EOF +exit(1); +} + +my $hostopt = $opts{h}; +my $numopt = $opts{n}; +my $shareopt = $opts{s} || ''; +my $listopt = $opts{l} || 0; +my $mangleopt = $opts{m} || 0; +my $rmdiropt = $opts{r} || 0; +my $fileopt = $opts{F} || 0; +my $quietopt = $opts{q} || 0; +$dryrun = $opts{t} || 0; #global variable jLib.pm +my $runnightlyopt = $opts{c} || 0; + +my $hardopt = $opts{H} || 0; +my $hardaction; +if($hardopt =~ /^(1|skip)$/) { + $hardopt = 1; + $hardaction = "SKIPPING"; +} +elsif($hardopt =~ /^(2|force)$/) { + $hardopt = 2; +} +else{ + $hardopt = 0; + $hardaction = "ABORTING"; +} + +$DEBUG = ($opts{d} || 0 ) unless defined $DEBUG; #Override hard-coded definition unless set explicitly +#$DEBUG && ($dryrun=1); #Uncomment if you want DEBUG to imply dry run +#$dryrun=1; #JJK: Uncomment to hard-wire to always dry-run (paranoia) +my $DRYRUN = ($dryrun == 0 ? "" : " DRY-RUN"); + + +# Fill hash with backup structure by host +my %backupsHoHA; +get_allhostbackups($hostopt, $numopt, \%backupsHoHA); +if($listopt) { + print_backup_list(\%backupsHoHA); + exit; +} + +my $shareregx_sh = my $shareregx_pl = $shareopt; +if($shareopt eq '-') { + $shareregx_pl = "f[^/]+"; + $shareregx_sh = "f*"; # For shell globbing +} +elsif($shareopt ne '') { + $shareregx_pl =~ s|//*|%2f|g; #Replace (one or more) '/' with %2f + $shareregx_sh = $shareregx_pl = "f" . $shareregx_pl; +} + +#Combine share and file arg regexps +my (@filelist, @sharearglist); +if($fileopt) { + @filelist = read_file($fileopt); +} +else { + @filelist = @ARGV; +} +foreach my $file (@filelist) { + $file = $bpc->fileNameMangle($file) if $mangleopt; #Mangle filename + my $sharearg = "$shareregx_sh/$file"; + $sharearg =~ s|//*|/|g; $sharearg =~ s|^/*||g; $sharearg =~ s|/*$||g; + # Remove double, leading, and trailing slashes + die "Error: Can't delete root share directory: $sharearg\n" + if ("$sharearg" =~ m|^[^/]*$|); #Avoid because dangerous... + push(@sharearglist, $sharearg); +} + +my $filesdeleted = my $totfilesdeleted = my $filescopied = 0; +my $attrsdeleted = my $attrscleared = my $atfilesdeleted = 0; + +my $hrdlnkflg; +foreach my $Host (keys %backupsHoHA) { #Loop through each host + $hrdlnkflg=0; + unless(defined @{$backupsHoHA{$Host}{baks}}) { #@baks is empty + print "[$Host] ***NO BACKUPS FOUND IN DELETE RANGE***\n" unless $quietopt; + next; + } + my @Ante = @{$backupsHoHA{$Host}{ante}}; + my @Baks = @{$backupsHoHA{$Host}{baks}}; + my @Post = @{$backupsHoHA{$Host}{post}}; + + print "[$Host][" . join(" ", @Ante) . "][" . + join(" ", @Baks) . "][" . join(" ", @Post) . "]\n" unless $quietopt; + +$DEBUG > 1 && (print " ANTE[$Host]: " . join(" ", @Ante) ."\n"); +$DEBUG > 1 && (print " BAKS[$Host]: " . join(" ", @Baks) ."\n"); +$DEBUG > 1 && (print " POST[$Host]: " . join(" ", @Post) ."\n"); + + #We need to glob files that occur both in the delete list (@Baks) and + #in the antecedent list (@Ante) since antecedents affect presence of + #later incrementals. + my $numregx_sh = "{" . join(",", @Ante, @Baks) . "}"; + my $pcHost = "$pc/$Host"; + my @filepathlist; + + foreach my $sharearg (@sharearglist) { + #Glob for all (relevant) file paths for host across @Baks & @Ante backups +#JJK @filepathlist = (@filepathlist, <$pcHost/$numregx_sh/$sharearg>); + @filepathlist = (@filepathlist, bsd_glob("$pcHost/$numregx_sh/$sharearg")); + } + #Now use a hash to collapse into unique file keys (with host & backup number stripped off) + my %fileH; + foreach my $filepath (@filepathlist) { + next unless -e $filepath; #Skip non-existent files (note if no wildcard in path, globbing + #will always return the file name even if doesn't exist) + $filepath =~ m|^$pcHost/[0-9]+/+(.*)|; + $fileH{$1}++; #Note ++ used to set the keys + } + unless(%fileH) { +$DEBUG && print " LOOKING AT: [$Host] [" . join(" ", @Ante) . "][" . join(" ", @Baks) . "][" . join(" ", @Post) . "] **NO DELETIONS ON THIS HOST**\n\n"; + next; + } + my $lastfile="///"; #dummy starting point since no file can have this name since eliminated dup '/'s + foreach my $File (sort keys %fileH) { #Iterate through sorted files + # First build an array of filepaths based on ascending backup numbers in + # @Baks. Also, do a quick check for directories. + next if $File =~ m|^$lastfile/|; # next if current file is in a subdirectory of previous file + $lastfile = $File; + #Now create list of paths to search for hardlinks + my @Pathlist = (); + foreach my $Baknum (@Ante) { #Need to include @Ante in hardlink search + my $Filepath = "$pc/$Host/$Baknum/$File"; + next unless -e $Filepath; + push (@Pathlist, $Filepath); + } + my $dirflag=0; + foreach my $Baknum (@Baks) { + my $Filepath = "$pc/$Host/$Baknum/$File"; + next unless -e $Filepath; + if (-d $Filepath && !$rmdiropt) { + $dirflag=1; #Only enforce directory check in @Baks because only deleting there + printerr "Skipping directory `$Host/*/$File` since -r flag not set\n\n"; + last; + } + push (@Pathlist, $Filepath); + } + next if $dirflag; + next unless(@Pathlist); #Probably shouldn't get here since by construction a path should exist + #for at least one of the elements of @Ante or @Baks + #Now check to see if any hard-links in the @Pathlist + find(\&find_is_hlink, @Pathlist ) unless $hardopt == 2; #Unless force + exit 2 if $hrdlnkflg && $hardopt == 0; #abort + next if $hrdlnkflg; +$DEBUG && print " LOOKING AT: [$Host] [" . join(" ", @Ante) . "][" . join(" ", @Baks) . "][" . join(" ", @Post) . "] $File\n"; + calculate_deletes($Host, $File, \$backupsHoHA{$Host}, \$filedelsHoH{$Host}, !$quietopt); +$DEBUG && print "\n"; + } + execute_deletes($Host, \$backupsHoHA{$Host}, \$filedelsHoH{$Host}, !$quietopt); +} + +print "\nFiles/directories deleted: $filesdeleted($totfilesdeleted) Files/directories copied: $filescopied\n" unless $quietopt; +print "Delete attrib set: $attrsdeleted Attributes cleared: $attrscleared\n" unless $quietopt; +print "Empty attrib files deleted: $atfilesdeleted Errors: $errorcount\n" unless $quietopt; +run_nightly($bpc) if (!$dryrun && $runnightlyopt); +exit; + +#Set $hrdlnkflg=1 if find a hard link (including "targets") +# Short-circuit/prune find as soon as hard link found. +sub find_is_hlink +{ + if($hrdlnkflg) { + $File::Find::prune = 1; #Prune search if hard link already found + #i.e. don't go any deeper (but still will finish the current level) + } + elsif($File::Find::name eq $File::Find::topdir #File + && -f && m|f.*| + &&( get_jtype($File::Find::name) & S_HLINK_TARGET)) { + # Check if file has type hard link (or hard link target) Note: we + # could have used this test recursively on all files in the + # directory tree, but it would be VERY SLOW since we would need to + # read the attrib file for every file in every + # subdirectory. Instead, we only use this method when we are + # searching directly for a file at the top leel + # (topdir). Otherwise, we use the method below that just + # recursively searches for the attrib file and reads that + # directly. + $hrdlnkflg = 1; + print relpath($File::Find::name) . ": File is a hard link. $hardaction...\n\n"; + } + elsif (-d && -e attrib($File::Find::name)) { #Directory + # Read through attrib file hash table in each subdirectory in tree to + # find files that are hard links (including 'targets'). Fast + # because only need to open attrib file once per subdirectory to test + # all the files in the directory. + read_attrib(my $attr, $File::Find::name); + foreach my $file (keys (%{$attr->get()})) { #Look through all file hash entries + if (${$attr->get($file)}{type} == 1 || #Hard link + (${$attr->get($file)}{mode} & S_HLINK_TARGET)) { #Hard link target + $hrdlnkflg = 1; + $File::Find::topdir =~ m|^$pc/([^/]+)/([0-9]+)/(.*)|; +# print relpath($File::Find::topdir) . +# print relpath($File::Find::name) . +# ": Directory contains hard link: $file'. $hardaction...\n\n"; + print "[$1][$2] $3: Directory contains hard link: " . + substr($File::Find::name, length($File::Find::topdir)) . + "/f$file ... $hardaction...\n\n"; + + last; #Stop readin attrib file...hard link found + } + } + } +} + +# Main routine for figuring out what files/dirs in @baks get deleted +# and/or copied/linked to @post along with which attrib entries are +# cleared or set to delete type in both the @baks and @post backupchains. +sub calculate_deletes +{ + my ($hostname, $filepath, $backupshostHAref, $filedelsHref, $verbose) = @_; + my @ante = @{$$backupshostHAref->{ante}}; + my @baks = @{$$backupshostHAref->{baks}}; + my @post = @{$$backupshostHAref->{post}}; + my %Level = %{$$backupshostHAref->{level}}; + my %Vislvl = %{$$backupshostHAref->{vislvl}}; + my $pchost = "$pc/$hostname"; + + #We first need to look down the direct antecedent chain in @ante + #to determine whether earlier versions of the file exist and if so + #at what level of incrementals will they be visible. A file in the + #@ante chain is potentially visible later in the @baks chain at + #the given level (or higher) if there is no intervening type=10 + #(delete) attrib in the chain. If there is already a type=10 + #attrib in the @ante chain then the file will be invisible in the + #@baks chain at the same level or higher of incrmental backups. + + #Recall that the elements of @ante by construction have *strictly* + #increasing backup levels. So, that the visibility scope decreases + #as you go down the chain. + + #We first iterate up the @ante chain and construct a hash + #(%VisibleLvl) that is either 1 or 0 depending on whether there is + #a file or type=10 delete attrib at that level. For any level at + #which there is no antecedent, the corresponding entry of + #%VisibleLvl remains undef + + my %VisibleAnte; # $VisibleAnte{$level} is equal to -1 if nothing visible from @Ante at the given level. + # i.e. if either there was a type=delete at that level or if that level was blank but + # there was a type=delete at at a lower level without an intervening file. + # Otherwise, it is set to the backup number of the file that was visible at that level. + # This hash is used to determine where we need to add type=10 delete attributes to + # @baks to keep the files still present in @ante from poking through into the + # deleted @baks region. + + my %VisibleAnteBaks; # This hash is very similar but now we construct it all the way through @Baks to + # determine what was ORIGINALLY visible to the elements of @post since we may + # need to copy/link files forward to @post if they have been deleted from @baks or + # if they are now blocked by a new type=delete attribute in @baks. + + $VisibleAnte{0} = $VisibleAnteBaks{0} = -1; #Starts as invisible until first file appears + $filepath =~ m|(.*)/|; + foreach my $prevbaknum (@ante) { + my $prevbakfile = "$pchost/$prevbaknum/$filepath"; + my $level = $Level{$prevbaknum}; + my $type = get_attrib_type($prevbakfile); + my $nodir = ($type == -3 ? 1 : 0); #Note type = -3 if dir non-existent + printerr "Attribute file unreadable: $prevbaknum/$filepath\n" if $type == -4; + + #Determine what is visible to @Baks and to @Post + if($type == BPC_FTYPE_DELETED || $nodir) { #Not visible if deleted type or no parent dir + $VisibleAnte{$level} = $VisibleAnteBaks{$level} = -1; #always update + $VisibleAnteBaks{$level} = -1 + if defined($Vislvl{$level}) && $Vislvl{$level} == $prevbaknum; + #only update if this is the most recent backup at this level visible from @post + } + elsif (-r $prevbakfile) { #File exists so visible at this level + $VisibleAnte{$level} = $prevbaknum; # always update because @ante is strictly increasing order + $VisibleAnteBaks{$level} = $prevbaknum + if defined($Vislvl{$level}) && $Vislvl{$level} == $prevbaknum; + #Only update if this will be visible from @post (may be blocked later by @baks) + } + +$DEBUG > 1 && print " ANTE[$prevbaknum]($level) $hostname/$prevbaknum/$filepath [" . (-f $prevbakfile ? "f" : (-d $prevbakfile ? "d": ($nodir ? "x" : "-"))) . "][" . ($type >=0 ? $type : "-") . "]\n"; + } + + #Next, iterate down @baks to schedule file/dirs for deletion + #and/or for clearing/changing file attrib entry based on the + #status of the visibility flag at that level (or below) and the + #presence of $filepath in the backup. + #The status of what we do to the file and what we do to the attribute is stored in + #the hash ref %filedelsHref + my $minbaklevel = $baks[0]; + foreach my $currbaknum (@baks) { + my $currbakfile = "$pchost/$currbaknum/$filepath"; + my $level = $Level{$currbaknum}; + my $type = get_attrib_type($currbakfile); + my $nodir = ($type == -3 ? 1 : 0); #Note type = -3 if dir non-existent + printerr "Attribute file unreadable: $currbaknum/$filepath\n" if $type == -4; + my $actionflag = "-"; my $printstring = "";#Used for debugging statements only + + #Determine what is visible to @Post; also set file for deletion if present + if($type == BPC_FTYPE_DELETED || $nodir) { #Not visible if deleted type or no parent dir + $VisibleAnteBaks{$level} = -1 + if defined $Vislvl{$level} && $Vislvl{$level} == $currbaknum; #update if visible from @post + } + elsif (-r $currbakfile ) { + $VisibleAnteBaks{$level} = $currbaknum + if defined($Vislvl{$level}) && $Vislvl{$level} == $currbaknum; #update if visible + $$filedelsHref->{$currbaknum}{$filepath} |= FILE_DELETED; +$DEBUG > 2 && ($printstring .= " [$currbaknum] Adding to delete list: $hostname/$currbaknum/$filepath\n"); + } + + #Determine whether deleted file attribs should be cleared or set to type 10=delete + if(!$nodir && $level <= $minbaklevel && last_visible_backup($level, \%VisibleAnte) >= 0) { + #Existing file in @ante will shine through since nothing in @baks is blocking + #Note if $level > $minbaklevel then we will already be shielding it with a previous @baks element + $minbaklevel = $level; + if ($type != BPC_FTYPE_DELETED) { # Set delete type if not already of type delete + $$filedelsHref->{$currbaknum}{$filepath} |= ATTRIB_DELETETYPE; + $actionflag="D"; +$DEBUG > 2 && ($printstring .= " [$currbaknum] Set attrib to type=delete: $hostname/$currbaknum/$filepath\n"); + } + } + elsif ($type >=0) { #No antecedent from @Ante will shine through since already blocked. + #So if there is an attribute type there, we should clear the attribute since + #nothing need be there + $$filedelsHref->{$currbaknum}{$filepath} |= ATTRIB_CLEARED; + $actionflag="C"; +$DEBUG > 2 && ($printstring .= " [$currbaknum] Clear attrib file entry: $hostname/$currbaknum/$filepath\n"); + } +$DEBUG > 1 && print " BAKS[$currbaknum]($level) $hostname/$currbaknum/$filepath [" . (-f $currbakfile ? "F" : (-d $currbakfile ? "D": ($nodir ? "X" : "-"))) . "][" . ($type>=0 ? $type : "-") . "][$actionflag]\n"; +$DEBUG >3 && print $printstring; + } + +#Finally copy over files as necessary to make them appropriately visible to @post +#Recall again that successive elements of @post are strictly lower in level. +#Therefore, each element of @post either already has a file entry or it +#inherits its entry from the previously deleted backups. + foreach my $nextbaknum (@post) { + my $nextbakfile = "$pchost/$nextbaknum/$filepath"; + my $level = $Level{$nextbaknum}; + my $type = get_attrib_type($nextbakfile); + my $nodir = ($type == -3 ? 1 : 0); #Note type = -3 if dir non-existent + printerr "Attribute file unreadable: $nextbaknum/$filepath\n" if $type == -4; + my $actionflag = "-"; my $printstring = ""; #Used for debugging statements only + + #If there is a previously visible file from @Ante or @Post that used to shine through (but won't now + #because either in @Ante and blocked by @Post deletion or deleted from @Post) and if nothing in @Post + # is blocking (i.e directory exists, no file there, and no delete type), then we need to copy/link + #the file forward + if ((my $delnum = last_visible_backup($level, \%VisibleAnteBaks)) >= 0 && + $type != BPC_FTYPE_DELETED && !$nodir && !(-r $nextbakfile)) { + #First mark that last visible source file in @Ante or @Post gets copied + $$filedelsHref->{$delnum}{$filepath} |= FILE_ATTRIB_COPY; + #Note still keep the FILE_DELETED attrib because we may still need to delete the source + #after moving if the source was in @baks + #Second tell the target where it gets its source + $$filedelsHref->{$nextbaknum}{$filepath} = ($delnum+1) << 6; # + #Store the source in higher bit numbers to avoid overlapping with our flags. Add 1 so as to + #be able to distinguish empty (non stored) path from backup #0. +$DEBUG > 2 && ($printstring .= " [$nextbaknum] Moving file and attrib from backup $delnum: $filepath\n"); + $actionflag = "M$delnum"; + } + elsif ($type == BPC_FTYPE_DELETED) { + # File has a delete attrib that is now no longer necessary since + # every element of @post by construction has a deleted immediate predecessor in @baks + $$filedelsHref->{$nextbaknum}{$filepath} |= ATTRIB_CLEARED; +$DEBUG > 2 && ($printstring .= " [$nextbaknum] Clear attrib file entry: $hostname/$nextbaknum/$filepath\n"); + $actionflag = "C"; + } +$DEBUG >1 && print " POST[$nextbaknum]($level) $hostname/$nextbaknum/$filepath [" . (-f $nextbakfile ? "f" : (-d $nextbakfile ? "d": ($nodir ? "x" : "-"))) . "][" . ($type >= 0 ? $type : "-") . "][$actionflag]\n"; +$DEBUG >3 && print $printstring; + } +} + +sub execute_deletes +{ + my ($hostname, $backupshostHAref, $filedelsHref, $verbose) = @_; + my @ante = @{$$backupshostHAref->{ante}}; + my @baks = @{$$backupshostHAref->{baks}}; + my @post = @{$$backupshostHAref->{post}}; + my %Level = %{$$backupshostHAref->{level}}; + + my $pchost = "$pc/$hostname"; + foreach my $backnum (@ante, @baks, @post) { + #Note the only @ante action is copying over files + #Note the only @post action is clearing the file attribute + print "**BACKUP: [$hostname][$backnum]($Level{$backnum})\n"; + my $prevdir=0; + my ($attr, $dir, $file); + foreach my $filepath (sort keys %{$$filedelsHref->{$backnum}}) { + my $VERBOSE = ($verbose ? "" : "[$hostname][$backnum] $filepath:"); + my $delfilelist; + my $filestring = my $attribstring = '-'; + my $movestring = my $printstring = ''; + $filepath =~ m|(.*)/f(.*)|; + $dir = "$pchost/$backnum/$1"; + my $dirstem = $1; + $file = $2; + if($dir ne $prevdir) { #New directory - we only need to read/write the atrrib file once per dir + write_attrib_out($bpc, $attr, $prevdir, $verbose) + if $prevdir; #Write out previous $attr + die "Error: can't write attribute file to directory: $dir" unless -w $dir; + read_attrib($attr, $dir); #Read in new attribute + $prevdir = $dir; + } + + my $action = $$filedelsHref->{$backnum}{$filepath}; + if($action & FILE_ATTRIB_COPY) { + my %sourceattr; + get_file_attrib("$pchost/$backnum/$filepath", \%sourceattr); + my $checkpoollinks = 1; #Don't just blindly copy or link - make sure linked to pool + foreach my $nextbaknum (@post) { + my ($ret1, $ret2); + next unless (defined($$filedelsHref->{$nextbaknum}{$filepath}) && + ($$filedelsHref->{$nextbaknum}{$filepath} >> 6) - 1 == $backnum); + #Note: >>6 followed by decrement of 1 recovers the backup number encoding + #Note: don't delete or clear/delete source attrib now because we may need to move + #several copies - so file deletion and attribute clear/delete is done after moving + + + if(($ret1=link_recursively_topool ($bpc, "$pchost/$backnum/$filepath", + "$pchost/$nextbaknum/$filepath", + $checkpoollinks, 1)) >= 0 + && ($ret2=write_file_attrib($bpc, "$pchost/$nextbaknum/$dirstem", $file, \%sourceattr, 1)) > 0){ + #First move files by linking them to pool recursively and then copy attributes + $checkpoollinks = 0 if $ret1 > 0; #No need to check pool links next time if all ok now + $movestring .= "," unless $movestring eq ''; + $movestring .= "$backnum" . ($ret1 == 1 ? "->" : "=>") . "$nextbaknum\n"; + $filescopied++; + } + else { + $action = 0; #If error moving, cancel the subsequent file and attrib deletion/clearing + junlink("$pchost/$nextbaknum/$filepath"); #undo partial move + if($ret1 <0) { + $printstring .= "$VERBOSE FAILED TO MOVE FILE/DIR: $backnum-->$nextbaknum -- UNDOING PARTIAL MOVE\n"; + } + else { + $printstring .= "$VERBOSE FAILED TO WRITE NEW ATTRIB FILE IN $nextbaknum AFTER MOVING FILE/DIR: $backnum-->$nextbaknum FROM $backnum -- UNDOING MOVE\n"; + } + next; # Skip to next move + } + } + } + if ($action & FILE_DELETED) { #Note delete follows moving + my $isdir = (-d "$pchost/$backnum/$filepath" ? 1 : 0); + my $numdeletes = delete_files("$pchost/$backnum/$filepath", \$delfilelist); + if($numdeletes > 0) { + $filestring = ($isdir ? "D$numdeletes" : "F" ); + $filesdeleted++; + $totfilesdeleted +=$numdeletes; + if($delfilelist) { + $delfilelist =~ s!(\n|^)(unlink|rmdir ) *$pchost/$backnum/$filepath(\n|$)!!g; #Remove top directory + $delfilelist =~ s!^(unlink|rmdir ) *$pc/! !gm; #Remove unlink/rmdir prefix + } + } + else { + $printstring .= "$VERBOSE FILE FAILED TO DELETE ($numdeletes)\n"; + } + } + if ($action & ATTRIB_CLEARED) { #And attrib changing follows file moving & deletion... + $attr->delete($file); + $attribstring = "C"; + $attrscleared++; + + } + elsif($action & ATTRIB_DELETETYPE) { + if (defined($attr->get($file)) && ${$attr->get($file)}{type} == BPC_FTYPE_DELETED) { + $attribstring = "d"; + } + else { + $attr->set($file, $DeleteAttribH); # Set file to deleted type (10) + $attribstring = "D"; + $attrsdeleted++; + } + } + print " [$hostname][$backnum]$filepath [$filestring][$attribstring] $movestring$DRYRUN\n" + if $verbose && ($filestring ne '-' || $attribstring ne '-' || $movestring ne ''); + print $delfilelist . "\n" if $verbose && $delfilelist; + print $printstring; + } + write_attrib_out($bpc, $attr, $dir, $verbose) + if $prevdir; #Write out last attribute + } +} + +sub write_attrib_out +{ + my ($bpc, $attr, $dir, $verbose) = @_; + my $ret; + my $numattribs = count_file_attribs($attr); + die "Error writing to attrib file for $dir\n" + unless ($ret =write_attrib ($bpc, $attr, $dir, 1, 1)) > 0; + $dir =~ m|^$pc/([^/]*)/([^/]*)/(.*)|; + $atfilesdeleted++ if $ret==4; + print " [$1][$2]$3/attrib [-]" . + ($ret==4 ? "[R]" : ($ret==3 ? "[w]" : ($ret > 0 ? "[W]" : "[X]"))) + ."$DRYRUN\n" if $verbose; + return $ret; +} + +#If earlier file is visible at this level, return the backup number where a file was last present +#Otherwise return -1 (occurs if there was an intervening type=10 or if a file never existed) +sub last_visible_backup +{ + my ($numlvl, $Visiblebackref) = @_; + my $lvl = --$numlvl; #For visibility look at one less than current level and lower + + return -1 unless $lvl >= 0; + do { + return ($Visiblebackref->{$numlvl} = $Visiblebackref->{$lvl}) #Set & return + if defined($Visiblebackref->{$lvl}); + } while($lvl--); + return -1; #This shouldn't happen since we initialize $Visiblebackref->{0} = -1; +} + +# Get the modified type from the attrib file. +# Which I define as: +# type + (type == BPC_FTYPE_HARDLINK => 1; ? S_HLINK_TARGET : (mode & S_HLINK_TARGET) ) +# i.e. you get both the type and whether it is either an hlink +# or an hlink-target +sub get_jtype +{ + my ($fullfilename) = @_; + my %fileattrib; + + return 100 if get_file_attrib($fullfilename, \%fileattrib) <= 0; + my $type = $fileattrib{type}; + my $mode = $fileattrib{mode}; + $type + ($type == BPC_FTYPE_HARDLINK ? + S_HLINK_TARGET : ($mode & S_HLINK_TARGET)); +} + +#Set elements of the hash backupsHoHA which is a mixed HoHA and HoHoH +#containing backup structure for each host in hostregex_sh + +# Elements are: +# backupsHoHA{$host}{baks} - chain (array) of consecutive backups numbers +# whose selected files we will be deleting +# backupsHoHA{$host}{ante} - chain (array) of backups directly antecedent +# to those in 'baks' - these are all "parents" of all elemenst +# of 'baks' [in descending numerical order and strictly descending +# increment order] +# backupsHoHA{$host}{post} - chain (array) of backups that are incremental +# backups of elements of 'baks' - these must all be "children" of +# all element of 'baks' [in ascending numerical order and strictly +# descending increment order] +# backupsHoHA{$host}{level}{$n} - level of backup $n +# backupsHoHA{$host}{vislvl}{$level} - highest (most recent) backup number in (@ante, @baks) with $level +# Note: this determines which backups from (@ante, @baks) are potentially visible from @post + +sub get_allhostbackups +{ + my ($hostregx_sh, $numregx, $backupsHoHAref) = @_; + + + die "$0: bad host name '$hostregx_sh'\n" + if ( $hostregx_sh !~ m|^([-\w\.\s*]+)$| || $hostregx_sh =~ m{(^|/)\.\.(/|$)} ); + $hostregx_sh = "*" if ($hostregx_sh eq '-'); # For shell globbing + + die "$0: bad backup number range '$numopt'\n" + if ( $numregx !~ m!^((\d*)|{(\d+)}|\[(\d+)\])-((\d*)|{(\d+)}|\[(\d+)\])$|(\d+)$! ); + + my $startnum=0; + my $endnum = 99999999; + if(defined $2 && $2 ne '') {$startnum = $2;} + elsif(defined $9) {$startnum = $endnum = $9;} + if(defined $6 && $6 ne ''){$endnum=$6}; + die "$0: bad dump range '$numopt'\n" + if ( $startnum < 0 || $startnum > $endnum); + my $startoffsetbeg = $3; + my $endoffsetbeg = $7; + my $startoffsetend = $4; + my $endoffsetend = $8; + + my @allbaks = bsd_glob("$pc/$hostregx_sh/[0-9]*/backupInfo"); + #Glob for list of valid backup paths + for (@allbaks) { #Convert glob to hash of backups and levels + unless(m|.*/(.*)/([0-9]+)/backupInfo$|) { # $1=host $2=baknum + print "Invalid backup name/format: $_\n"; + next; + } + my $level = get_bakinfo("$pc/$1/$2", "level"); + $backupsHoHAref->{$1}{level}{$2} = $level + if defined($level) && $level >=0; # Include if backup level defined + } + + foreach my $hostname (keys %{$backupsHoHAref}) { #Loop through each host + #Note: need to initialize the following before we assign reference shortcuts + #Note {level} already defined + @{$backupsHoHAref->{$hostname}{ante}} = (); + @{$backupsHoHAref->{$hostname}{baks}} = (); + @{$backupsHoHAref->{$hostname}{post}} = (); + %{$backupsHoHAref->{$hostname}{vislvl}} = (); + + #These are all references + my $anteA= $backupsHoHAref->{$hostname}{ante}; + my $baksA= $backupsHoHAref->{$hostname}{baks}; + my $postA= $backupsHoHAref->{$hostname}{post}; + my $levelH= $backupsHoHAref->{$hostname}{level}; + my $vislvlH= $backupsHoHAref->{$hostname}{vislvl}; + + my @baklist = (sort {$a <=> $b} keys %{$levelH}); #Sorted list of backups for current host + $startnum = $baklist[$startoffsetbeg-1] || 99999999 if defined $startoffsetbeg; + $endnum = $baklist[$endoffsetbeg-1] || 99999999 if defined $endoffsetbeg; + $startnum = $baklist[$#baklist - $startoffsetend +1] || 0 if defined $startoffsetend; + $endnum = $baklist[$#baklist - $endoffsetend +1] || 0 if defined $endoffsetend; + + my $minbaklevel = my $minvislevel = 99999999; + my @before = my @after = (); + #NOTE: following written for clarity, not speed + foreach my $baknum (reverse @baklist) { #Look backwards through list of backups + #Loop through reverse sorted list of backups for current host + my $level = $$levelH{$baknum}; + if($baknum <= $endnum) { + $$vislvlH{$level} = $baknum if $level < $minvislevel; + $minvislevel = $level if $level < $minvislevel; + } + if($baknum >= $startnum && $baknum <= $endnum) { + unshift(@{$baksA}, $baknum); #sorted in increasing order + $minbaklevel = $level if $level < $minbaklevel; + } + push (@before, $baknum) if $baknum < $startnum; #sorted in decreasing order + unshift(@after, $baknum) if $baknum > $endnum; #sorted in increasing order + } + next unless defined @{$baksA}; # Nothing to backup on this host + + my $oldlevel = $$levelH{$$baksA[0]}; # i.e. level of first backup in baksA + for (@before) { + #Find all direct antecedents until the preceding level 0 and push on anteA + if ($$levelH{$_} < $oldlevel) { + unshift(@{$anteA}, $_); #Antecedents are in increasing order with strictly increasing level + last if $$levelH{$_} == 0; + $oldlevel = $$levelH{$_}; + } + } + $oldlevel = 99999999; + for (@after) { + # Find all successors that are immediate children of elements of @baks + if ($$levelH{$_} <= $oldlevel) { # Can have multiple descendants at the same level + last if $$levelH{$_} <= $minbaklevel; #Not a successor because dips below minimum + push(@{$postA}, $_); #Descendants are increasing order with non-increasing level + $oldlevel = $$levelH{$_}; + } + } + } +} + +# Print the @Baks list along with the level of each backup in parentheses +sub print_backup_list +{ + my ($backupsHoHAref) = @_; + + foreach my $hostname (sort keys %{$backupsHoHAref}) { #Loop through each host + print "$hostname: "; + foreach my $baknum (@{$backupsHoHAref->{$hostname}{baks}}) { + print "$baknum($backupsHoHAref->{$hostname}{level}{$baknum}) "; + } + print "\n"; + } +} + +#Read in external file and return list of lines of file +sub read_file +{ + my ($file) = @_; + my $fh; + my @lines; + + if($file eq '-') { + $fh = *STDIN; + } + else { + die "ERROR: Can't open: $file\n" unless open($fh, "<", $file); + } + while(<$fh>) { + chomp; + next if m|^\s*$| || m|^#|; + push(@lines, $_); + } + close $fh if $file eq '-'; + return @lines; + +} + + +# Strip off the leading $TopDir/pc portion of path +sub relpath +{ + substr($_[0],1+length($pc)); +} + + +sub min +{ + $_[0] < $_[1] ? $_[0] : $_[1]; +} --- backuppc-3.3.1.orig/debian/README.Debian +++ backuppc-3.3.1/debian/README.Debian @@ -0,0 +1,120 @@ +BackupPC for Debian +------------------- + +The Web interface is available at http://myserver/backuppc/. Log in a user +backuppc with the random password given during installation. +You can change the password by running "htpasswd for /etc/backuppc/htpasswd". + +The default install will backup the local /etc directory using the 'backuppc' +user, so it will not backup root only files like /etc/shadow. If you want +to do a local backup as root, you need to use ssh and ssh authentication keys, +as explained in the manual. The examples/ directory contains some basic host +configuration files. + +If you do not like the default data directory (/var/lib/backuppc/), you +should move this directory where you want and make a symbolic link from +the new directory to the default one (all paths are hardcoded so it's the +easiest way to change the data directory). + +About Xfer methods +------------------ + +The default install of backuppc is only useful for backuping PCs via SMB. +For other backup methods you'll probably have to install more packages: +- for rsync: rsync, libfile-rsyncp-perl +- for tar/ssh: ssh + +Known bugs with workarounds +--------------------------- + +- If SMB backups no longer work after an upgrade to lenny, please remove + the '-N' smbclient options from /etc/backuppc/config.pl + +- Do no use the '--exclude' option for rsync backups but only the + $Conf{BackupFilesExclude} backuppc parameter. + +- For IPv6 only hosts, add the following lines to the host configuration file: + + $Conf{NmbLookupCmd} = ''; + $Conf{NmbLookupFindHostCmd} = ''; + $Conf{PingCmd} = '/bin/ping6'; + +Installing BackupPC with Apache 2.2.x +------------------------------------- + +The following lines should be added to your Apache configuration or to the top +of /etc/backuppc/apache.conf, to make the authentication work. + +LoadModule auth_basic_module /usr/lib/apache2/modules/mod_auth_basic.so +LoadModule authz_groupfile_module /usr/lib/apache2/modules/mod_authz_groupfile.so +LoadModule authn_file_module /usr/lib/apache2/modules/mod_authn_file.so +LoadModule authz_user_module /usr/lib/apache2/modules/mod_authz_user.so +LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so + +Installing the CGI under suexec+apache2 (contributed by William McKee) +---------------------------------------------------------------------- + +To enable suexec, you'll probably need to recompile Apache2: + + apt-get source apache2 + apt-get build-dep apache2 + cd apache2_2.0.54 + edit debian/rules and change the --suexec-docroot to / + dpkg-buildpackage -rfakeroot -b + dpkg -i ../apache2_2.0.54-4_i386.deb + dpkg -i ../apache2-common_2.0.54-4_i386.deb + dpkg -i ../apache2-utils_2.0.54-4_i386.deb + dpkg -i ../apache2-mpm-prefork_2.0.54-4_i386.deb + +Disable sgid on index.cgi: + + chmod u-s /usr/share/backuppc/cgi-bin/index.cgi + +Fix permissions on cgi-bin: + + chown backuppc:backuppc /usr/share/backuppc/cgi-bin + +Modify /etc/backuppc/apache.conf: + + + ServerName backuppc + SuexecUserGroup backuppc backuppc + DocumentRoot /usr/share/backuppc/cgi-bin + + Alias /backuppc /usr/share/backuppc/cgi-bin + + AllowOverride None + Options ExecCGI MultiViews Indexes + SymLinksIfOwnerMatch IncludesNoExec + DirectoryIndex index.cgi + AddHandler cgi-script .cgi + + AuthType Basic + AuthUserFile /etc/backuppc/htpasswd + AuthName "BackupPC admin" + require valid-user + + + + +Debian Modifications +-------------------- + +- Modified Perl scripts for having main config files (hosts and config.pl) +in /etc/backuppc. +- Data directory is /var/lib/backuppc/ + + +/etc/default/backuppc +--------------------- + +You can change the nice value by adding a line like 'NICE=10' to +/etc/default/backuppc + +You can change the ionice value by adding a line like 'IONICE=idle' +to /etc/default/backuppc + + + + + -- Ludovic Drolez , Mon, 16 Jun 2004 10:43:48 +0200 --- backuppc-3.3.1.orig/debian/apache.conf +++ backuppc-3.3.1/debian/apache.conf @@ -0,0 +1,22 @@ +Alias /backuppc /usr/share/backuppc/cgi-bin/ + + + AllowOverride None + Allow from all + + # Uncomment the line below to ensure that nobody can sniff importanti + # info from network traffic during editing of the BackupPC config or + # when browsing/restoring backups. + # Requires that you have your webserver set up for SSL (https) access. + #SSLRequireSSL + + Options ExecCGI FollowSymlinks + AddHandler cgi-script .cgi + DirectoryIndex index.cgi + + AuthUserFile /etc/backuppc/htpasswd + AuthType basic + AuthName "BackupPC admin" + require valid-user + + --- backuppc-3.3.1.orig/debian/backuppc.config +++ backuppc-3.3.1/debian/backuppc.config @@ -0,0 +1,28 @@ +#!/bin/sh -e + +. /usr/share/debconf/confmodule + +db_version 2.0 + +db_input high backuppc/reconfigure-webserver || true +db_input low backuppc/restart-webserver || true +db_go + +if [ ! -f /etc/backuppc/htpasswd ]; then + db_get "backuppc/tmppass" + PASS=$RET + if [ "$PASS" != "" ]; then + # already set... do nothing + echo + else + PASS=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..8)'` + db_set "backuppc/tmppass" "$PASS" + fi + db_subst "backuppc/configuration-note" "site" `hostname -f` + db_subst "backuppc/configuration-note" "pass" "$PASS" + db_input high "backuppc/configuration-note" || true + db_go +fi + +db_stop +exit 0 --- backuppc-3.3.1.orig/debian/backuppc.default +++ backuppc-3.3.1/debian/backuppc.default @@ -0,0 +1,4 @@ +# Nice BackupPC daemon value +NICE=0 +# IO Scheduling BackupPC daemon +# IONICE=idle --- backuppc-3.3.1.orig/debian/backuppc.doc-base +++ backuppc-3.3.1/debian/backuppc.doc-base @@ -0,0 +1,9 @@ +Document: backuppc +Title: BackupPC Manual +Author: Craig Baratt +Abstract: BackupPC user and administrator's manual +Section: File Management + +Format: HTML +Index: /usr/share/doc/backuppc/BackupPC.html +Files: /usr/share/doc/backuppc/*.html --- backuppc-3.3.1.orig/debian/backuppc.init +++ backuppc-3.3.1/debian/backuppc.init @@ -0,0 +1,97 @@ +#! /bin/sh +# /etc/init.d/backuppc +# +# BackupPC Debian init script +# +### BEGIN INIT INFO +# Provides: backuppc +# Required-Start: $syslog $network $remote_fs +# Required-Stop: $syslog $network $remote_fs +# Should-Start: $local_fs autofs +# Should-Stop: $local_fs autofs +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +# Short-Description: Launch backuppc server +# Description: Launch backuppc server, a high-performance, +# enterprise-grade system for backing up PCs. +### END INIT INFO + +set -e + +# Do not change the values below ! Read /usr/share/doc/backuppc/README.Debian ! +BINDIR=/usr/share/backuppc/bin +DATADIR=/var/lib/backuppc +USER=backuppc +NICE=0 +IONICE=best-effort + +test -f /etc/default/backuppc && . /etc/default/backuppc + +# +NAME=backuppc +DAEMON=BackupPC + +test -x $BINDIR/$DAEMON || exit 0 +. /lib/lsb/init-functions +[ -r /etc/default/rcS ] && . /etc/default/rcS + +if [ ! -d /var/run/backuppc ]; then + mkdir /var/run/backuppc + chown backuppc:backuppc /var/run/backuppc +fi + +# Check for incompatible old config files +check_old_config() +{ + BAD=0 + CONF=/etc/backuppc/config.pl + + grep -q IncrLevel $CONF || BAD=1 + + if [ "$BAD" = "1" ]; then + echo "BackupPC cannot be started because important parameters are missing from config.pl." + echo "If you just upgraded BackupPC, please update /etc/backuppc/config.pl." + exit 1 + fi +} + + +case "$1" in + start) + log_begin_msg "Starting $NAME..." + check_old_config + start-stop-daemon --start --pidfile /var/run/backuppc/BackupPC.pid \ + --nicelevel $NICE --iosched $IONICE -c $USER --exec $BINDIR/$DAEMON -- -d + log_end_msg $? + ;; + stop) + log_begin_msg "Stopping $NAME..." + start-stop-daemon --stop --pidfile /var/run/backuppc/BackupPC.pid -u $USER \ + --oknodo --retry 30 + log_end_msg $? + ;; + restart) + log_begin_msg "Restarting $NAME..." + start-stop-daemon --stop --pidfile /var/run/backuppc/BackupPC.pid -u $USER \ + --oknodo --retry 30 + check_old_config + start-stop-daemon --start --pidfile /var/run/backuppc/BackupPC.pid \ + --nicelevel $NICE --iosched $IONICE -c $USER --exec $BINDIR/$DAEMON -- -d + log_end_msg $? + ;; + reload|force-reload) + log_begin_msg "Reloading $NAME configuration files..." + start-stop-daemon --stop --pidfile /var/run/backuppc/BackupPC.pid \ + --signal 1 + log_end_msg $? + ;; + status) + status_of_proc "$BINDIR/$DAEMON" "$NAME" && exit 0 || exit $? + ;; + *) + log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart|reload|status}" + exit 1 + ;; +esac + +exit 0 --- backuppc-3.3.1.orig/debian/backuppc.templates +++ backuppc-3.3.1/debian/backuppc.templates @@ -0,0 +1,30 @@ +Template: backuppc/configuration-note +Type: note +_Description: Web administration default user created + BackupPC can be managed through its web interface: + http://${site}/backuppc/ + . + For that purpose, a web user named 'backuppc' with '${pass}' as password + has been created. You can change this password by + running 'htpasswd /etc/backuppc/htpasswd backuppc'. + +Template: backuppc/reconfigure-webserver +Type: multiselect +Choices: apache2 +Default: apache2 +_Description: Which web server would you like to reconfigure automatically: + BackupPC supports any web server with CGI enabled, but this automatic + configuration process only supports Apache. + +Template: backuppc/restart-webserver +Type: boolean +Default: true +_Description: Do you want to restart the webservers now if needed? + Remember that in order to activate the new configuration + the webservers have to be restarted. + +Template: backuppc/tmppass +Type: password +Description: Temporary password for internal use + Temporary password. Should not be translated. + --- backuppc-3.3.1.orig/debian/changelog +++ backuppc-3.3.1/debian/changelog @@ -0,0 +1,904 @@ +backuppc (3.3.1-4ubuntu1.1) bionic; urgency=medium + + * d/rules: Specify canonical path to ping6 (LP: #782890) + + -- Michal Maloszewski Fri, 05 Aug 2022 14:37:19 +0200 + +backuppc (3.3.1-4ubuntu1) zesty; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/backuppc.init, debian/rules: Do not call init script on shutdown + and reboot (TearDown) (Closes: #488660). + - (Inline) apply patch to add support for ipv6. (LP: #54918). Depend and + Build-Depend on libsocket6-perl for that. (LP: #1515986) + - debian/rules: installing setuid wrapper with setuid bit set, and no + permissions granted to other (mode 4750). + * Dropped changes: + - Dropping par2 from build-deps. We can b-d on universe packages now. + - Versioned dep on libcgi-pm-perl. The last LTS has the version we need. + - Escaping braces in Perl regex. Debian added this too. + - Depending on default-mta instead of enumerated list. Debian did similar. + - Moving config.pl.diff. Makes it hard to stay in sync with Debian and + doesn't add any benefit except cleanliness of the path. + * debian/patches/setuid.patch: + - Fix status page pool graphs by running rddtool as the backuppc user. + (LP: #1612600) + + -- Michael Terry Wed, 14 Dec 2016 15:44:17 -0500 + +backuppc (3.3.1-4) unstable; urgency=low + + * Added dependency on libcgi-pm-perl. Closes: #820092 + * Fixed unescaped left brace in rege. Closes: #820110 + * Remove /etc/backuppc/htpasswd /etc/backuppc/pc on purge. + Closes: #810691 + + -- Ludovic Drolez Wed, 30 Nov 2016 19:57:51 +0100 + +backuppc (3.3.1-3) unstable; urgency=medium + + * Regexps fix for smbclient >= 4.2 to avoid failing SMB backups + And set $Conf{BackupZeroFilesIsFatal} = 0 in the default config.pl + Closes: #820963 + * Workaround for SMB restores: '-d' 5 is now the default for smbclient + * Added some cleanup regexps for SMB backup logs + + -- Ludovic Drolez Mon, 23 May 2016 14:11:28 +0200 + +backuppc (3.3.1-2ubuntu4) yakkety; urgency=medium + + * Make dependency on libcgi-pm-perl a versioned one so that upgrades from + 14.04 work. (LP: #1610756) + + -- Brian Murray Thu, 15 Sep 2016 12:04:22 -0700 + +backuppc (3.3.1-2ubuntu3) xenial; urgency=medium + + * Add build dependency on libcgi-pm-perl. LP: #1571278, Closes: 820092 + + -- Simon Deziel Sun, 17 Apr 2016 12:23:32 +0000 + +backuppc (3.3.1-2ubuntu2) xenial; urgency=medium + + * Escape braces in Perl regex. LP: #1570987, Closes: 820110 + + -- Simon Deziel Fri, 15 Apr 2016 17:31:50 +0000 + +backuppc (3.3.1-2ubuntu1) xenial; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - debian/backuppc.init, debian/rules: Do not call init script on shutdown + and reboot (TearDown) (Closes: #488660). + - debian/control: + + Depend on default-mta | mail-transport-agent, instead of enumerating a + long list of alternative MTAs. + + Drop build dependency to 'par2', it's in universe. + + Add build dependency on libsocket6-perl. + - configure.pl: Do not test for par2 being available at build time. + - (Inline) apply patch to add support for ipv6. (LP: #54918). Depend on + libsocket6-perl for that. (LP: #1515986) + - debian/rules: installing setuid wrapper with setuid bit set, and no + permissions granted to other (mode 4750). + + -- Martin Pitt Tue, 12 Jan 2016 10:18:11 +0100 + +backuppc (3.3.1-2) unstable; urgency=medium + + * Perl 5.22 fix. Closes: #809626 + * Only remove /etc/backuppc/config.pl on purge. Closes: #800001 + * Added BackupPC_deleteFile. Closes: #806671 + + -- Ludovic Drolez Tue, 05 Jan 2016 20:48:20 +0100 + +backuppc (3.3.1-1ubuntu1) xenial; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/backuppc.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Closes: #488660). + - debian/control: + + Depend on default-mta | mail-transport-agent, instead of enumerating a + long list of alternative MTAs. + + Drop build dependency to 'par2', it's in universe. + + Add build dependency on libsocket6-perl. + - configure.pl: Do not test for par2 being available at build time. + * Depend on libsocket6-perl as well as build-depend. LP: #1515986 + + -- Jackson Doak Sat, 14 Nov 2015 09:38:40 +1100 + +backuppc (3.3.1-1) unstable; urgency=low + + * New upstream release + * Now depends on libtime-parsedate-perl. Closes: #749879 + * Added support for IONICE in startup script. Closes: #772149 + + -- Ludovic Drolez Mon, 10 Aug 2015 18:10:59 +0200 + +backuppc (3.3.0-2ubuntu1) utopic; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - debian/backuppc.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Closes: #488660). + - debian/control: + + Depend on default-mta | mail-transport-agent, instead of enumerating a + long list of alternative MTAs. + + Drop build dependency to 'par2', it's in universe. + + Add build dependency on libsocket6-perl + - configure.pl: Do not test for par2 being available at build time. + + -- Jackson Doak Fri, 22 Aug 2014 06:59:23 +1000 + +backuppc (3.3.0-2) unstable; urgency=low + + * Depends on apache2-utils + * removed a superfluous libtime-modules-perl. Closes: #734356 + * Typo in log message fixed. Closes: #731087 + * using dpkg-buildflags + + -- Ludovic Drolez Thu, 06 Feb 2014 12:41:22 +0100 + +backuppc (3.3.0-1ubuntu1) trusty-proposed; urgency=low + + * Merge from Debian unstable. Remaining changes: (LP: #1201029) + - debian/backuppc.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Closes: #488660). + - debian/control: + + Remove estraneous libtime-modules-perl (Closes: #734356). + + Depend on default-mta | mail-transport-agent, instead of enumerating a + long list of alternative MTAs. + + -- Louis Bouchard Wed, 15 Jan 2014 09:33:13 -0600 + +backuppc (3.3.0-1) unstable; urgency=low + + * New upstream release. Closes: #716824 + * Fix Typo in kill signal name (ALRM vs ARLM). Closes: #698441 + * Enable Apache2 (2.4) configuration by default in debconf. + + -- Ludovic Drolez Thu, 12 Sep 2013 6:13:50 +0200 + +backuppc (3.2.1-5.2) unstable; urgency=low + + * Non-maintainer upload. + * Patch BackupPC.pod for POD errors with Perl 5.18 + pod2man has become more strict with perl 5.18. The applied patch + converts the non-7-bit clean character into UTF-8 and declares the + file's encoding as such. + Thanks to Dominic Hargreaves (Closes: #719827) + + -- Salvatore Bonaccorso Sat, 24 Aug 2013 15:29:57 +0200 + +backuppc (3.2.1-5.1) unstable; urgency=low + + * Non-maintainer upload. + * Do not ship /etc/backuppc/config.pl as a conffile; it is handled + by ucf already (Closes: #706315) + + -- Jonathan Wiltshire Fri, 07 Jun 2013 11:42:08 +0100 + +backuppc (3.2.1-5) unstable; urgency=low + + * Added libtime-modules-perl dependency. Closes: #525395 + * Remove /var/lib/backuppc/pc/localhost if it's empty + Closes: #672372 + * Added stuff to support Apache 2.4. Closes: #669765 + * Added NICE support in /etc/default/backuppc. Closes: #639102 + * Changed the default display date format. Closes: #663975 + + -- Ludovic Drolez Thu, 03 Jan 2013 17:27:35 +0100 + +backuppc (3.2.1-4ubuntu2) trusty; urgency=medium + + * Specify pod2man encoding. + + -- Dimitri John Ledkov Fri, 20 Dec 2013 02:17:32 +0000 + +backuppc (3.2.1-4ubuntu1) raring; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/backuppc.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660). + - debian/control: + + Add dependency for libsocket6-perl. + + Drop build dependency to 'par2', it's in universe. + + Depend on default-mta | mail-transport-agent, instead of enumerating a + long list of alternative MTAs. + - configure.pl: Do not test for par2 being available at build time. + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + - debian/rules: installing setuid wrapper with setuid bit set, and no + permissions granted to other (mode 4750). + + -- Logan Rosen Sun, 06 Jan 2013 03:04:32 -0500 + +backuppc (3.2.1-4) unstable; urgency=low + + * init.d status support. Closes: #651539 + * fixed a qw() bug. Closes: #650522 + + -- Ludovic Drolez Thu, 20 Dec 2012 17:59:28 +0100 + +backuppc (3.2.1-3ubuntu1) raring; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Add dependency for libsocket6-perl. + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + - debian/rules: installing setuid wrapper with setuid bit set, and no + permissions granted to other (mode 4750) + + -- Logan Rosen Wed, 14 Nov 2012 13:30:30 -0500 + +backuppc (3.2.1-3) unstable; urgency=high + + * urgency set to high because of a security fix + * fixed the XSS in CGI/RestoreFile.pm. CVE-2011-5081. Closes: #673331 + * added the Polish debconf translation. Closes: #673698 + * updated Danish translation. Closes: #659456 + * added autofs in init.d's Should-Start/Should-Stop. Closes: #662908 + + -- Ludovic Drolez Thu, 31 May 2012 11:51:16 +0200 + +backuppc (3.2.1-2ubuntu2) quantal; urgency=low + + * SECURITY UPDATE: XSS in CGI/RestoreFile.pm + - lib/BackupPC/CGI/RestoreFile.pm: update to escape share and backup + number + - CVE-2011-5081 + + -- Jamie Strandboge Thu, 17 May 2012 15:46:43 -0500 + +backuppc (3.2.1-2ubuntu1) precise; urgency=low + + * Merge from Debian testing. Remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Add dependency for libsocket6-perl. + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + - debian/rules: installing setuid wrapper with setuid bit set, and no + permissions granted to other (mode 4750) + + -- Chuck Short Sun, 06 Nov 2011 05:47:04 +0000 + +backuppc (3.2.1-2) unstable; urgency=high + + * Really fix CVE-2011-3361. Closes: #646865 + + -- Ludovic Drolez Thu, 02 Nov 2011 11:03:38 +0100 + +backuppc (3.2.1-1ubuntu2) precise; urgency=low + + * SECURITY UPDATE: XSS in CGI/View.pm + - lib/BackupPC/CGI/View.pm: update to verify backup number is numeric + - CVE-2011-XXXX + + -- Jamie Strandboge Thu, 27 Oct 2011 14:47:58 -0500 + +backuppc (3.2.1-1ubuntu1) oneiric; urgency=high + + * Merge from debian unstable. (LP: #852484) Remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Add dependency for libsocket6-perl. + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + - debian/rules: installing setuid wrapper with setuid bit set, and no + permissions granted to other (mode 4750) + + -- Allison Randal Sun, 18 Sep 2011 17:37:55 -0700 + +backuppc (3.2.1-1) unstable; urgency=high + + * New upstream release. Closes: #641450 + * urgency set to high because of a security fix + + -- Ludovic Drolez Tue, 13 Sep 2011 20:38:00 +0200 + +backuppc (3.2.0-4.1) unstable; urgency=low + + * Non-maintainer upload. + * Use inetutils-ping as an alternative to iputils-ping. Closes: #630777 + + -- Bernd Zeimetz Tue, 28 Jun 2011 22:31:10 +0200 + +backuppc (3.2.0-4ubuntu1) oneiric; urgency=low + + * Merge from debian unstable. Remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Add dependency for libsocket6-perl. + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + - debian/rules: installing setuid wrapper with setuid bit set, and no + permissions granted to other (mode 4750) + + -- Allison Randal Wed, 15 Jun 2011 16:28:41 -0700 + +backuppc (3.2.0-4) unstable; urgency=low + + * debian/setuidwrapper.c: New. + * debian/rules: Build setuidwrapper as cgi-bin/index.cgi; install real + index.cgi as lib/realindex.cgi. Closes: #581950. + * control: Remove depends on perl-suid. Change to Architecture any, add + ${shlibs:Depends}. + + -- Ludovic Drolez Sat, 07 May 2011 10:11:56 -0500 + +backuppc (3.2.0-3ubuntu5) oneiric; urgency=low + + * Replace dependency on perl-suid with a small setuid wrapper, since the + perl-suid package been removed in Perl 5.12. (LP: #786250) + + -- Allison Randal Sun, 29 May 2011 17:49:10 -0700 + +backuppc (3.2.0-3ubuntu4) natty; urgency=low + + * debian/control: Add dependency for libsocket6-perl. + (LP: #742748) + + -- Chuck Short Mon, 04 Apr 2011 07:32:43 -0400 + +backuppc (3.2.0-3ubuntu3) natty; urgency=low + + * Fix FTBFS. + + -- Chuck Short Mon, 07 Mar 2011 12:31:14 -0500 + +backuppc (3.2.0-3ubuntu2) natty; urgency=low + + * Applied ipv6-support.dpatch, debian/control: + Add support for ipv6. (LP: #54918) + + -- Chuck Short Mon, 07 Mar 2011 11:35:50 -0500 + +backuppc (3.2.0-3ubuntu1) natty; urgency=low + + * Merge from debian unstable. (LP: #702812) Remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + + -- Angel Abad Fri, 14 Jan 2011 11:02:06 +0100 + +backuppc (3.2.0-3) unstable; urgency=low + + * Shell characters are now properly escaped. Closes: #516626 + * Added in README.Debian instructions for IPv6 hosts. Closes: #594091 + * Removed /etc/backuppc/htgroup. Closes: #594692 + + -- Ludovic Drolez Mon, 10 Jan 2011 12:29:07 +0100 + +backuppc (3.2.0-2ubuntu1) natty; urgency=low + + * Merge from debian unstable. (LP: #698028) Remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + + -- Angel Abad Thu, 06 Jan 2011 10:34:00 +0100 + +backuppc (3.2.0-2) unstable; urgency=low + + * re-added the xfs/rfs pool size patch. Closes: #600654 + * updated the pt_BR debconf translation. Closes: #607405 + + -- Ludovic Drolez Sun, 02 Jan 2011 19:33:07 +0100 + +backuppc (3.2.0-1.1ubuntu1) natty; urgency=low + + * Merge from debian unstable (LP: #690073). Remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + + -- Angel Abad Tue, 14 Dec 2010 08:54:57 +0100 + +backuppc (3.2.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Add depends on libwww-perl (Closes: #602787) + + -- Patrick Winnertz Fri, 26 Nov 2010 14:37:21 +0100 + +backuppc (3.2.0-1ubuntu1) natty; urgency=low + + * Merge from debian unstable. (LP: #677799) Remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + * Dropped changes: + - Suggest libio-dirent-perl, its in universe (now in main) + - debian/control: Add libtime-modules-perl to Depends (applied in Debian) + + -- Angel Abad Sun, 21 Nov 2010 14:59:53 +0100 + +backuppc (3.2.0-1) unstable; urgency=low + + * New upstream release + + -- Ludovic Drolez Wed, 06 Oct 2010 20:57:45 +0200 + +backuppc (3.1.0-10) unstable; urgency=low + + * Dependenct added: libtime-modules-perl. Closes: #570843 + * Removed useless logging. Closes: #558431 + + -- Ludovic Drolez Mon, 12 Apr 2010 20:30:28 +0200 + +backuppc (3.1.0-9ubuntu2) maverick; urgency=low + + * debian/control: Add libtime-modules-perl to Depends (LP: #525395) + Forwarded to Debian as b.d.o/570843 + + -- Angel Abad Sun, 21 Feb 2010 20:56:57 +0100 + +backuppc (3.1.0-9ubuntu1) lucid; urgency=low + + * Resynchronize with debian, remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + - Suggest libio-dirent-perl, its in universe. + + -- Chuck Short Fri, 18 Dec 2009 10:44:41 -0500 + +backuppc (3.1.0-9) unstable; urgency=low + + * chown/chmod only the needed dirs. Closes: #531948 + * added 'Allow from all' in apache conf. Closes: #538976 + * depends on samba-common-bin. Closes: #546660 + * depends on default-mta. Closes: #539796 + * added the xfs/rfs pool size patch. Closes: #556729 #544852 + * specified a font name for graphs. Closes: #544853 + * updated debconf translations. Closes: #526699 + * added a nice value in the init. Closes: #438614 + * only keep apache2 auto-config. Closes: #528965 + + -- Ludovic Drolez Tue, 24 Nov 2009 10:34:10 +0100 + +backuppc (3.1.0-8ubuntu1) lucid; urgency=low + + * Merge from debian testing, remaining changes: + - debian/backup.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time + - debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + - Suggest libio-dirent-perl, its in universe. + + -- Chuck Short Fri, 06 Nov 2009 00:30:12 +0000 + +backuppc (3.1.0-8) unstable; urgency=high + + * Really fix the alias bug. Closes: #542218 + * Small init.d file fix + + -- Ludovic Drolez Fri, 09 Oct 2009 20:58:32 +0200 + +backuppc (3.1.0-7) unstable; urgency=high + + * Disable the modification of the alias for normal users. Closes: #542218 + * Recommends: libio-dirent-perl. Closes: #518554 + * manage config.pl with ucf. Closes: #483573 + + -- Ludovic Drolez Tue, 01 Sep 2009 14:43:36 +0200 + +backuppc (3.1.0-6ubuntu4) karmic; urgency=low + + * SECURITY UPDATE: authorization bypass via ClientNameAlias function + - debian/patches/security-CVE-2009-3369.dpatch: disable ClientNameAlias + usage by normal users in lib/BackupPC/CGI/EditConfig.pm. + - CVE-2009-3369 + + -- Marc Deslauriers Mon, 05 Oct 2009 11:40:41 -0400 + +backuppc (3.1.0-6ubuntu3) karmic; urgency=low + + * Add dpatch system to package. + - debian/control: Add build dependency on dpatch. + - debian/rules: Add dpatch targets. + * Add missing "use Encode" in sendEmail. (LP: #430879) + * Fix encoding of special characters in french translation. (LP: #373327) + + -- Michael Jeanson Wed, 16 Sep 2009 18:04:03 -0400 + +backuppc (3.1.0-6ubuntu2) karmic; urgency=low + + * debian/control: depend on default-mta | mail-transport-agent, instead of + enumerating a long list of alternative MTAs. + + -- Steve Langasek Mon, 03 Aug 2009 17:28:07 +0000 + +backuppc (3.1.0-6ubuntu1) karmic; urgency=low + + * Merge with Debian unstable; remaining Ubuntu changes: + - debian/backuppc.init, debian/rules, debian/postinst: Do not call init + script on shutdown and reboot (TearDown) (Debian #488660) + - debian/control: Drop build dependency to 'par2', it's in universe. + - configure.pl: Do not test for par2 being available at build time. + + -- Martin Pitt Tue, 28 Apr 2009 13:26:14 +0200 + +backuppc (3.1.0-6) unstable; urgency=high + + * Fix the permissions of the CGI script. Closes: #518518 + * Fix the permissions of htpasswd/htgroup files + * Enabled MD5 hash for htpasswd by default + + -- Ludovic Drolez Tue, 31 Mar 2009 11:30:48 +0200 + +backuppc (3.1.0-5) unstable; urgency=low + + * MTA dependency added. Closes: #458961 + * iputils-ping dependency added. Closes: #516147 + * remove the /etc/$webserver/conf.d/backuppc link if present. Closes: #516159 + * Small debian/rules fix. Closes: #488659 + * Apache1 dep removed. Closes: #488656 + * /etc/backuppc/localconfig.pl can be used for customizations to config.pl. + Closes: #375998 + * Updated debconf translations. Closes: #513665, #503741 + * Enable basic auth apache2 modules + + -- Ludovic Drolez Tue, 03 Mar 2009 21:29:55 +0100 + +backuppc (3.1.0-4) unstable; urgency=medium + + * Failing SMB backups: removed the '-N' option for smbclient because + of an undocumented change in samba. See bug #501057 + * Updated Sweedish debconf file. Closes: #491937 + * Added Russian debconf file. Closes: #501756 + * Added Finnish debconf file. Closes: #501934 + * Added Ukrainian debconf file. Closes: #501977 + * Added Basque debconf file. Closes: #502076 + * Added Italian debconf file. Closes: #502463 + * Changed the doc-base section to `File Management' + * Documented some known bugs with WAs. + + -- Ludovic Drolez Tue, 07 Oct 2008 20:10:20 +0200 + +backuppc (3.1.0-3) unstable; urgency=low + + * Added backuppc to /etc/aliases. Closes: #438331 + * Moved the pool size graphs to the bottom. Closes: #476659 + * Watch file fixed + + -- Ludovic Drolez Tue, 8 Apr 2008 12:26:57 +0200 + +backuppc (3.1.0-2) unstable; urgency=low + + * patched backuppc to show a nice rrdtool graph of the pool size. + * added a conflicts: libfile-rsyncp-perl (< 0.68). Closes: #431979 + * removed the forgotten wwwconfig-common from dependencies + * Japanese debconf template updated. Closes: #463646 + * Added the SSL option in apache.conf. Closes: #437685 + + -- Ludovic Drolez Thu, 21 Feb 2008 20:49:07 +0100 + +backuppc (3.1.0-1) unstable; urgency=low + + * New upstream release. Closes: #437451 + * Moved MTAs, rsync and openssh to the recommends line. Smbclient is still needed. + Closes: #454795, #441337 + * symlink /etc/backuppc/pc to /etc/backuppc to follow the doc. Closes: #436793 + * moved the creation of /var/lib/backuppc/pc/localhost to the postinst. Closes: #451922 + * Added the PT debconf translation. Closes: #434291 + * Unfuzzy config.pl.diff. Closes: #452673 + * Support /var/run on tmpfs and use LSB logging. Closes: #452672 + * Properly remove /etc/apache*/conf.d/backuppc.conf. Closes: #452677 + + -- Ludovic Drolez Fri, 7 Dec 2007 10:54:44 +0100 + +backuppc (3.0.0-4) unstable; urgency=high + + * Clear the remaining password in config.dat. Closes: #436681 + + -- Ludovic Drolez Mon, 27 Aug 2007 18:28:25 +0200 + +backuppc (3.0.0-3) unstable; urgency=medium + + * Added bzip2 in the dependencies. Closes: #420030 + * Added a LSB section in the init script. + + -- Ludovic Drolez Sun, 20 May 2007 16:38:13 +0200 + +backuppc (3.0.0-2.1) unstable; urgency=high + + * Non-maintainer upload during BSP. + * Fix non-conditional use of debconf during purge (Closes: #416650). + * Updated German translation, thanks Erik Schanze (Closes: #412020). + * Updated Czech translation, thanks Martin Sin (Closes: #412729). + + -- Luk Claes Thu, 17 May 2007 00:37:56 +0200 + +backuppc (3.0.0-2) unstable; urgency=low + + * Bzip2 path changed. Closes: #410858 + * Refuse to run the daemon if an old config.pl file is detected. + + -- Ludovic Drolez Wed, 14 Feb 2007 8:27:12 +0100 + +backuppc (3.0.0-1) unstable; urgency=low + + * New upstream release. Closes: #369684, #377084, #406681, #405822, #408916 + * /etc/backuppc is now owned by user backuppc, so that the CGI can modify the + configuration. + * README.Debian updated. Closes: #407467 + * Updated README.Debian with information about the backuppc account, and + about installation with Apache 2.2.x. Closes: #390798 + * Do not use wwwconfig-common anymore. Closes: #304901, #249010 + + -- Ludovic Drolez Mon, 5 Feb 2007 10:12:51 +0100 + +backuppc (2.1.2-5) unstable; urgency=medium + + * upstream patch 2.1.2pl1 applied. Closes: #369425, #355112 + * added -D to rsync flags. Closes: #365437, #358319 + * localhost incremental backups fixed. Closes: #369465 + * suggests openssh-client or ssh-client. Closes: #369464 + * paths in the documentation fixed. Closes: #369428 + + -- Ludovic Drolez Wed, 7 Jun 2006 10:00:31 +0200 + +backuppc (2.1.2-4) unstable; urgency=low + + * Added BackupPC-2.1.2pl0.diff. Closes: #347930 + + -- Ludovic Drolez Mon, 23 Jan 2006 21:43:30 +0100 + +backuppc (2.1.2-3) unstable; urgency=low + + * Added Spanish and Swedish debconf translations. Closes: #333877, #330940 + * Avoid the creation of etc/config.pl.orig + * DH_COMPAT=4 + + -- Ludovic Drolez Sun, 8 Jan 2006 23:52:56 +0100 + +backuppc (2.1.2-2) unstable; urgency=low + + * Added misc:Depends in control file. Closes: #331756. + + -- Ludovic Drolez Sun, 13 Nov 2005 13:40:15 +0100 + +backuppc (2.1.2-1) unstable; urgency=low + + * New upstream release. Closes: #327125, #317714. + + -- Ludovic Drolez Thu, 8 Sep 2005 18:25:22 +0200 + +backuppc (2.1.1-4) unstable; urgency=medium + + * Fixed an important bug in BackupPC_tarCreate which can cause archives to + be corrupted. + * Put pid file in /var/run/backuppc/BackupPC.pid, Closes: #317748 + * Check if ssh and par2 exists. Closes: #319246 + * Now depends on a MTA. + + -- Ludovic Drolez Mon, 22 Aug 2005 18:55:15 +0200 + +backuppc (2.1.1-3) unstable; urgency=low + + * Typo in french translation removed. Closes: #305475 + * Added Vietnamese debconf translation. Closes: #309327 + * Added Czech debconf translation. Closes: #304877 + * Added instructions in README.Debian on installing the CGI under + suexec+apache2 (contributed by William McKee). Closes: #309700 + + -- Ludovic Drolez Tue, 28 Jun 2005 13:02:06 +0200 + +backuppc (2.1.1-2) unstable; urgency=low + + * Added a patch to have backuppc detach correclty. Closes: #301057 + * Hostname fix. Closes: #301360 + * Small CGI fix: the host config file link was not present. + + -- Ludovic Drolez Fri, 1 Apr 2005 22:07:03 +0200 + +backuppc (2.1.1-1) unstable; urgency=low + + * New upstream release + * Do not modify config.pl in the postinst. + Thanks to Peter Palfrader for the patch. Closes: #301076. + * Moved the 'rm -rf /etc/backuppc'. Closes: #301084. + * Check that backuppc.config is not run 2 times before generating + a random password. Closes: #301087. + * Added /bin/sh as shell for the backuppc user. Closes: #299852. + + -- Ludovic Drolez Fri, 18 Mar 2005 20:25:47 +0100 + +backuppc (2.1.0-10) unstable; urgency=medium + + * Explicitly run /usr/bin/env : do not rely on the PATH. + Closes: #297879. + Priority set to medium since it could break existing setups. + * Removed the debconf templates which should not be translated. + * Added pt_BR debconf translation. Closes: #297052 + + -- Ludovic Drolez Mon, 28 Feb 2005 18:56:02 +0100 + +backuppc (2.1.0-9) unstable; urgency=low + + * A random password is generated for backuppc http user. Closes: #293848 + * $Conf{CgiURL} corrected in configure.pl. Closes: #287281 + * Added 'env LC_ALL=C' before tar in config.pl to prevent locale problems + * added the tarssh-sudo.pl example configuration file. + * postrm script fixed. Closes: #293847 + * config comment fixed. Closes: #279041 + + -- Ludovic Drolez Tue, 28 Dec 2004 15:38:06 +0100 + +backuppc (2.1.0-8) unstable; urgency=low + + * Postinst script fixed. Closes: Bug#283755 + + -- Ludovic Drolez Sat, 4 Dec 2004 01:54:02 +0100 + +backuppc (2.1.0-7) unstable; urgency=low + + * Depends on libfile-rsyncp-perl >= 0.50. Closes: #279649 + + -- Ludovic Drolez Fri, 5 Nov 2004 14:03:38 +0100 + +backuppc (2.1.0-6) unstable; urgency=medium + + * Moved 'db_stop' after 'db_purge'. Closes: #276306 + * Urgency=medium because this important bug was fixed. + * Po-debconf translations updated. Closes: #270786, #271100, #274656 + + -- Ludovic Drolez Thu, 21 Oct 2004 23:43:18 +0200 + +backuppc (2.1.0-5) unstable; urgency=low + + * Added the pl1 patch. Closes: #270230 + * Postint modified to use a2enmod. Closes: #269434 + + -- Ludovic Drolez Thu, 9 Sep 2004 08:56:10 +0200 + +backuppc (2.1.0-4) unstable; urgency=medium + + * Backuppc now asks if it can modify the apache config. Closes: #268068 + * Urgency=medium because an RC bug has been fixed. + * fr.po updated. + + -- Ludovic Drolez Tue, 31 Aug 2004 20:19:55 +0200 + +backuppc (2.1.0-3) unstable; urgency=medium + + * Added a patch to make the archive feature working. Closes: Bug#263409 + * Urgency=medium because this upload fixes a new feature of backuppc 2.1 + * User backuppc now created as a system user since it's mainly used + to run the daemon. Closes: Bug#255498 + + -- Ludovic Drolez Thu, 5 Aug 2004 20:53:37 +0200 + +backuppc (2.1.0-2) unstable; urgency=low + + * Removed a slash in the apache alias. Closes: Bug#261108 + * Removed a few checks in the configure script. Closes: Bug#261041 + * added a 'dpkg-statoverride --remove' in the postrm script + + -- Ludovic Drolez Fri, 23 Jul 2004 22:49:11 +0200 + +backuppc (2.1.0-1) unstable; urgency=low + + * New upstream release. Closes: #255482 + * Added in README.Debian what additional packages you need for + rsync based backups. Closes: #257518 + * suggests exim4. Closes: #255338 + + -- Ludovic Drolez Thu, 15 Jul 2004 09:30:12 +0200 + +backuppc (2.0.2-6) unstable; urgency=low + + * German debconf translation added. Closes: Bug#250573 + * Dependencies: added apache-ssl | apache-perl + + -- Ludovic Drolez Thu, 3 Jun 2004 09:36:22 +0200 + +backuppc (2.0.2-5) unstable; urgency=low + + * XFerLog filter patch applied. Closes: Bug#248604 + + -- Ludovic Drolez Wed, 12 May 2004 20:05:55 +0200 + +backuppc (2.0.2-4) unstable; urgency=low + + * solved the doc substitution problem. Closes: Bug#237322 + * nl.po debconf translation added. Closes: Bug#241308 + * quiet ssh flag added in $Conf{RsyncClientCmd}. Closes: Bug#242621 + + -- Ludovic Drolez Sat, 10 Apr 2004 00:08:24 +0200 + +backuppc (2.0.2-3) unstable; urgency=low + + * apache2 support. Closes: Bug#214548. + * Japanese po-debconf template translation added. Closes: Bug#227229 + + -- Ludovic Drolez Mon, 15 Mar 2004 23:11:45 +0100 + +backuppc (2.0.2-2) unstable; urgency=low + + * Docbase path fixed. Closes: Bug#224250 + * More copyright info + * Added a mysql backup file example. + + -- Ludovic Drolez Wed, 17 Dec 2003 20:02:35 +0100 + +backuppc (2.0.2-1) unstable; urgency=low + + * New upstream release + * debian/watch added + * chown syntax fixed. Closes: #211987 + * chown/chmod called only on the 1st install. Closes: #214526 + + -- Ludovic Drolez Thu, 16 Oct 2003 21:56:25 +0200 + +backuppc (2.0.0-5) unstable; urgency=low + + * Added gettext based debconf templates. Closes: Bug#205787 + * Added fr.po debconf file. Closes: Bug#206592 + * Added some basic examples + * Fixed the default 'hosts' file: 'localhost' is now owned by 'backuppc' + * Fixed BackupPC_Admin to be able to display config files in /etc/backuppc + * Updated README.debian file. Closes: #203234, #203272 + + -- Ludovic Drolez Mon, 23 Aug 2003 21:34:44 +0200 + +backuppc (2.0.0-4) unstable; urgency=low + + * set Architecture to all + * depends: samba-tng-common or samba-common + * Menu file added. Closes: #201148 + * improved description. Closes: #199170 + + -- Ludovic Drolez Thu, 26 Jun 2003 21:21:21 +0200 + +backuppc (2.0.0-3) unstable; urgency=low + + * added --gecos "" to the adduser line on the postinst. Closes: #198814 + * init script small fix + + -- Ludovic Drolez Thu, 26 Jun 2003 20:57:53 +0200 + +backuppc (2.0.0-2) unstable; urgency=low + + * added dependencies: libdigest-md5-perl + * packaged libfile-rsyncp-perl: you can now use rsync for backups + * images path fixed + * documentation path fixed in cgi script + + -- Ludovic Drolez Wed, 18 Jun 2003 22:08:19 +0200 + +backuppc (2.0.0-1) unstable; urgency=low + + * Initial Release. Closes: Bug#158874. + * modified configure.pl for non-interactive install + * modified perl scripts for having main config files in /etc/backuppc + + -- Ludovic Drolez Mon, 16 Jun 2003 10:43:48 +0200 + --- backuppc-3.3.1.orig/debian/compat +++ backuppc-3.3.1/debian/compat @@ -0,0 +1 @@ +5 --- backuppc-3.3.1.orig/debian/config.pl.diff +++ backuppc-3.3.1/debian/config.pl.diff @@ -0,0 +1,76 @@ +--- config.pl 2016-05-25 19:39:59.558740903 +0200 ++++ debian/backuppc/etc/backuppc/config.pl 2016-01-06 11:49:00.000000000 +0100 +@@ -41,7 +41,10 @@ + # + # Host name on which the BackupPC server is running. + # +-$Conf{ServerHost} = 'XXXXXX'; ++$ENV{'PATH'} = '/bin:/usr/bin'; ++delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ++$Conf{ServerHost} = `hostname`; ++chomp($Conf{ServerHost}); + + # + # TCP port number on which the BackupPC server listens for and accepts +@@ -224,7 +227,7 @@ + # Full path to various commands for archiving + # + $Conf{SplitPath} = '/usr/bin/split'; +-$Conf{ParPath} = '/usr/bin/par2'; ++$Conf{ParPath} = '/usr/bin/par2' if -x '/usr/bin/par2'; + $Conf{CatPath} = '/bin/cat'; + $Conf{GzipPath} = '/bin/gzip'; + $Conf{Bzip2Path} = '/bin/bzip2'; +@@ -836,7 +839,7 @@ + # backed up. If you have shares that might be empty (and therefore an + # empty backup is valid) you should set this flag to 0. + # +-$Conf{BackupZeroFilesIsFatal} = 1; ++$Conf{BackupZeroFilesIsFatal} = 0; + + ########################################################################### + # How to backup a client +@@ -1021,7 +1021,7 @@ + # redirection and pipes; put that in a script if you need it. + # + $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' +- . ' $I_option -U $userName -E -d 1' ++ . ' $I_option -U $userName -E -d 5' + . ' -c tarmode\\ full -Tx -'; + + ########################################################################### +@@ -1572,7 +1575,7 @@ + # Full path for ssh. Security caution: normal users should not + # allowed to write to this file or directory. + # +-$Conf{SshPath} = '/usr/bin/ssh'; ++$Conf{SshPath} = '/usr/bin/ssh' if -x '/usr/bin/ssh'; + + # + # Full path for nmblookup. Security caution: normal users should not +@@ -2028,13 +2031,13 @@ + # $Conf{CgiAdminUsers} = 'craig celia'; + # --> administrative users are only craig and celia'. + # +-$Conf{CgiAdminUserGroup} = ''; +-$Conf{CgiAdminUsers} = ''; ++$Conf{CgiAdminUserGroup} = 'backuppc'; ++$Conf{CgiAdminUsers} = 'backuppc'; + + # + # URL of the BackupPC_Admin CGI script. Used for email messages. + # +-$Conf{CgiURL} = 'http://XXXXXX/backuppc/index.cgi'; ++$Conf{CgiURL} = 'http://'.$Conf{ServerHost}.'/backuppc/index.cgi'; + + # + # Language to use. See lib/BackupPC/Lang for the list of supported +@@ -2076,7 +2079,7 @@ + # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero + # for international dates (DD/MM). + # +-$Conf{CgiDateFormatMMDD} = 1; ++$Conf{CgiDateFormatMMDD} = 2; + + # + # If set, the complete list of hosts appears in the left navigation --- backuppc-3.3.1.orig/debian/control +++ backuppc-3.3.1/debian/control @@ -0,0 +1,37 @@ +Source: backuppc +Section: utils +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Ludovic Drolez +Build-Depends: debhelper (>= 5), par2, perl (>= 5.6.0), patch, libsocket6-perl +Standards-Version: 3.9.8 + +Package: backuppc +Architecture: any +Depends: ${shlibs:Depends}, ${perl:Depends}, libdigest-md5-perl, libio-compress-perl | libcompress-zlib-perl, libarchive-zip-perl, tar (>> 1.13), adduser (>=3.9), dpkg (>= 1.15.7.2), apache2 | httpd, ${misc:Depends}, smbclient, samba-common-bin, bzip2, default-mta | exim4 | mail-transport-agent, iputils-ping | inetutils-ping, ucf, libtime-parsedate-perl, libwww-perl, apache2-utils, libcgi-pm-perl, libsocket6-perl +Recommends: rsync, libfile-rsyncp-perl (>= 0.68), openssh-client | ssh-client, rrdtool, libio-dirent-perl +Suggests: w3m | www-browser, par2 +Conflicts: libfile-rsyncp-perl (<< 0.68) +Description: high-performance, enterprise-grade system for backing up PCs + BackupPC is disk based and not tape based. This particularity allows + features not found in any other backup solution: + * Clever pooling scheme minimizes disk storage and disk I/O. + Identical files across multiple backups of the same or different PC are + stored only once resulting in substantial savings in disk storage and disk + writes. Also known as "data deduplication". + * Optional compression provides additional reductions in storage. + CPU impact of compression is low since only new files (those not already + in the pool) need to be compressed. + * A powerful http/cgi user interface allows administrators to view log files, + configuration, current status and allows users to initiate and cancel + backups and browse and restore files from backups very quickly. + * No client-side software is needed. On WinXX the smb protocol is used. + On Linux or Unix clients, rsync or tar (over ssh/rsh/nfs) can be used + * Flexible restore options. Single files can be downloaded from any backup + directly from the CGI interface. Zip or Tar archives for selected files + or directories can also be downloaded from the CGI interface. + * BackupPC supports mobile environments where laptops are only intermittently + connected to the network and have dynamic IP addresses (DHCP). + * Flexible configuration parameters allow multiple backups to be performed + in parallel. + * and more to discover in the manual... --- backuppc-3.3.1.orig/debian/copyright +++ backuppc-3.3.1/debian/copyright @@ -0,0 +1,28 @@ +This package was debianized by Ludovic Drolez on +Mon, 16 Jun 2003 10:43:48 +0200. + +It was downloaded from http://sourceforge.net/projects/backuppc/ + +Upstream Author: Craig Barratt + +Copyright: + + Copyright (C) 2001-2003 Craig Barratt + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301, USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + --- backuppc-3.3.1.orig/debian/dirs +++ backuppc-3.3.1/debian/dirs @@ -0,0 +1,5 @@ +etc/init.d +etc/backuppc +usr/share/backuppc/image +usr/share/backuppc/conf +usr/lib/backuppc/cgi-bin --- backuppc-3.3.1.orig/debian/docs +++ backuppc-3.3.1/debian/docs @@ -0,0 +1 @@ +README --- backuppc-3.3.1.orig/debian/examples/localhost.pl +++ backuppc-3.3.1/debian/examples/localhost.pl @@ -0,0 +1,14 @@ +# +# Local server backup of /etc as user backuppc +# +$Conf{XferMethod} = 'tar'; + +$Conf{TarShareName} = ['/etc']; + +$Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C $tarPath -c -v -f - -C $shareName' + . ' --totals'; + +# remove extra shell escapes ($fileList+ etc.) that are +# needed for remote backups but may break local ones +$Conf{TarFullArgs} = '$fileList'; +$Conf{TarIncrArgs} = '--newer=$incrDate $fileList'; --- backuppc-3.3.1.orig/debian/examples/mysql.pl +++ backuppc-3.3.1/debian/examples/mysql.pl @@ -0,0 +1,17 @@ +# +# Mysql backup over ssh +# +# You should generate an SSH key pair to allow the local backuppc user +# to connect as root on the target host. +# Please refer to the BackupPC's manual for details +# +# Replace $dbuser and $dbpasswd with appropriate values to dump your database +# You should also create the /var/backup-mysql/ directory. +# + +$Conf{XferMethod} = 'tar'; + +$Conf{BackupFilesOnly} = [ '/var/backup-mysql/' ]; + +$Conf{DumpPreUserCmd} = '$sshPath -l root $host mysqldump \ +-u $dbuser -p$dbpasswd --all-databases --add-locks > /var/backup-mysql/backup-all-databases.sql' --- backuppc-3.3.1.orig/debian/examples/rsyncd.pl +++ backuppc-3.3.1/debian/examples/rsyncd.pl @@ -0,0 +1,11 @@ +# +# Rsync Backup (with rsync daemon on the client) +# + +$Conf{XferMethod} = 'rsyncd'; + +$Conf{RsyncShareName} = ['MyShare']; + +# if needed set a user name and password to access the remote shares +#$Conf{RsyncdUserName} = ''; +#$Conf{RsyncdPasswd} = ''; --- backuppc-3.3.1.orig/debian/examples/rsyncssh.pl +++ backuppc-3.3.1/debian/examples/rsyncssh.pl @@ -0,0 +1,11 @@ +# +# Rsync backup over ssh +# +# You should generate an SSH key pair to allow the local backuppc user +# to connect as root on the target host. +# Please refer to the BackupPC's manual for details +# + +$Conf{XferMethod} = 'rsync'; + +$Conf{RsyncShareName} = [ '/onedir', '/anotherdir' ]; --- backuppc-3.3.1.orig/debian/examples/smb.pl +++ backuppc-3.3.1/debian/examples/smb.pl @@ -0,0 +1,13 @@ +# +# SMB Backup (for Windows clients) +# + +$Conf{XferMethod} = 'smb'; + +$Conf{SmbShareName} = ['C$', 'MyShare']; + +# if needed set a user name and password to access the remote shares +#$Conf{SmbShareUserName} = ''; +#$Conf{SmbSharePasswd} = ''; +# if you want anonymous login under XP, you should set $Conf{SmbShareUserName} +# to something (like 'guest'). --- backuppc-3.3.1.orig/debian/examples/tarssh-sudo.pl +++ backuppc-3.3.1/debian/examples/tarssh-sudo.pl @@ -0,0 +1,22 @@ +# +# Tar backup over ssh using SUDO with user 'backuppc' +# +# You should generate an SSH key pair to allow the local 'backuppc' user +# to connect as 'backuppc' on the target host. +# Please refer to the BackupPC's manual for key generation details. +# +# Then on the client host added the following line to 'sudoers' with 'visudo': +# backuppc ALL=NOPASSWD: /bin/tar +# + +$Conf{XferMethod} = 'tar'; + +$Conf{TarClientCmd} = '$sshPath -q -x -n -l backuppc $host' + . ' /usr/bin/env LC_ALL=C sudo $tarPath -c -v -f - -C $shareName+' + . ' --totals'; + +$Conf{TarClientRestoreCmd} = '$sshPath -q -x -l backuppc $host' + . ' /usr/bin/env LC_ALL=C sudo $tarPath -x -p --numeric-owner --same-owner' + . ' -v -f - -C $shareName+'; + +$Conf{BackupFilesOnly} = [ '/onedir', '/anotherdir' ]; --- backuppc-3.3.1.orig/debian/examples/tarssh.pl +++ backuppc-3.3.1/debian/examples/tarssh.pl @@ -0,0 +1,11 @@ +# +# Tar backup over ssh +# +# You should generate an SSH key pair to allow the local backuppc user +# to connect as root on the target host. +# Please refer to the BackupPC's manual for details +# + +$Conf{XferMethod} = 'tar'; + +$Conf{BackupFilesOnly} = [ '/onedir', '/anotherdir' ]; --- backuppc-3.3.1.orig/debian/localhost.pl +++ backuppc-3.3.1/debian/localhost.pl @@ -0,0 +1,14 @@ +# +# Local server backup of /etc as user backuppc +# +$Conf{XferMethod} = 'tar'; + +$Conf{TarShareName} = ['/etc']; + +$Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C $tarPath -c -v -f - -C $shareName' + . ' --totals'; + +# remove extra shell escapes ($fileList+ etc.) that are +# needed for remote backups but may break local ones +$Conf{TarFullArgs} = '$fileList'; +$Conf{TarIncrArgs} = '--newer=$incrDate $fileList'; --- backuppc-3.3.1.orig/debian/menu +++ backuppc-3.3.1/debian/menu @@ -0,0 +1,4 @@ +?package(backuppc):needs="X11" section="Applications/File Management"\ + title="View backuppc status" \ + command="www-browser http://localhost/backuppc/" + --- backuppc-3.3.1.orig/debian/patches/setuid.patch +++ backuppc-3.3.1/debian/patches/setuid.patch @@ -0,0 +1,19 @@ +Description: Run rrdtool as the backuppc user rather than as the apache user +Origin: https://sourceforge.net/p/backuppc/mailman/message/18724263/ +Author: John Rouillard +Bug-Ubuntu: https://launchpad.net/bugs/1612600 + +--- debian/backuppc/usr/share/backuppc/lib/BackupPC/CGI/GeneralInfo.pm 2016-09-06 04:04:33.466484120 -0400 ++++ debian/backuppc/usr/share/backuppc/lib/BackupPC/CGI/GeneralInfo.pm 2016-09-06 04:05:34.271384202 -0400 +@@ -47,8 +47,11 @@ + if ($In{image} ne "") { + $In{image} =~ /([0-9]+)/; + my $weeks = $1; ++ my $real = $<; ### SUID ++ $< = $>; ### SUID + print "Content-type: image/png\n\n"; + print `/usr/bin/rrdtool graph - --imgformat=PNG --start=end-${weeks}w --end=-300 --title="BackupPC Pool Size (${weeks} weeks)" --base=1000 --height=100 --width=600 --alt-autoscale-max --lower-limit=0 --vertical-label="" --slope-mode --font TITLE:10:Times --font AXIS:8:Times --font LEGEND:8:Times --font UNIT:8:Times -c BACK#FFFFFF DEF:ao="$LogDir/pool.rrd":ckb:AVERAGE CDEF:a=ao,1024,* AREA:a#95B8DB:"CPool in bytes" GPRINT:a:LAST:"Current\\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\\:%8.2lf %s" GPRINT:a:MAX:"Maximum\\:%8.2lf %s\\n"`; ++ $< = $real; ### SUID + return; + } + --- backuppc-3.3.1.orig/debian/po/POTFILES.in +++ backuppc-3.3.1/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] backuppc.templates --- backuppc-3.3.1.orig/debian/po/cs.po +++ backuppc-3.3.1/debian/po/cs.po @@ -0,0 +1,93 @@ +# Czech translation of backuppc templates +# +msgid "" +msgstr "" +"Project-Id-Version: backuppc 2.1.1-2\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2007-02-27 10:55+0100\n" +"Last-Translator: Martin Sin \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Bylo vytvořeno webové rozhraní s výchozím uživatelem" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC můžete ovládat přes jeho webové rozhraní:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"K tomuto účelu byl vytvořen uživatel se jménem 'backuppc' a heslem " +"'${pass}'. Toto heslo můžete změnit spuštěním příkazu 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Který webserver si přejete nastavit automaticky:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC podporuje libovolný webserver s povoleným CGI. Tento automatický " +"konfigurační proces však podporuje pouze Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Přejete si restartovat webové servery podle potřeby?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Pamatujte, že je nutné pro načtení nové konfigurace restartovat také webový " +"server." + +#~ msgid "Add aliases for /backuppc/ to your apache config files ?" +#~ msgstr "" +#~ "Přidat aliasy pro /backuppc/ do vašeho konfiguračního souboru apache?" + +#~ msgid "" +#~ "In order to have the Backuppc web administration interface working, I " +#~ "need to add an include line in your apache configuration, which will set-" +#~ "up a few aliases." +#~ msgstr "" +#~ "Pro zprovoznění administrátorského webového rozhranní Backuppc je potřeba " +#~ "přidat řádek do konfigurace apache, který nastaví několik aliasů." + +#~ msgid "" +#~ "If you do not trust automatically modified configurations, you can add " +#~ "the /etc/backuppc/apache.conf include file later yourself." +#~ msgstr "" +#~ "Jestliže nedůvěřujete automaticky vytvořeným konfiguracím, můžete přidat /" +#~ "etc/backuppc/apache.conf samostatně později." --- backuppc-3.3.1.orig/debian/po/da.po +++ backuppc-3.3.1/debian/po/da.po @@ -0,0 +1,77 @@ +# Danish translation backuppc. +# Copyright (C) 2012 backuppc & nedenstående oversættere. +# This file is distributed under the same license as the backuppc package. +# Joe Hansen (joedalton2@yahoo.dk), 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: backuppc\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2012-02-11 12:42+0000\n" +"Last-Translator: Joe Hansen \n" +"Language-Team: Danish \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Standardbruger for internetadministration oprettet" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC kan håndteres via sin internetgrænseflade:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"For dette formål er en internetbruger navngivet »backuppc« med »${pass}« som " +"adgangskode blevet oprettet. Du kan ændre denne adgangskode ved at køre " +"»htpasswd /etc/backuppc/htpasswd backuppc«." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Hvilken internetserver ønsker du at rekonfigurere automatisk:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC understøtter alle internetservere med CGI aktiveret, men denne " +"automatiske konfigurationsproces understøtter kun Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Ønsker du at genstarte internetserverne nu hvis krævet?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Husk at for at aktivere den nye konfiguration så skal internetserverne " +"genstartes." --- backuppc-3.3.1.orig/debian/po/de.po +++ backuppc-3.3.1/debian/po/de.po @@ -0,0 +1,87 @@ +# translation of backuppc_3.0.0-2_de.po to German +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Erik Schanze , 2004-2007. +msgid "" +msgstr "" +"Project-Id-Version: backuppc_3.0.0-2_de\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2007-02-22 22:18+0100\n" +"Last-Translator: Erik Schanze \n" +"Language-Team: German \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Standard-Benutzer für die Web-Administration erstellt" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC kann mit seiner Web-Oberfläche verwaltet werden:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Dafür wurde ein Benutzer namens »backuppc« mit »${pass}« als Passwort " +"eingerichtet. Sie können dieses Passwort durch das Kommando 'htpasswd /etc/" +"backuppc/htpasswd backuppc' ändern." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Welche Webserver wollen Sie automatisch neu einrichten:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC unterstützt jeden Webserver der CGI bietet, aber dieser " +"automatische Einrichtungsvorgang unterstützt nur Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Wollen Sie die Webserver wenn nötig jetzt neu starten?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Denken Sie daran, dass die Webserver neu gestartet werden müssen, damit die " +"neuen Einstellungen wirksam werden." --- backuppc-3.3.1.orig/debian/po/es.po +++ backuppc-3.3.1/debian/po/es.po @@ -0,0 +1,122 @@ +# backuppc po-debconf translation to Spanish +# Copyright (C) 2005, 2009 Software in the Public Interest +# This file is distributed under the same license as the backuppc package. +# +# Changes: +# - Initial translation +# César Gómez Martín , 2005 +# +# - Updates +# Francisco Javier Cuadrado , 2009 +# +# Traductores, si no conocen el formato PO, merece la pena leer la +# documentación de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traducción al español, por favor, lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traducción de Debian al español +# http://www.debian.org/intl/spanish/ +# especialmente las notas de traducción en +# http://www.debian.org/intl/spanish/notas +# +# - La guía de traducción de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +msgid "" +msgstr "" +"Project-Id-Version: backuppc 3.1.0-6\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2009-04-27 08:33+0100\n" +"Last-Translator: Francisco Javier Cuadrado \n" +"Language-Team: Debian l10n Spanish \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Se ha creado el usuario predeterminado para la administración web." + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"Puede gestionar BackupPC a través de su interfaz web:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Para ello se ha creado un usuario web llamado «backuppc» con la contraseña " +"«${pass}». Puede cambiar esta contraseña ejecutando «htpasswd /etc/backuppc/" +"htpasswd backuppc»." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Qué servidor web desea reconfigurar automáticamente:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC permite utilizar cualquier servidor web con CGI activado, pero el " +"proceso de configuración automática sólo se puede realizar sobre Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "¿Desea reiniciar los servidores web ahora si fuera necesario?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Recuerde que para poder activar la configuración nueva los servidores web se " +"deben reiniciar." + +#~ msgid "Add aliases for /backuppc/ to your apache config files ?" +#~ msgstr "" +#~ "¿Desea añadir alias para /backuppc/ en su fichero de configuración de " +#~ "apache?" + +#~ msgid "" +#~ "In order to have the Backuppc web administration interface working, I " +#~ "need to add an include line in your apache configuration, which will set-" +#~ "up a few aliases." +#~ msgstr "" +#~ "Para que la interfaz de administración web de Backuppc funcione se " +#~ "necesita añadir una línea «include», que establecerá algunos alias en la " +#~ "configuración de apache." + +#~ msgid "" +#~ "If you do not trust automatically modified configurations, you can add " +#~ "the /etc/backuppc/apache.conf include file later yourself." +#~ msgstr "" +#~ "Posteriormente puede añadir el fichero /etc/backup/apache.conf si no se " +#~ "fía de las configuraciones que se han modificado de forma automática." --- backuppc-3.3.1.orig/debian/po/eu.po +++ backuppc-3.3.1/debian/po/eu.po @@ -0,0 +1,78 @@ +# translation of backuppc-eu.po to Euskara +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Piarres Beobide , 2008. +msgid "" +msgstr "" +"Project-Id-Version: backuppc-eu\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2008-10-13 13:55+0200\n" +"Last-Translator: Piarres Beobide \n" +"Language-Team: Euskara \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Web kudeaketa lehenetsiko erabiltzailea sortua" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC bere web interfazearen bidez kudeatu daiteke:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Honetarako 'backuppc' izeneko erabiltzaile bat eta horrentzat '${pass}' " +"pasahitza sortu dira. Pasahitz hau aldatzeko aukera duzu 'htpasswd /etc/" +"backuppc/htpasswd backuppc' abiaraziaz." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Zein web zerbitzari nahi duzu automatikoki konfiguratzea:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC-ek CGI gaiturik duen edozein web zerbitzari onartzen du, baina " +"konfigurazio automatiko honek apache bakarrik konfiguratzeko gai da." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Nahi al duzu web zerbitzaria orain berrabiaraztea?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Kontutan izan konfigurazio berria martxan ipintzeko web-zerbitzaria " +"berrabiarazi egin behar dela." --- backuppc-3.3.1.orig/debian/po/fi.po +++ backuppc-3.3.1/debian/po/fi.po @@ -0,0 +1,74 @@ +msgid "" +msgstr "" +"Project-Id-Version: backuppc\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: Esko Arajärvi \n" +"Language-Team: Finnish \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Finnish\n" +"X-Poedit-Country: FINLAND\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Verkkohallinnan oletuskäyttäjätunnus luotu" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"Ohjelmaa BackupPC voidaan hallita sen verkkokäyttöliittymän kautta:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Tätä varten on luotu verkkokäyttäjätunnus ”backuppc”, jonka salasana on " +"”${pass}”. Salasana voidaan vaihtaa ajamalla komento ”htpasswd /etc/backuppc/" +"htpasswd backuppc”." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Verkkopalvelimet, joiden asetuksia muokataan automaattisesti:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC tukee kaikkia verkkopalvelimia, joissa on CGI käytössä, mutta vain " +"Apachen asetuksia voidaan muokata automaattisesti." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Tulisiko verkkopalvelimet tarvittaessa käynnistää uudelleen nyt?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Verkkopalvelimet täytyy käynnistää uudelleen uusien asetusten ottamiseksi " +"käyttöön." --- backuppc-3.3.1.orig/debian/po/fr.po +++ backuppc-3.3.1/debian/po/fr.po @@ -0,0 +1,85 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: backuppc\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2005-02-28 21:21+0200\n" +"Last-Translator: Ludovic Drolez \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Cration de l'utilisateur par dfaut pour l'administration Web" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC peut tre gr avec une interface Web:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +" cet effet, un utilisateur web nomm backuppc a t cr. Son mot de " +"passe est actuellement ${pass}. Vous pouvez changer ce mot de passe avec " +"la commande htpasswd /etc/backuppc/htpasswd backuppc." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Quel serveur WEB voulez-vous configurer automatiquement :" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC fonctionne sur tout serveur Web supportant les CGI, mais la " +"configuration automatique ne supporte qu'Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Voulez-vous relancer les serveurs Web si ncessaire ?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Veuillez noter que, pour mettre en service la nouvelle configuration, votre " +"serveur Web doit tre redmarr." --- backuppc-3.3.1.orig/debian/po/it.po +++ backuppc-3.3.1/debian/po/it.po @@ -0,0 +1,78 @@ +# ITALIAN TRANSLATION OF BACKUPPC'S.PO-DEBCONF FILE +# Copyright (C) 2008 THE BACKUPPS'S COPYRIGHT HOLDER +# This file is distributed under the same license as the backuppc package. +# +# Vincenzo Campanella , 2008. +msgid "" +msgstr "" +"Project-Id-Version: it\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2008-10-12 13:10+0200\n" +"Last-Translator: Vincenzo Campanella \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Creato utente predefinito per l'amministrazione web" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC può essere gestito attraverso la sua interfaccia web:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"A tale scopo è stato creato un utente web, \"backuppc\", con \"${pass}\" " +"come password. È possibile modificare questa password eseguendo \"htpasswd /" +"etc/backuppc/htpasswd backuppc\"." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Quale server web riconfigurare automaticamente:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC supporta qualsiasi server web con CGI abilitata, ma questo processo " +"di configurazione automatica supporta solo Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Riavviare i server web ora se necessario?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Ricordare che, per attivare la nuova configurazione, i server web devono " +"essere riavviati." --- backuppc-3.3.1.orig/debian/po/ja.po +++ backuppc-3.3.1/debian/po/ja.po @@ -0,0 +1,85 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +# +msgid "" +msgstr "" +"Project-Id-Version: backuppc 3.1.0-1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-12-19 04:31+0100\n" +"PO-Revision-Date: 2008-01-31 07:26+0900\n" +"Last-Translator: Hideki Yamane (Debian-JP) \n" +"Language-Team: Japanese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "web 管理用の標準ユーザが作成されます" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC は web インターフェイスから操作できます: \n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"このため、web ユーザ 'backuppc' がパスワード '${pass}' で作成されます。すぐ" +"に 'htpasswd /etc/backuppc/htpasswd backuppc' としてこのパスワードを変更して" +"ください。" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "どの web サーバを自動的に再構成するか:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC は CGI が動く web サーバであれば動作しますが、この自動構成では Apache " +"のみをサポートしています。" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "必要であれば今、web サーバを再起動しますか?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"新しい設定を有効にするには web サーバを再起動する必要があります。" + --- backuppc-3.3.1.orig/debian/po/nl.po +++ backuppc-3.3.1/debian/po/nl.po @@ -0,0 +1,110 @@ +# translation of backuppc_3.1.0-3.1.po to Dutch +# This file is distributed under the same license as the backuppc package. +# Please see debian/copyright. +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +# Luk Claes , 2004. +# Paul Gevers , 2008. +msgid "" +msgstr "" +"Project-Id-Version: backuppc 2.0.2-2\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2008-10-16 20:59-0600\n" +"Last-Translator: Paul Gevers \n" +"Language-Team: Debian l10n Dutch \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Standaard gebruiker voor webbeheer gecreerd" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC kan worden beheerd via de webinterface:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Voor dit doel is er een webgebruiker 'backuppc' gecreerd met '${pass}' als " +"wachtwoord. U kunt dit wachtwoord wijzigen met het commando 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Welke webserver wilt u automatisch herconfigureren?" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC ondersteunt iedere webserver die CGI aan heeft staan. Echter, " +"alleen Apache wordt ondersteund door dit automatische configuratieproces." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Wilt u dat de webservers nu worden herstart, als dat nodig is?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Om de nieuwe configuratie te activeren is het nodig dat de webservers " +"herstart worden." + +#~ msgid "Add aliases for /backuppc/ to your apache config files ?" +#~ msgstr "" +#~ "Aliases voor /backuppc/ toevoegen aan uw apache-configuratiebestanden?" + +#~ msgid "" +#~ "In order to have the Backuppc web administration interface working, I " +#~ "need to add an include line in your apache configuration, which will set-" +#~ "up a few aliases." +#~ msgstr "" +#~ "Om de Backuppc-webbeheer-interface te laten werken, moet er een include-" +#~ "regel worden toegevoegd in uw apache-configuratie die enkele aliases zal " +#~ "opzetten." + +#~ msgid "" +#~ "If you do not trust automatically modified configurations, you can add " +#~ "the /etc/backuppc/apache.conf include file later yourself." +#~ msgstr "" +#~ "Als u dit niet vertrouwt, kunt u het /etc/backuppc/apache.conf-include-" +#~ "bestand later zelf toevoegen." --- backuppc-3.3.1.orig/debian/po/pl.po +++ backuppc-3.3.1/debian/po/pl.po @@ -0,0 +1,82 @@ +# Translation of backuppc debconf templates to Polish. +# Copyright (C) 2012 +# This file is distributed under the same license as the backuppc package. +# +# Michał Kułach , 2012. +msgid "" +msgstr "" +"Project-Id-Version: backuppc\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2012-05-30 19:41+0200\n" +"Last-Translator: Michał Kułach \n" +"Language-Team: Polish \n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Utworzono domyślnego użytkownika administrującego WWW" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC może być zarządzany za pomocą swego interfejsu WWW:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"W tym celu utworzono użytkownika www o nazwie \"backuppc\" i haśle ${pass}. " +"Hasło można zmienić za pomocą polecenia \"htpasswd /etc/" +"backuppc/htpasswd backuppc\"." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Który serwer WWW ponownie skonfigurować w sposób automatyczny?" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC obsługuje dowolny serwer WWW z włączonym CGI, ale automatyczny " +"proces konfiguracyjny jest dostępny tylko dla Apache'a." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Czy zrestartować teraz serwery WWW, jeśli to konieczne?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Proszę pamiętać, że w celu aktywowania nowej konfiguracji, konieczne jest " +"zrestartowanie serwera (serwerów) WWW." + + --- backuppc-3.3.1.orig/debian/po/pt.po +++ backuppc-3.3.1/debian/po/pt.po @@ -0,0 +1,78 @@ +# translation of backuppc debconf to Portuguese +# Copyright (C) 2007 Américo Monteiro +# This file is distributed under the same license as the backuppc package. +# +# Américo Monteiro , 2007. +msgid "" +msgstr "" +"Project-Id-Version: backuppc 3.0.0-3\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2007-07-22 17:22+0100\n" +"Last-Translator: Américo Monteiro \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Criado utilizador por omissão para administração Web." + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC pode ser gerido através da sua interface Web:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Para esse propósito, foi criado um servidor Web chamado 'backuppc' usando " +"'${pass}' como password. Você pode mudar esta password com o comando " +"'htpasswd /etc/backuppc/htpasswd backuppc'." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Qual o servidor Web que deseja reconfigurar automaticamente?" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC suporta qualquer servidor Web com CGI activo, mas este processo de " +"configuração automático apenas suporta Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Você quer reiniciar agora os servidores Web caso seja necessário?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Lembre-se que para activar a nova configuração, os servidores Web precisam " +"ser reiniciados." --- backuppc-3.3.1.orig/debian/po/pt_BR.po +++ backuppc-3.3.1/debian/po/pt_BR.po @@ -0,0 +1,102 @@ +# backuppc Brazilian Portuguese translation +# Copyright (C) 2008 THE backuppc'S COPYRIGHT HOLDER +# This file is distributed under the same license as the backuppc package. +# André Luís Lopes , 2008. +# Adriano Rafael Gomes , 2008-2010. +# +msgid "" +msgstr "" +"Project-Id-Version: backuppc\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2010-11-13 22:48-0200\n" +"Last-Translator: Adriano Rafael Gomes \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"pt_BR utf-8\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Criado usuário padrão para administração web" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"O BackupPC pode ser gerenciado através de sua interface web:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Para esse propósito foi criado um usuário web chamado 'backuppc' com a senha " +"'${pass}'. Você pode mudar essa senha executando o comando 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Qual servidor web você gostaria de reconfigurar automaticamente:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"O BackupPC suporta qualquer servidor web com CGI habilitado, mas este " +"processo de configuração automática suporta somente o Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Você quer reiniciar os servidores web agora se necessário?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Lembre-se que para ativar a nova configuração os servidores web devem ser " +"reiniciados." + +#~ msgid "Add aliases for /backuppc/ to your apache config files ?" +#~ msgstr "" +#~ "Adicionar aliases para /backppc/ em seus arquivos de configuração do " +#~ "Apache ?" + +#~ msgid "" +#~ "In order to have the Backuppc web administration interface working, I " +#~ "need to add an include line in your apache configuration, which will set-" +#~ "up a few aliases." +#~ msgstr "" +#~ "Para que a interface de administração Web do BackupPc funcione, é " +#~ "necessário adicionar uma linha 'Include' em seu arquivo de configuração " +#~ "do Apache, a qual irá configurar alguns aliases." + +#~ msgid "" +#~ "If you do not trust automatically modified configurations, you can add " +#~ "the /etc/backuppc/apache.conf include file later yourself." +#~ msgstr "" +#~ "Caso você não confie no procedimento automático, você pode adicionar o " +#~ "'Include /etc/backuppc/apache.conf' em seu arquivo de configuração do " +#~ "Apache manualmente posteriormente." --- backuppc-3.3.1.orig/debian/po/ru.po +++ backuppc-3.3.1/debian/po/ru.po @@ -0,0 +1,79 @@ +# translation of ru.po to Russian +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Yuri Kozlov , 2008. +msgid "" +msgstr "" +"Project-Id-Version: backuppc 3.1.0-3\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2008-10-10 08:13+0400\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Создана учётная запись по умолчанию для управления через веб" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC можно управлять через веб-интерфейс:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Для этой цели создана учётная запись 'backuppc' с паролем '${pass}'. Чтобы " +"изменить пароль, запустите команду 'htpasswd /etc/backuppc/htpasswd " +"backuppc'." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Выберите веб-сервер для автоматической настройки:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC работает с любым веб-сервером с включённым CGI, но автоматическая " +"настройка доступна только для Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Перезапустить веб-сервер сейчас, если потребуется?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Чтобы новые настройки начали действовать, веб-сервер должен быть перезапущен." --- backuppc-3.3.1.orig/debian/po/sv.po +++ backuppc-3.3.1/debian/po/sv.po @@ -0,0 +1,85 @@ +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# Developers do not need to manually edit POT or PO files. +# , fuzzy +# +# +msgid "" +msgstr "" +"Project-Id-Version: backuppc 2.1.2-1\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2008-07-22 20:10+0100\n" +"Last-Translator: Martin Bagge \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Webadministrationens standardanvändare skapad" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC kan hanteras via sitt webbinterface:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Av denna anledning har en webanvändare kallad 'backuppc' med '${pass}' som " +"lösenord skapats. Du kan ändra lösenordet genom att köra 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Vilken webbserver vill du ställa in automatiskt:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC har stöd för alla CGI-kapabla webbservrar men den automatiska " +"inställningen kan bara göras på Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Vill du starta om webbservern nu om det behövs?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Kom ihïåg att webbservern måste startas om för att de nya inställningarna " +"ska träda i kraft." --- backuppc-3.3.1.orig/debian/po/templates.pot +++ backuppc-3.3.1/debian/po/templates.pot @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: backuppc\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" --- backuppc-3.3.1.orig/debian/po/uk.po +++ backuppc-3.3.1/debian/po/uk.po @@ -0,0 +1,74 @@ +# Olexandr Kravchuk +# +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2008-10-12 14:41+0300\n" +"Last-Translator: Olexandr Kravchuk \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Типового користувача для веб-адміністрування створено" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC може керуватись через веб-інтерфейс:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Було створено віртуальний хост 'backuppc' з паролем '${pass}' . Ви можете " +"змінити цей пароль запустивши команду 'htpasswd /etc/backuppc/htpasswd " +"backuppc'." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Який веб-сервер ви бажаєте автоматично переналаштувати:" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"BackupPC підтримує будь який веб-сервер з увімкненим CGI, однак, автоматично " +"може бути налаштований лише Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Чи бажаєте перезапустити веб-сервер?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Майте на увазі, що для активації змін, веб-сервер необхідно перезавантажити." --- backuppc-3.3.1.orig/debian/po/vi.po +++ backuppc-3.3.1/debian/po/vi.po @@ -0,0 +1,78 @@ +# Vietnamese Translation for Backuppc. +# Copyright © 2009 Free Software Foundation, Inc. +# Clytie Siddall , 2005-2009. +# +msgid "" +msgstr "" +"Project-Id-Version: backuppc 3.1.0-3.1\n" +"Report-Msgid-Bugs-To: backuppc@packages.debian.org\n" +"POT-Creation-Date: 2012-05-20 08:53+0200\n" +"PO-Revision-Date: 2009-01-31 16:55+1030\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \n" +"Language: vi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: LocFactoryEditor 1.8\n" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "Web administration default user created" +msgstr "Người dùng mặc định để quản trị Web đã được tạo" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"BackupPC can be managed through its web interface:\n" +" http://${site}/backuppc/" +msgstr "" +"BackupPC có thể được quản lý thông qua giao diện Web:\n" +" http://${site}/backuppc/" + +#. Type: note +#. Description +#: ../backuppc.templates:1001 +msgid "" +"For that purpose, a web user named 'backuppc' with '${pass}' as password has " +"been created. You can change this password by running 'htpasswd /etc/" +"backuppc/htpasswd backuppc'." +msgstr "" +"Cho mục đích đó, một tên người dùng Web tên « backuppc » với mật khẩu « " +"${pass} » đã được tạo. Bạn cũng có khả năng thay đổi mật khẩu này bằng cách " +"chạy câu lệnh « htpasswd /etc/backuppc/htpasswd backuppc »." + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "Which web server would you like to reconfigure automatically:" +msgstr "Bạn có muốn tự động cấu hình trình phục vụ Web nào :" + +#. Type: multiselect +#. Description +#: ../backuppc.templates:2001 +msgid "" +"BackupPC supports any web server with CGI enabled, but this automatic " +"configuration process only supports Apache." +msgstr "" +"Phần mềm BackupPC hỗ trợ bất cứ trình phục vụ Web nào cũng hiệu lực CGI, " +"nhưng mà tiến trình tự động cấu hình chỉ hỗ trợ Apache." + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "Do you want to restart the webservers now if needed?" +msgstr "Bạn có muốn khởi chạy lại các trình phục vụ Web (nếu yêu cầu) không?" + +#. Type: boolean +#. Description +#: ../backuppc.templates:3001 +msgid "" +"Remember that in order to activate the new configuration the webservers have " +"to be restarted." +msgstr "" +"Ghi nhớ rằng để kích hoạt cấu hình mới, các trình phục vụ Web cần phải được " +"khởi chạy lại." --- backuppc-3.3.1.orig/debian/postinst +++ backuppc-3.3.1/debian/postinst @@ -0,0 +1,176 @@ +#!/bin/bash +# postinst script for backuppc +# +# see: dh_installdeb(1) + +#set -e +#set -x + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +. /usr/share/debconf/confmodule +db_version 2.0 + +case "$1" in + configure) + + # TODO: I should detect if par2, bzip2 ... are really installed + # and modify config.pl accordingly. + + db_get backuppc/reconfigure-webserver + webservers="$RET" + db_get backuppc/restart-webserver + webservers_rst="$RET" + inc="/etc/backuppc/apache.conf" + + for webserver in $webservers ; do + webserver=${webserver%,} + test -x /usr/sbin/$webserver || continue + + case "$webserver" in + apache|apache-perl|apache-ssl|apache2) + # remove wwwconfig-common stuff + if grep -qs "^Include $inc" /etc/$webserver/httpd.conf; then + mv -f /etc/$webserver/httpd.conf /etc/$webserver/httpd.conf.old.backuppc + grep -v "^Include $inc" /etc/$webserver/httpd.conf.old.backuppc \ + > /etc/$webserver/httpd.conf + fi + # add new links + + # Apache 2.4 + if [ -d /etc/$webserver/conf-available -a ! -f /etc/$webserver/conf-available/backuppc.conf -a ! -h /etc/$webserver/conf-available/backuppc.conf ]; then + ln -s /etc/backuppc/apache.conf /etc/$webserver/conf-available/backuppc.conf + [ -f /etc/$webserver/conf.d/backuppc.conf ] && rm /etc/$webserver/conf.d/backuppc.conf + + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke enconf backuppc.conf + fi + fi + + # Apache < 2.4 + newfile=false + if [ -d /etc/$webserver/conf.d -a ! -f /etc/$webserver/conf.d/backuppc.conf -a ! -h /etc/$webserver/conf.d/backuppc.conf ]; then + ln -s /etc/backuppc/apache.conf /etc/$webserver/conf.d/backuppc.conf + [ -f /etc/$webserver/conf.d/backuppc ] && rm /etc/$webserver/conf.d/backuppc + if [ "$webservers_rst" = "true" ]; then + # restart + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver reload + else + /etc/init.d/$webserver reload + fi + fi + fi + ;; + esac + done + + # creating backuppc group if he isn't already there + if ! getent group backuppc >/dev/null; then + addgroup --system backuppc >/dev/null + fi + + # creating backuppc user if he isn't already there + if ! getent passwd backuppc >/dev/null; then + adduser --system --gecos "BackupPC" --ingroup backuppc \ + --shell /bin/sh --home /var/lib/backuppc backuppc >/dev/null + + # add backuppc to /etc/aliases + if [ -f /etc/aliases ] || [ -L /etc/aliases ]; then + if ! grep -qi "^backuppc[[:space:]]*:" /etc/aliases; then + echo "backuppc: root" >> /etc/aliases + test -x "$(command -v newaliases)" && newaliases || : + fi + fi + fi + + #usermod -c "BackupPC Daemon" backuppc + + # chown some files only on the 1st install + if [ -z "$2" ]; then + mkdir /var/lib/backuppc/pc/localhost/ + chown backuppc:backuppc /var/lib/backuppc /var/lib/backuppc/* /var/lib/backuppc/pc/* /var/lib/backuppc/log/* + chmod 750 /var/lib/backuppc /var/lib/backuppc/* /var/lib/backuppc/pc/* + fi + + OVERRIDDEN=`dpkg-statoverride --list /usr/lib/backuppc/cgi-bin/index.cgi || true` + # Force the perms to 4750 if 4755 was found + echo "$OVERRIDDEN" | grep -q 4755 && OVERRIDDEN="" + [ "${OVERRIDDEN}" = "" ] && dpkg-statoverride --force --update --add backuppc www-data 4750 /usr/lib/backuppc/cgi-bin/index.cgi + + if [ ! -f /etc/backuppc/htpasswd ]; then + touch /etc/backuppc/htpasswd + db_get backuppc/tmppass + if [ -f /usr/bin/htpasswd ]; then + htpasswd -bm /etc/backuppc/htpasswd backuppc $RET + else + htpasswd2 -bm /etc/backuppc/htpasswd backuppc $RET + fi + fi + db_reset backuppc/tmppass + db_subst "backuppc/configuration-note" "pass" "" + + if [ -x /usr/sbin/a2enmod ]; then + a2enmod auth_basic + a2enmod authz_groupfile + a2enmod authn_file + a2enmod authz_user + a2enmod cgi + fi + + # create a symlink to have the same directories as in the doc + cd /etc/backuppc + [ ! -e pc ] && ln -s /etc/backuppc pc + + # ucf stuff + ucf --debconf-ok --three-way /usr/share/backuppc/conf/config.pl /etc/backuppc/config.pl + + # remove conffile + #dpkg-maintscript-helper rm_conffile /etc/backuppc/config.pl 3.3.0-1 backuppc -- "$@"; + + + # change the rights of /etc/backuppc so that the CGI can modify the conf. + chown -R backuppc:www-data /etc/backuppc + + # fix the perms of the backuppc password files + chmod 640 /etc/backuppc/htpasswd + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +db_stop + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- backuppc-3.3.1.orig/debian/postrm +++ backuppc-3.3.1/debian/postrm @@ -0,0 +1,95 @@ +#!/bin/sh +# postrm script for backuppc +# +# see: dh_installdeb(1) + +#set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + purge) + + if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_version 2.0 + + db_get backuppc/reconfigure-webserver + webservers="$RET" + db_get backuppc/restart-webserver + webservers_rst="$RET" + restart="" + inc="/etc/backuppc/apache.conf" + + for webserver in $webservers ; do + webserver=${webserver%,} + test -x /usr/sbin/$webserver || continue + + case "$webserver" in + apache|apache-perl|apache-ssl|apache2) + # remove links + if [ -h /etc/$webserver/conf.d/backuppc.conf ]; then + rm -f /etc/$webserver/conf.d/backuppc.conf + if [ "$webservers_rst" = "true" ]; then + # restart + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver reload + else + /etc/init.d/$webserver reload + fi + fi + fi + ;; + esac + done + fi + + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke disconf backuppc.conf + fi + + if [ -h /etc/apache2/conf-available/backuppc.conf ]; then + rm -f /etc/apache2/conf-available/backuppc.conf + fi + + dpkg-statoverride --remove --force /usr/share/backuppc/cgi-bin/index.cgi + dpkg-statoverride --remove --force /usr/lib/backuppc/cgi-bin/index.cgi + rm -f /etc/backuppc/config.pl + if [ -x "/usr/bin/ucf" ]; then + ucf --purge /etc/backuppc/config.pl + fi + rmdir --ignore-fail-on-non-empty /var/lib/backuppc/pc/localhost/ + rm -f /etc/backuppc/htpasswd /etc/backuppc/pc + + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_version 2.0 + db_stop +fi + +exit 0 --- backuppc-3.3.1.orig/debian/rules +++ backuppc-3.3.1/debian/rules @@ -0,0 +1,118 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) +CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) +LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + +build-arch: build +build-indep: build + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) debian/setuidwrapper.c -o index.cgi + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp index.cgi + + # Add here commands to clean up after the build process. + rm -f init.d/*-backuppc* + rm -f backuppc.8* + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Add here commands to install the package into debian/backuppc. + chmod 755 ./configure.pl + ./configure.pl --batch --no-fhs --hostname XXXXXX --uid-ignore \ + --install-dir /usr/share/backuppc --dest-dir $(CURDIR)/debian/backuppc/ \ + --data-dir /var/lib/backuppc --cgi-dir /usr/share/backuppc/cgi-bin \ + --html-dir /usr/share/backuppc/image --html-dir-url /backuppc/image \ + --bin-path perl=/usr/bin/perl --bin-path tar=/bin/tar \ + --bin-path smbclient=/usr/bin/smbclient --bin-path nmblookup=/usr/bin/nmblookup \ + --bin-path rsync=/usr/bin/rsync --bin-path ping=/bin/ping \ + --bin-path df=/bin/df --bin-path ssh=/usr/bin/ssh \ + --bin-path sendmail=/usr/sbin/sendmail --bin-path hostname=/bin/hostname \ + --bin-path par2=/usr/bin/par2 \ + --bin-path gzip=/bin/gzip --bin-path bzip2=/bin/bzip2 \ + --bin-path ping6=/bin/ping6 + pod2man --section=8 --center="BackupPC manual" doc/BackupPC.pod backuppc.8 + perl -e "s/.IX Title.*/.SH NAME\nbackuppc \\- BackupPC manual/g" -p -i.tmp backuppc.8 + mv -f debian/backuppc/usr/share/backuppc/cgi-bin/* debian/backuppc/usr/share/backuppc/lib/realindex.cgi + install --mode=4750 index.cgi debian/backuppc/usr/lib/backuppc/cgi-bin + install --mode=755 debian/BackupPC_deleteFile debian/backuppc/usr/share/backuppc/bin + install --mode=644 conf/hosts debian/backuppc/etc/backuppc + install --mode=644 debian/localhost.pl debian/backuppc/etc/backuppc + install --mode=644 debian/apache.conf debian/backuppc/etc/backuppc + -rmdir debian/backuppc/var/lib/backuppc/conf/ + (cd debian/backuppc/usr/share/backuppc/cgi-bin; ln -s ../image; ln -s /usr/lib/backuppc/cgi-bin/index.cgi ) + patch --no-backup-if-mismatch -p0 < debian/config.pl.diff + install --mode=644 debian/backuppc/etc/backuppc/config.pl debian/backuppc/usr/share/backuppc/conf + rm -rf debian/backuppc/etc/backuppc/config.pl + patch --no-backup-if-mismatch -p0 < debian/patches/setuid.patch + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples debian/examples/* + mv -f debian/backuppc/usr/share/backuppc/doc/* debian/backuppc/usr/share/doc/backuppc/ + dh_installmenu + dh_installinit -- start 20 2 3 4 5 . stop 20 1 . + dh_installcron + dh_installman backuppc.8 + dh_installinfo +# dh_undocumented + dh_installchangelogs ChangeLog + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdebconf +# dh_makeshlibs + dh_installdeb + dh_perl $(CURDIR)/debian/backuppc/usr/share/backuppc/lib/ + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- backuppc-3.3.1.orig/debian/setuidwrapper.c +++ backuppc-3.3.1/debian/setuidwrapper.c @@ -0,0 +1,11 @@ +#include + +#define REAL_PATH "/usr/share/backuppc/lib/realindex.cgi" + +int main(ac, av) +char **av; +{ + execv(REAL_PATH, av); + return 0; +} + --- backuppc-3.3.1.orig/debian/watch +++ backuppc-3.3.1/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://sf.net/backuppc/BackupPC-(.*).tar.gz debian uupdate --- backuppc-3.3.1.orig/doc/BackupPC.pod +++ backuppc-3.3.1/doc/BackupPC.pod @@ -1,3 +1,5 @@ +=encoding UTF-8 + =head1 BackupPC Introduction This documentation describes BackupPC version 3.3.1, @@ -4807,7 +4809,7 @@ Manfred Herrmann provided the German translation, de.pm for v2.0.0. Manfred continues to support de.pm updates for each new version, -together with some help from Ralph Pagang. +together with some help from Ralph Paßgang. Lorenzo Cappelletti provided the Italian translation, it.pm for v2.1.0. Giuseppe Iuculano and Vittorio Macchi updated it for 3.0.0. --- backuppc-3.3.1.orig/httpd/BackupPC.conf +++ backuppc-3.3.1/httpd/BackupPC.conf @@ -0,0 +1,33 @@ +# +# DESCRIPTION +# +# This file controls access and configuration for the BackupPC CGI +# interface. +# +# Distributed with BackupPC version 3.1.1, released 22 Dec 2008. + + + +# +# This section tells apache which machines can access the interface. +# You can change the allow line to allow access from your local +# network, or comment out this region to allow access from all +# machines. +# +order deny,allow +deny from all +allow from 127.0.0.1 + +# +# You can change the authorization method to LDAP or another method +# besides htaccess here if you are so inclined. +# +AuthType Basic +AuthUserFile /etc/backuppc/BackupPC.users +AuthName "BackupPC Community Edition Administrative Interface" +require valid-user + + + +Alias /backuppc/image /usr/share/backuppc/image +ScriptAlias /BackupPC_Admin /usr/share/backuppc/cgi-bin/BackupPC_Admin --- backuppc-3.3.1.orig/lib/BackupPC/CGI/Browse.pm +++ backuppc-3.3.1/lib/BackupPC/CGI/Browse.pm @@ -65,7 +65,7 @@ # # default to the newest backup # - if ( !defined($In{num}) && defined(@Backups) && @Backups > 0 ) { + if ( !defined($In{num}) && @Backups && @Backups > 0 ) { $i = @Backups - 1; $num = $Backups[$i]{num}; } --- backuppc-3.3.1.orig/lib/BackupPC/CGI/EditConfig.pm +++ backuppc-3.3.1/lib/BackupPC/CGI/EditConfig.pm @@ -378,8 +378,8 @@ my $host = $In{host}; my $menu = $In{menu} || "server"; my $hosts_path = $Hosts; - my $config_path = $host eq "" ? "$TopDir/conf/config.pl" - : "$TopDir/pc/$host/config.pl"; + my $config_path = $host eq "" ? "/etc/backuppc/config.pl" + : "/etc/backuppc/$host.pl"; my $Privileged = CheckPermission($host) && ($PrivAdmin || $Conf{CgiUserConfigEditEnable}); @@ -390,6 +390,9 @@ ErrorExit(eval("qq{$Lang->{Only_privileged_users_can_edit_config_files}}")); } + # Debian: ClientNameAlias is too dangerous, disable it + $bpc->{Conf}{CgiUserConfigEdit}{ClientNameAlias} = 0; + if ( defined($In{menu}) || $In{saveAction} eq "Save" ) { $errors = errorCheck(); if ( %$errors ) { @@ -451,6 +454,7 @@ # based on what is enabled. Admin users can edit all the # available per-host settings. # + foreach my $m ( keys(%ConfigMenu) ) { my $enabled = 0; my $text = -1; --- backuppc-3.3.1.orig/lib/BackupPC/CGI/GeneralInfo.pm +++ backuppc-3.3.1/lib/BackupPC/CGI/GeneralInfo.pm @@ -44,6 +44,14 @@ GetStatusInfo("info jobs hosts queueLen"); my $Privileged = CheckPermission(); + if ($In{image} ne "") { + $In{image} =~ /([0-9]+)/; + my $weeks = $1; + print "Content-type: image/png\n\n"; + print `/usr/bin/rrdtool graph - --imgformat=PNG --start=end-${weeks}w --end=-300 --title="BackupPC Pool Size (${weeks} weeks)" --base=1000 --height=100 --width=600 --alt-autoscale-max --lower-limit=0 --vertical-label="" --slope-mode --font TITLE:10:Times --font AXIS:8:Times --font LEGEND:8:Times --font UNIT:8:Times -c BACK#FFFFFF DEF:ao="$LogDir/pool.rrd":ckb:AVERAGE CDEF:a=ao,1024,* AREA:a#95B8DB:"CPool in bytes" GPRINT:a:LAST:"Current\\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\\:%8.2lf %s" GPRINT:a:MAX:"Maximum\\:%8.2lf %s\\n"`; + return; + } + my($jobStr, $statusStr); foreach my $host ( sort(keys(%Jobs)) ) { my $startTime = timeStamp2($Jobs{$host}{startTime}); @@ -129,6 +137,11 @@ my $generalInfo = eval("qq{$Lang->{BackupPC_Server_Status_General_Info}}") if ( $Privileged ); my $content = eval("qq{$Lang->{BackupPC_Server_Status}}"); + + if (-r "$LogDir/pool.rrd" && $Privileged) { + $content .= '

'; + } + Header($Lang->{H_BackupPC_Server_Status}, $content); Trailer(); } --- backuppc-3.3.1.orig/lib/BackupPC/CGI/Lib.pm +++ backuppc-3.3.1/lib/BackupPC/CGI/Lib.pm @@ -501,7 +501,7 @@ NavLink("?action=editConfig&host=${EscURI($host)}", $Lang->{CfgEdit_Edit_Config}, " class=\"navbar\""); } elsif ( -f "$TopDir/pc/$host/config.pl" - || ($host ne "config" && -f "$TopDir/conf/$host.pl") ) { + || ($host ne "config" && -f "/etc/backuppc/$host.pl") ) { NavLink("?action=view&type=config&host=${EscURI($host)}", $Lang->{Config_file}, " class=\"navbar\""); } --- backuppc-3.3.1.orig/lib/BackupPC/CGI/View.pm +++ backuppc-3.3.1/lib/BackupPC/CGI/View.pm @@ -46,7 +46,7 @@ my $compress = 0; my $fh; my $host = $In{host}; - my $num = $In{num}; + my $num = ${EscHTML($In{num})}; my $type = $In{type}; my $linkHosts = 0; my($file, $comment); @@ -89,7 +89,7 @@ $file = $bpc->ConfDir() . "/hosts"; $linkHosts = 1; } elsif ( $type eq "docs" ) { - $file = $bpc->InstallDir() . "/doc/BackupPC.html"; + $file = "/usr/share/doc/backuppc/BackupPC.html"; } elsif ( $host ne "" ) { if ( !defined($In{num}) ) { # get the latest LOG file @@ -136,6 +136,10 @@ } $s =~ s/[\n\r]+//g; if ( $s =~ /smb: \\>/ + || $s =~ /^tar:\d+\s/ + || $s =~ /^ NTLMSSP_/ + || $s =~ /^GENSEC backend / + || $s =~ /^doing parameter / || $s =~ /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/ || $s =~ /^tar: dumped \d+ files/ || $s =~ /^\s*added interface/i --- backuppc-3.3.1.orig/lib/BackupPC/Config/Meta.pm +++ backuppc-3.3.1/lib/BackupPC/Config/Meta.pm @@ -85,6 +85,7 @@ SshPath => {type => "execPath", undefIfEmpty => 1}, NmbLookupPath => {type => "execPath", undefIfEmpty => 1}, PingPath => {type => "execPath", undefIfEmpty => 1}, + Ping6Path => {type => "execPath", undefIfEmpty => 1}, DfPath => {type => "execPath", undefIfEmpty => 1}, DfCmd => "string", SplitPath => {type => "execPath", undefIfEmpty => 1}, --- backuppc-3.3.1.orig/lib/BackupPC/Lib.pm +++ backuppc-3.3.1/lib/BackupPC/Lib.pm @@ -46,6 +46,7 @@ use File::Path; use File::Compare; use Socket; +use Socket6; use Cwd; use Digest::MD5; use Config; @@ -123,7 +124,7 @@ useFHS => $useFHS, TopDir => $topDir, InstallDir => $installDir, - ConfDir => $confDir eq "" ? "$topDir/conf" : $confDir, + ConfDir => "/etc/backuppc", LogDir => "$topDir/log", }; } @@ -512,7 +513,8 @@ } if ( $IODirentOk ) { @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh)); - map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric + #map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric + map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries; # make type numeric, unset unknown types } else { @entries = map { { name => $_} } readdir($fh); } @@ -971,6 +973,7 @@ { my($bpc, $host) = @_; my($s, $pingCmd, $ret); + my($family, @res, $args); # # Return success if the ping cmd is undefined or empty. @@ -981,10 +984,20 @@ return 0; } - my $args = { - pingPath => $bpc->{Conf}{PingPath}, - host => $host, - }; + ($family, @res) = getaddrinfo($host, "22"); + if ( $family eq AF_INET ) { + $args = { + pingPath => $bpc->{Conf}{PingPath}, + host => $host, + }; + } + if ( $family eq AF_INET6 ) { + $args = { + pingPath => $bpc->{Conf}{Ping6Path}, + host => $host, + }; + } + $pingCmd = $bpc->cmdVarSubstitute($bpc->{Conf}{PingCmd}, $args); # @@ -1261,7 +1274,7 @@ # # Replace scalar variables first # - $arg =~ s[\${(\w+)}(\+?)]{ + $arg =~ s[\$\{(\w+)}(\+?)]{ exists($vars->{$1}) && ref($vars->{$1}) ne "ARRAY" ? ($2 eq "+" ? $bpc->shellEscape($vars->{$1}) : $vars->{$1}) : "\${$1}$2" @@ -1270,7 +1283,7 @@ # Now replicate any array arguments; this just works for just one # array var in each argument. # - if ( $arg =~ m[(.*)\${(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) { + if ( $arg =~ m[(.*)\$\{(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) { my $pre = $1; my $var = $2; my $esc = $3; --- backuppc-3.3.1.orig/lib/BackupPC/Storage/Text.pm +++ backuppc-3.3.1/lib/BackupPC/Storage/Text.pm @@ -268,7 +268,7 @@ if ( -f "$s->{TopDir}/pc/$host/config.pl" ); return "$s->{ConfDir}/$host.pl" if ( $host ne "config" && -f "$s->{ConfDir}/$host.pl" ); - return "$s->{ConfDir}/pc/$host.pl"; + return "$s->{ConfDir}/$host.pl"; } } @@ -283,6 +283,7 @@ my $conf = $prevConfig || {}; my $configPath = $s->ConfigPath($host); + push(@configs, "/etc/backuppc/localconfig.pl") if ( -f "/etc/backuppc/localconfig.pl" ); push(@configs, $configPath) if ( -f $configPath ); foreach $config ( @configs ) { %Conf = %$conf; --- backuppc-3.3.1.orig/lib/BackupPC/Xfer/Smb.pm +++ backuppc-3.3.1/lib/BackupPC/Xfer/Smb.pm @@ -217,7 +217,7 @@ # This section is highly dependent on the version of smbclient. # If you upgrade Samba, make sure that these regexp are still valid. # - if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) { + if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) { my $sambaFileSize = $1; my $pcFileName = $2; (my $fileName = $pcFileName) =~ s/\\/\//g; @@ -230,7 +230,9 @@ $t->{byteCnt} += $2; $t->{fileCnt}++; $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 1 ); - } elsif ( /^\s*tar: dumped \d+ files/ ) { + } elsif ( /^\s*tar: dumped \d+ files/ + || /Total bytes received: \d+/i + || /tar_process done, err = 0/ ) { $t->{xferOK} = 1; $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 ); } elsif ( /^\s*tar: restored \d+ files/ ) { @@ -270,6 +272,10 @@ } elsif ( /^\s*directory \\/i ) { $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 ); } elsif ( /smb: \\>/ + || /^tar:\d+\s/ + || /^ NTLMSSP_/ + || /^GENSEC backend / + || /^doing parameter / || /^\s*added interface/i || /^\s*tarmode is now/i || /^\s*Total bytes written/i