From: cbarratt Date: Mon, 23 Feb 2004 07:42:54 +0000 (+0000) Subject: * Added Italian translation, it.pm, from Lorenzo Cappelletti X-Git-Tag: v2_1_0beta0~6 X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=commitdiff_plain;h=bd6334a9c72e7fa75f13fd6426f5a8a8cd4ab8b1 * Added Italian translation, it.pm, from Lorenzo Cappelletti * Added exponential full backup expiry * Fixed init.d/src/gentoo-backuppc --- diff --git a/ChangeLog b/ChangeLog index 605c323..0120564 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,35 +21,26 @@ # Version __VERSION__, __RELEASEDATE__ #------------------------------------------------------------------------ +* A failed full dump is now saved as a partial (incomplete) dump, + provided it includes some files. This can be used for browsing, + restoring etc, and will also form the basis of resuming full + dumps. Only one partial is kept, and it is removed as soon + as a successful full (or a new partial) is done. + + (Note: still needs some work to cleanup any partial files when the + dump is interrupted or fails). + * Added support for resuming a full dump for rsync. The partial full is kept, and to resume an incremental is done against the partial, and a full is done for the rest. -* Added support for Rsync checksum caching. Rsync checksum are - appended to the compressed pool files. - -* Added support for smbclient from samba version 3.0.0. - -* Added options for block size, buffer size and share wild-card to - BackupPC_tarCreate. - -* Add creation of per-PC directory in BackupPC/CGI/Restore.pm in - case it doesn't already exist. Reported by XXX. - -* Replace PingClientPath with PingPath in configure.pl. - -* GFK updated fr.pm from en.pm. + (Note: not tested! Also needs a new File::RsyncP that I haven't + yet released.) -* Various tweaks to recent changes, including additional patches - from Josh and Paul. Added host selection list to restore page. - Tweak CSS and layout. - -* Fixed $Conf{HardLinkMax} limit check in BackupPC::Lib; reported - by Ross Skaliotis. - -* Major changes from Ryan Kucera to add style sheets to the CGI - interface, allowing easy customization. Added new icons and - BackupPC logo. Numerous navigation improvements. +* Added support for Rsync checksum caching. Rsync checksum are + appended to the compressed pool files. This means that block + and file checksums do not need to be recomputed on the server + when using rsync. * Major addition of Archive feature from Josh Marshall. Special clients can be configured to be archive targets (eg: tape drives, @@ -57,29 +48,126 @@ archives are created, optionally compressed and split and written to the output device. Logs are maintained and are browsable. +* Major changes from Ryan Kucera to add style sheets to the CGI + interface, allowing easy customization. Added new icons and + BackupPC logo. Numerous navigation improvements. + +* Added directory history display to BackupPC_Admin, allowing the + user to quickly see which files changed between backups on a + per-directory basis. + +* Added exponential expiry option for full dumps. This allows you + to specify + + - how many fulls to keep at intervals of $Conf{FullPeriod}, followed by + - how many fulls to keep at intervals of 2 * $Conf{FullPeriod}, + - how many fulls to keep at intervals of 4 * $Conf{FullPeriod}, + - how many fulls to keep at intervals of 8 * $Conf{FullPeriod}, + - how many fulls to keep at intervals of 16 * $Conf{FullPeriod}, + + and so on. This allows you, for example, to keep 4 weekly fulls, + followed by 6 fulls every 4 weeks (approx 1 month) and 2 fulls at + 16 weeks, for roughly 1 year of history. This works by deleting + every other full as each expiry boundary is crossed. Suggested + by David Cramblett. + +* Added Italian language translation it.pm from Lorenzo Cappelletti. + +* Major updates to language files for new features and tags changes. + Updated makeDist to do pedantic consistency checking of language + files. + * Addition of administration options from Paul Lukins. Initial page allows server to be started/stopped/reloaded. * Split BackupPC_Admin into a set of modules, one for each major action. Each action is now a seperate module in lib/BackupPC/CGI. -* Added directory history display to BackupPC_Admin, allowing the - user to quickly see which files changed between backups. +* Allow the blackout period begin/end to span midnight. Adapted + from patch submitted by David Smith. -* A failed full dump is now saved as a partial (incomplete) dump, - provided it includes some files. This can be used for browsing, - restoring etc, and will also form the basis of resuming full - dumps. Only one partial is kept, and it is removed as soon - as a success full (or a new partial) is done. +* Allow multiple blackout periods, with new config variable + $Conf{BlackoutPeriods} that replaces the old variables + $Conf{BlackoutHourBegin}, $Conf{BlackoutHourEnd}, and + $Conf{BlackoutWeekDays}. Based on patch submitted by + Lorenzo Cappelletti. + +* Disabled alarms after forks to avoid timeouts in children that + do not reset their alarm. Prompted by ideas from James Leu. + +* Added options for block size, buffer size and share wild-card to + BackupPC_tarCreate. Also added negative backup number options + that are relative to the last (so -1 is the last), suggested by + William McKee and Carl Soderstrom. + +* Add creation of per-PC directory in BackupPC/CGI/Restore.pm in + case it doesn't already exist. + +* Added -q -x to all ssh commands in conf/config.pl. Suggested by + SI Reasoning and Niranjan Ghate. + +* Changed restore code so that option #1 (direct restore) can be + disabled if the restore command is undefined. Disabling direct + restore is necessary if the share is read-only. Suggested by + Rich B from SAIC. + +* Changed regexp in lib/BackupPC/Smb.pm to allow numbers with both + a decimal point or comma for international versions of Samba. + Patch submitted by Frank Gard. * Browsing and directory history now sort the files in a case-insensitive manner. +* Changed exec() syntax to allow executing commands whose path + contains spaces. + * Swapped the Server and Hosts sections on the Nav bar. Moved the host search text box to the top of the hosts section. This was done to move the variable-length part of the Nav bar (when all hosts are displayed) to the bottom. +* Fixed a bug in tar restore related to how the common prefix path is + removed. Now ensure that the common path is at a directory boundary. + Reported by Patrick Neuner. + +* Added --chuid ${USER} to init.d/src/gentoo-backuppc. Suggested by + SI Reasoning, Pascal Pochol, Michael Evanoff and others. + +* Added Suse notes to init.d/README from Bruno Vernay. + +* Added Apache 2 documentation fix from Michael Tuzi. + +#------------------------------------------------------------------------ +# Version 2.0.2, 6 Oct 2003 +#------------------------------------------------------------------------ + +* Fixed stupid last-minute change in octal size conversion in + Backup_tarExtract. + +#----------------------------------------------------------------------- +# Version 2.0.1, 5 Oct 2003 +#------------------------------------------------------------------------ + +* Fixed handling of >= 8GB files in BackupPC_tarExtract and >= 4GB + files in BackupPC_tarCreate. + +* Removed smbclient size repair in BackupPC_tarExtract for files + between 2GB and 4GB. This means that BackupPC_tarExtract 2.0.1 + doesn't behave the same as 2.0.0 for file sizes between 2GB and 4GB + extacted using smbclient 2.2.x. If you have problems backing up + files whose size is between 2GB and 4GB using smbclient 2.2.x + you should upgrade smbclient to 3.0, since it now generates + correct file sizes. + +* Replace PingClientPath with PingPath in configure.pl. + +* Removed -T (taint mode) on binaries installed in configure.pl. + +* Added support for smbclient from samba version 3.0.0. + +* Fixed $Conf{HardLinkMax} limit check in BackupPC::Lib; reported + by Ross Skaliotis. + * In BackupPC_Admin, default REMOTE_USER to $Conf{BackupPCUser} if it is not defined. This allows the CGI interface to work when AdminUsers = '*'. Reported by Quentin Arce. diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump index 23720ca..dbc2ee0 100755 --- a/bin/BackupPC_dump +++ b/bin/BackupPC_dump @@ -282,32 +282,48 @@ if ( !$opts{i} && !$opts{f} && $Conf{BlackoutGoodCnt} >= 0 my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); my($currHours) = $hour + $min / 60 + $sec / 3600; my $blackout; + # - # Allow blackout to span midnight (specified by BlackoutHourBegin - # being greater than BlackoutHourEnd) + # Handle backward compatibility with original separate scalar + # parameters. # - if ( $Conf{BlackoutHourBegin} > $Conf{BlackoutHourEnd} ) { - $blackout = $Conf{BlackoutHourBegin} <= $currHours - || $currHours <= $Conf{BlackoutHourEnd}; - if ( $currHours <= $Conf{BlackoutHourEnd} ) { - # - # This is after midnight, so decrement the weekday for the - # weekday check (eg: Monday 11pm-1am means Monday 2300 to - # Tuesday 0100, not Monday 2300-2400 plus Monday 0000-0100). - # - $wday--; - $wday += 7 if ( $wday < 0 ); - } - } else { - $blackout = $Conf{BlackoutHourBegin} <= $currHours - && $currHours <= $Conf{BlackoutHourEnd}; + if ( defined($Conf{BlackoutHourBegin}) ) { + push(@{$Conf{BlackoutPeriods}}, + { + hourBegin => $Conf{BlackoutHourBegin}, + hourEnd => $Conf{BlackoutHourEnd}, + weekDays => $Conf{BlackoutWeekDays}, + } + ); } - if ( $blackout && grep($_ == $wday, @{$Conf{BlackoutWeekDays}}) ) { -# print(LOG $bpc->timeStamp, "skipping because of blackout" -# . " (alive $StatusHost{aliveCnt} times)\n"); - print(STDERR "Skipping $client because of blackout\n") - if ( $opts{v} ); - NothingToDo($needLink); + foreach my $p ( @{$Conf{BlackoutPeriods}} ) { + # + # Allow blackout to span midnight (specified by BlackoutHourBegin + # being greater than BlackoutHourEnd) + # + if ( $p->{hourBegin} > $p->{hourEnd} ) { + $blackout = $p->{hourBegin} <= $currHours + || $currHours <= $p->{hourEnd}; + if ( $currHours <= $p->{hourEnd} ) { + # + # This is after midnight, so decrement the weekday for the + # weekday check (eg: Monday 11pm-1am means Monday 2300 to + # Tuesday 0100, not Monday 2300-2400 plus Monday 0000-0100). + # + $wday--; + $wday += 7 if ( $wday < 0 ); + } + } else { + $blackout = $p->{hourBegin} <= $currHours + && $currHours <= $p->{hourEnd}; + } + if ( $blackout && grep($_ == $wday, @{$p->{weekDays}}) ) { +# print(LOG $bpc->timeStamp, "skipping because of blackout" +# . " (alive $StatusHost{aliveCnt} times)\n"); + print(STDERR "Skipping $client because of blackout\n") + if ( $opts{v} ); + NothingToDo($needLink); + } } } @@ -408,7 +424,7 @@ if ( !defined($XferLOG) ) { exit(1); } $XferLOG->writeTeeStderr(1) if ( $opts{v} ); -unlink("$Dir/NewFileList"); +unlink("$Dir/NewFileList") if ( -f "$Dir/NewFileList" ); my $startTime = time(); my $tarErrs = 0; @@ -830,17 +846,17 @@ sub BackupFailCleanup { my $fileExt = $Conf{CompressLevel} > 0 ? ".z" : ""; - if ( $type ne "full" - || ($nFilesTotal == 0 && $xfer->getStats->{fileCnt} == 0) ) { + if ( $type ne "full" ) { +# || ($nFilesTotal == 0 && $xfer->getStats->{fileCnt} == 0) ) { # # No point in saving this dump; get rid of eveything. # - unlink("$Dir/timeStamp.level0"); - unlink("$Dir/SmbLOG.bad"); - unlink("$Dir/SmbLOG.bad$fileExt"); - unlink("$Dir/XferLOG.bad"); - unlink("$Dir/XferLOG.bad$fileExt"); - unlink("$Dir/NewFileList"); + unlink("$Dir/timeStamp.level0") if ( -f "$Dir/timeStamp.level0" ); + unlink("$Dir/SmbLOG.bad") if ( -f "$Dir/SmbLOG.bad" ); + unlink("$Dir/SmbLOG.bad$fileExt") if ( -f "$Dir/SmbLOG.bad$fileExt" ); + unlink("$Dir/XferLOG.bad") if ( -f "$Dir/XferLOG.bad" ); + unlink("$Dir/XferLOG.bad$fileExt") if ( -f "$Dir/XferLOG.bad$fileExt" ); + unlink("$Dir/NewFileList") if ( -f "$Dir/NewFileList" ); rename("$Dir/XferLOG$fileExt", "$Dir/XferLOG.bad$fileExt"); $bpc->RmTreeDefer("$TopDir/trash", "$Dir/new") if ( -d "$Dir/new" ); print("dump failed: $stat{hostError}\n"); @@ -869,6 +885,14 @@ sub BackupExpire my(@Backups) = $bpc->BackupInfoRead($client); my($cntFull, $cntIncr, $firstFull, $firstIncr, $oldestIncr, $oldestFull); + if ( $Conf{FullKeepCnt} <= 0 ) { + print(LOG $bpc->timeStamp, + "Invalid value for \$Conf{FullKeepCnt}=$Conf{FullKeepCnt}\n"); + print(STDERR + "Invalid value for \$Conf{FullKeepCnt}=$Conf{FullKeepCnt}\n") + if ( $opts{v} ); + return; + } while ( 1 ) { $cntFull = $cntIncr = 0; $oldestIncr = $oldestFull = 0; @@ -901,9 +925,15 @@ sub BackupExpire print(LOG $bpc->timeStamp, "removing incr backup $Backups[$firstIncr]{num}\n"); BackupRemove($client, \@Backups, $firstIncr); - } elsif ( ($cntFull > $Conf{FullKeepCnt} - || ($cntFull > $Conf{FullKeepCntMin} - && $oldestFull > $Conf{FullAgeMax})) + next; + } + + # + # Delete any old full backups, according to $Conf{FullKeepCntMin} + # and $Conf{FullAgeMax}. + # + if ( $cntFull > $Conf{FullKeepCntMin} + && $oldestFull > $Conf{FullAgeMax} && (@Backups <= $firstFull + 1 || !$Backups[$firstFull + 1]{noFill}) ) { # @@ -914,15 +944,94 @@ sub BackupExpire # filled.) # print(LOG $bpc->timeStamp, - "removing full backup $Backups[$firstFull]{num}\n"); + "removing old full backup $Backups[$firstFull]{num}\n"); BackupRemove($client, \@Backups, $firstFull); - } else { - last; - } + next; + } + + # + # Do new-style full backup expiry, which includes the the case + # where $Conf{FullKeepCnt} is an array. + # + last if ( !BackupFullExpire($client, \@Backups) ); } $bpc->BackupInfoWrite($client, @Backups); } +# +# Handle full backup expiry, using exponential periods. +# +sub BackupFullExpire +{ + my($client, $Backups) = @_; + my $fullCnt = 0; + my $fullPeriod = $Conf{FullPeriod}; + my $origFullPeriod = $fullPeriod; + my $fullKeepCnt = $Conf{FullKeepCnt}; + my $fullKeepIdx = 0; + my(@delete, @fullList); + + # + # Don't delete anything if $Conf{FullPeriod} or $Conf{FullKeepCnt} are + # not defined - possibly a corrupted config.pl file. + # + return if ( !defined($Conf{FullPeriod}) || !defined($Conf{FullKeepCnt}) ); + + # + # If regular backups are still disabled with $Conf{FullPeriod} < 0, + # we still expire backups based on a typical FullPeriod value - weekly. + # + $fullPeriod = 7 if ( $fullPeriod <= 0 ); + + $fullKeepCnt = [$fullKeepCnt] if ( ref($fullKeepCnt) ne "ARRAY" ); + + for ( my $i = 0 ; $i < @$Backups ; $i++ ) { + next if ( $Backups->[$i]{type} ne "full" ); + push(@fullList, $i); + } + for ( my $k = @fullList - 1 ; $k >= 0 ; $k-- ) { + my $i = $fullList[$k]; + my $prevFull = $fullList[$k-1] if ( $k > 0 ); + # + # Don't delete any full that is followed by an unfilled backup, + # since it is needed for restore. + # + my $noDelete = $i + 1 < @$Backups ? $Backups->[$i+1]{noFill} : 0; + + if ( !$noDelete && + ($fullKeepIdx >= @$fullKeepCnt + || $k > 0 + && $fullKeepIdx > 0 + && $Backups->[$i]{startTime} - $Backups->[$prevFull]{startTime} + < ($fullPeriod - $origFullPeriod / 2) * 24 * 3600 + ) + ) { + # + # Delete the full backup + # + #printf("Deleting backup $i ($prevFull)\n"); + push(@delete, $i); + } else { + $fullCnt++; + while ( $fullKeepIdx < @$fullKeepCnt + && $fullCnt >= $fullKeepCnt->[$fullKeepIdx] ) { + $fullKeepIdx++; + $fullCnt = 0; + $fullPeriod = 2 * $fullPeriod; + } + } + } + # + # Now actually delete the backups + # + for ( my $i = @delete - 1 ; $i >= 0 ; $i-- ) { + print(LOG $bpc->timeStamp, + "removing full backup $Backups->[$delete[$i]]{num}\n"); + BackupRemove($client, $Backups, $delete[$i]); + } + return @delete; +} + # # Removes any partial backups # @@ -987,7 +1096,12 @@ sub BackupSave $Backups[$i]{mangle} = 1; # name mangling always on for v1.04+ $bpc->BackupInfoWrite($client, @Backups); - unlink("$Dir/timeStamp.level0"); + unlink("$Dir/timeStamp.level0") if ( -f "$Dir/timeStamp.level0" ); + foreach my $ext ( qw(bad bad.z) ) { + next if ( !-f "$Dir/XferLOG.$ext" ); + unlink("$Dir/XferLOG.$ext.old") if ( -f "$Dir/XferLOG.$ext" ); + rename("$Dir/XferLOG.$ext", "$Dir/XferLOG.$ext.old"); + } # # Now remove the bad files, replacing them if possible with links to diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate index 57a8d63..16cb8e8 100755 --- a/bin/BackupPC_tarCreate +++ b/bin/BackupPC_tarCreate @@ -324,8 +324,8 @@ sub TarWriteHeader # # sprintf octal only handles up to 2^32 - 1 # - my $sizeStr = sprintf("%03o", $hdr->{size} / (1 << 24)) - . sprintf("%08o", $hdr->{size} % (1 << 24)); + $sizeStr = sprintf("%03o", $hdr->{size} / (1 << 24)) + . sprintf("%08o", $hdr->{size} % (1 << 24)); } else { $sizeStr = sprintf("%011o", $hdr->{size}); } diff --git a/conf/config.pl b/conf/config.pl index 5b0cd94..714f1d7 100644 --- a/conf/config.pl +++ b/conf/config.pl @@ -361,8 +361,74 @@ $Conf{IncrPeriod} = 0.97; # extra old backups will be removed. # # If filling of incremental dumps is off the oldest backup always -# has to be a full (ie: filled) dump. This might mean an extra full -# dump is kept until the second oldest (incremental) dump expires. +# has to be a full (ie: filled) dump. This might mean one or two +# extra full dumps are kept until the oldest incremental backups expire. +# +# Exponential backup expiry is also supported. This allows you to specify: +# +# - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by +# - num fulls to keep at intervals of 2 * $Conf{FullPeriod}, +# - num fulls to keep at intervals of 4 * $Conf{FullPeriod}, +# - num fulls to keep at intervals of 8 * $Conf{FullPeriod}, +# - num fulls to keep at intervals of 16 * $Conf{FullPeriod}, +# +# and so on. This works by deleting every other full as each expiry +# boundary is crossed. +# +# Exponential expiry is specified using an array for $Conf{FullKeepCnt}: +# +# $Conf{FullKeepCnt} = [4, 2, 3]; +# +# Entry #n specifies how many fulls to keep at an interval of +# 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...). +# +# The example above specifies keeping 4 of the most recent full backups +# (1 week interval) two full backups at 2 week intervals, and 3 full +# backups at 4 week intervals, eg: +# +# full 0 19 weeks old \ +# full 1 15 weeks old >--- 3 backups at 4 * $Conf{FullPeriod} +# full 2 11 weeks old / +# full 3 7 weeks old \____ 2 backups at 2 * $Conf{FullPeriod} +# full 4 5 weeks old / +# full 5 3 weeks old \ +# full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod} +# full 7 1 week old / +# full 8 current / +# +# On a given week the spacing might be less than shown as each backup +# ages through each expiry period. For example, one week later, a +# new full is completed and the oldest is deleted, giving: +# +# full 0 16 weeks old \ +# full 1 12 weeks old >--- 3 backups at 4 * $Conf{FullPeriod} +# full 2 8 weeks old / +# full 3 6 weeks old \____ 2 backups at 2 * $Conf{FullPeriod} +# full 4 4 weeks old / +# full 5 3 weeks old \ +# full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod} +# full 7 1 week old / +# full 8 current / +# +# You can specify 0 as a count (except in the first entry), and the +# array can be as long as you wish. For example: +# +# $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2]; +# +# This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod}, +# followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month +# apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx +# 7-8 months apart). +# +# Note that you will have to increase $Conf{FullAgeMax} if you want +# very old full backups to be kept. Full backups are removed according +# to both $Conf{FullKeepCnt} and $Conf{FullAgeMax}. +# +# Note also that these two settings are equivalent and both keep just +# the four most recent full dumps: +# +# $Conf{FullKeepCnt} = 4; +# $Conf{FullKeepCnt} = [4]; # $Conf{FullKeepCnt} = 1; @@ -372,7 +438,7 @@ $Conf{FullKeepCnt} = 1; # they are. # $Conf{FullKeepCntMin} = 1; -$Conf{FullAgeMax} = 60; +$Conf{FullAgeMax} = 90; # # Number of incremental backups to keep. Must be >= 1. @@ -495,6 +561,9 @@ $Conf{BackupFilesOnly} = undef; # the directory name: a trailing "/" causes the name to not match # and the directory will not be excluded. # +# Users report that for smbclient you should specify a directory +# followed by "/*", eg: "/proc/*", instead of just "/proc". +# # Examples: # $Conf{BackupFilesExclude} = '/temp'; # $Conf{BackupFilesExclude} = ['/temp']; # same as first example @@ -512,8 +581,7 @@ $Conf{BackupFilesExclude} = undef; # each PC a count of consecutive good pings is maintained. Once a PC has # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject # to "blackout" and not backed up during hours and days specified by -# $Conf{BlackoutWeekDays}, $Conf{BlackoutHourBegin} and -# $Conf{BlackoutHourEnd}. +# $Conf{BlackoutPeriods}. # # To allow for periodic rebooting of a PC or other brief periods when a # PC is not on the network, a number of consecutive bad pings is allowed @@ -539,13 +607,52 @@ $Conf{BlackoutBadPingLimit} = 3; $Conf{BlackoutGoodCnt} = 7; # -# The default settings specify the blackout period from 7:00am to -# 7:30pm local time on Mon-Fri. For $Conf{BlackoutWeekDays}, -# 0 is Sunday, 1 is Monday etc. +# One or more blackout periods can be specified. If a client is +# subject to blackout then no regular (non-manual) backups will +# be started during any of these periods. hourBegin and hourEnd +# specify hours fro midnight and weekDays is a list of days of +# the week where 0 is Sunday, 1 is Monday etc. +# +# For example: +# +# $Conf{BlackoutPeriods} = [ +# { +# hourBegin => 7.0, +# hourEnd => 19.5, +# weekDays => [1, 2, 3, 4, 5], +# }, +# ]; # -$Conf{BlackoutHourBegin} = 7.0; -$Conf{BlackoutHourEnd} = 19.5; -$Conf{BlackoutWeekDays} = [1, 2, 3, 4, 5]; +# specifies one blackout period from 7:00am to 7:30pm local time +# on Mon-Fri. +# +# The blackout period can also span midnight by setting +# hourBegin > hourEnd, eg: +# +# $Conf{BlackoutPeriods} = [ +# { +# hourBegin => 7.0, +# hourEnd => 19.5, +# weekDays => [1, 2, 3, 4, 5], +# }, +# { +# hourBegin => 23, +# hourEnd => 5, +# weekDays => [5, 6], +# }, +# ]; +# +# This specifies one blackout period from 7:00am to 7:30pm local time +# on Mon-Fri, and a second period from 11pm to 5am on Friday and +# Saturday night. +# +$Conf{BlackoutPeriods} = [ + { + hourBegin => 7.0, + hourEnd => 19.5, + weekDays => [1, 2, 3, 4, 5], + }, +]; # # A backup of a share that has zero files is considered fatal. This is @@ -609,6 +716,10 @@ $Conf{SmbClientPath} = '/usr/bin/smbclient'; # $X_option exclude option (if $fileList is an exclude list) # $timeStampFile start time for incremental dump # +# If your smb share is read-only then direct restores will fail. +# You should set $Conf{SmbClientRestoreCmd} to undef and the +# corresponding CGI restore option will be removed. +# $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName' . ' $I_option -U $userName -E -N -d 1' . ' -c tarmode\\ full -Tc$X_option - $fileList'; @@ -656,7 +767,7 @@ $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' # # This setting only matters if $Conf{XferMethod} = 'tar'. # -$Conf{TarClientCmd} = '$sshPath -q -n -l root $host' +$Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host' . ' $tarPath -c -v -f - -C $shareName+' . ' --totals'; @@ -709,7 +820,11 @@ $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+'; # # This setting only matters if $Conf{XferMethod} = "tar". # -$Conf{TarClientRestoreCmd} = '$sshPath -q -l root $host' +# If you want to disable direct restores using tar, you should set +# $Conf{TarClientRestoreCmd} to undef and the corresponding CGI +# restore option will be removed. +# +$Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host' . ' $tarPath -x -p --numeric-owner --same-owner' . ' -v -f - -C $shareName+'; @@ -741,7 +856,7 @@ $Conf{RsyncClientPath} = '/bin/rsync'; # # This setting only matters if $Conf{XferMethod} = 'rsync'. # -$Conf{RsyncClientCmd} = '$sshPath -l root $host $rsyncPath $argList+'; +$Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+'; # # Full command to run rsync for restore on the client. The following @@ -758,7 +873,7 @@ $Conf{RsyncClientCmd} = '$sshPath -l root $host $rsyncPath $argList+'; # # This setting only matters if $Conf{XferMethod} = 'rsync'. # -$Conf{RsyncClientRestoreCmd} = '$sshPath -l root $host $rsyncPath $argList+'; +$Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+'; # # Share name to backup. For $Conf{XferMethod} = "rsync" this should @@ -842,6 +957,9 @@ $Conf{RsyncArgs} = [ # Arguments to rsync for restore. Do not edit the first set unless you # have a thorough understanding of how File::RsyncP works. # +# If you want to disable direct restores using rsync (eg: is the module +# is read-only), you should set $Conf{RsyncRestoreArgs} to undef and +# the corresponding CGI restore option will be removed. # $Conf{RsyncRestoreArgs} = [ # @@ -1036,7 +1154,7 @@ $Conf{PingCmd} = '$pingPath -c 1 $host'; # Example: # # $Conf{ServerInitdPath} = '/etc/init.d/backuppc'; -# $Conf{ServerInitdStartCmd} = '$sshPath -l root $serverHost' +# $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost' # . ' $serverInitdPath start' # . ' < /dev/null >& /dev/null'; # @@ -1121,7 +1239,7 @@ $Conf{MaxOldPerPCLogFiles} = 12; # shut down and restart a database server, or to dump a database # to files for backup. Example: # -# $Conf{DumpPreUserCmd} = '$sshPath -l root $host /usr/bin/dumpMysql'; +# $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql'; # # The following variable substitutions are made at run time for # $Conf{DumpPreUserCmd} and $Conf{DumpPostUserCmd}: @@ -1375,10 +1493,10 @@ $Conf{CgiURL} = undef; # # Language to use. See lib/BackupPC/Lang for the list of supported # languages, which include English (en), French (fr), Spanish (es), -# and German (de). +# German (de), and Italian (it). # # Currently the Language setting applies to the CGI interface and email -# messages sent to users. Log files and other text is still in English. +# messages sent to users. Log files and other text are still in English. # $Conf{Language} = 'en'; diff --git a/configure.pl b/configure.pl index cfba6cc..fe04994 100755 --- a/configure.pl +++ b/configure.pl @@ -438,6 +438,7 @@ foreach my $lib ( qw( BackupPC/Lang/fr.pm BackupPC/Lang/es.pm BackupPC/Lang/de.pm + BackupPC/Lang/it.pm BackupPC/CGI/AdminOptions.pm BackupPC/CGI/Archive.pm BackupPC/CGI/ArchiveInfo.pm @@ -531,6 +532,23 @@ if ( defined($Conf{SmbClientArgs}) ) { delete($Conf{SmbClientArgs}); } +# +# The blackout timing settings are now stored in a list of hashes, rather +# than three scalar parameters. +# +if ( defined($Conf{BlackoutHourBegin}) ) { + $Conf{BlackoutPeriods} = [ + { + hourBegin => $Conf{BlackoutHourBegin}, + hourEnd => $Conf{BlackoutHourEnd}, + weekDays => $Conf{BlackoutWeekDays}, + } + ]; + delete($Conf{BlackoutHourBegin}); + delete($Conf{BlackoutHourEnd}); + delete($Conf{BlackoutWeekDays}); +} + # # IncrFill should now be off # @@ -643,15 +661,18 @@ will need to do: Enjoy! EOF -if ( $ENV{LANG} =~ /utf/i && $^V ge v5.8.0 ) { +if ( `$Conf{PerlPath} -V` =~ /uselargefiles=undef/ ) { print <), J. W. Schultz's dirvish (L), +Ben Escoto's rdiff-backup (L), and John Bowman's rlbackup (L). + BackupPC provides many additional features, such as compressed storage, hardlinking any matching files (rather than just files with the same name), and storing special files without root privileges. But these other scripts @@ -249,12 +251,6 @@ Adding hardlink support to rsync. =item * -Adding block and file checksum caching to rsync. This will significantly -increase performance since the server doesn't have to read each file -(twice) to compute the block and file checksums. - -=item * - Adding a trip wire feature for notification when files below certain directories change. For example, if you are backing up a DMZ machine, you could request that you get sent email if any files below /bin, @@ -276,29 +272,6 @@ be specified (eg: MySQL, ascii text etc). =item * -Disconnect the notion of a physical host and a backup client. -Currently there is a one-to-one match between physical hosts -and backup clients. Instead, the current notion of a host -should be replaced by a backup client. Each backup client -corresponds to a physical host. A physical host could have -several backup clients. This is useful for backing up -different types of data, or backing up different portions -of a machine with different frequencies or settings. - -(Note: this has already been implemented in 2.0.0.) - -=item * - -Resuming incomplete full backups. Useful if a machine -(eg: laptop) is disconnected from the network during a backup, -or if the user manually stops a backup. This would be supported -initially for rsync. The partial dump would be kept, and be -browsable. When the next dump starts, an incremental against -the partial dump would be done to make sure it was up to date, -and then the rest of the full dump would be done. - -=item * - Replacing smbclient with the perl module FileSys::SmbClient. This gives much more direct control of the smb transfer, allowing incrementals to depend on any attribute change (eg: exist, mtime, @@ -326,14 +299,6 @@ the last, giving a continuous chain of differential dumps. =item * -Add a backup browsing feature that shows backup history by file. -So rather than a single directory view, it would be a table showing -the files (down) and the backups (across). The internal hardlinks -encode which files are identical across backups. You could immediately -see which files changed on which backups. - -=item * - More speculative: Storing binary file deltas (in fact, reverse deltas) for files that have the same name as a previous backup, but that aren't already in the pool. This will save storage for things like mailbox @@ -502,6 +467,15 @@ more troublesome, since it keeps this file locked all the time, so it cannot be read by smbclient whenever Outlook is running. See the L section for more discussion of this problem. +In addition to total disk space, you shold make sure you have +plenty of inodes on your BackupPC data partition. Some users have +reported running out of inodes on their BackupPC data partition. +So even if you have plenty of disk space, BackupPC will report +failures when the inodes are exhausted. This is a particular +problem with ext2/ext3 file systems that have a fixed number of +inodes when the file system is built. Use "df -i" to see your +inode usage. + =head2 Step 1: Getting BackupPC Download the latest version from L. @@ -806,13 +780,19 @@ and then set $Conf{XferMethod} to "tar" (use tar on the network mounted file system). Also, to make sure that file names with 8-bit characters are correctly -transferred by smbclient you should add this to samba's smb.conf file: +transferred by smbclient you should add this to samba's smb.conf file +for samba 2.x: [global] # Accept the windows charset client code page = 850 character set = ISO8859-1 +For samba 3.x this should instead be: + + [global] + unix charset = ISO8859-1 + This setting should work for western europe. See L for more information about settings for other languages. @@ -869,6 +849,10 @@ and $Conf{RsyncLogLevel}. In the case of rsyncd, $Conf{RsyncShareName} is the name of an rsync module (ie: the thing in square brackets in rsyncd's conf file -- see rsyncd.conf), not a file system path. +Be aware that rsyncd will remove the leading '/' from path names in +symbolic links if you specify "use chroot = no" in the rsynd.conf file. +See the rsyncd.conf manual page for more information. + =back For linux/unix machines you should not backup "/proc". This directory @@ -903,6 +887,10 @@ for a password. There are two common versions of ssh: v1 and v2. Here are some instructions for one way to setup ssh. (Check which version of SSH you have by typing "ssh" or "man ssh".) +=item Mac OS X + +In general this should be similar to Linux/Unix machines. + =over 4 =item OpenSSH Instructions @@ -1035,9 +1023,9 @@ Copy BackupPC's public key (BackupPC_id_rsa_1024_a.pub) to the =item Fix permissions You will probably need to make sure that all the files -in /.ssh2 have no group or other read/write permission: +in ~/.ssh2 have no group or other read/write permission: - chmod -R go-rwx /.ssh2 + chmod -R go-rwx ~/.ssh2 You should do the same thing for the BackupPC user on the server. @@ -1083,7 +1071,7 @@ Next, force protocol version 1 by adding: to BackupPC's ~/.ssh/config on the server. -Next, run "chmod -R go-rwx ~/.ssh" on the server and "chmod -R go-rwx /.ssh" +Next, run "chmod -R go-rwx ~/.ssh" on the server and "chmod -R go-rwx ~/.ssh" on the client. Finally, test using: @@ -1269,12 +1257,12 @@ to Apache's 1.x httpd.conf file: Apache 2.0.44 with Perl 5.8.0 on RedHat 7.1, Don Silvia reports that -this works: +this works (with tweaks from Michael Tuzi): LoadModule perl_module modules/mod_perl.so PerlModule Apache2 - + SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders @@ -1287,7 +1275,7 @@ this works: AuthType Basic AuthUserFile /path/to/user_file Require valid-user - + There are other optimizations and options with mod_perl. For example, you can tell mod_perl to preload various perl modules, @@ -3166,14 +3154,23 @@ Xavier provided the French translation fr.pm, with additions from Guillaume. Ryan Kucera contributed the directory navigation code and images -for v1.5.0. He also contributed the first skeleton of BackupPC_restore. +for v1.5.0. He contributed the first skeleton of BackupPC_restore. +He also added a significant revision to the CGI interface, including +CSS tags, in v2.1.0. Guillaume Filion wrote BackupPC_zipCreate and added the CGI support for zip download, in addition to some CGI cleanup, for v1.5.0. +Guillaume continues to support fr.pm updates for each +new version. + +Josh Marshall implemented the Archive feature in v2.1.0. + +Javier Gonzalez provided the Spanish translation, es.pm for v2.0.0. -Javier Gonzalez provided the Spanish translation, es.pm. +Manfred Herrmann provided the German translation, de.pm for v2.0.0. +Manfred continues to support de.pm updates for each new version. -Manfred Herrmann provided the German translation, de.pm. +Lorenzo Cappelletti provided the Italian translation, it.pm for v2.1.0. Many people have reported bugs, made useful suggestions and helped with testing; see the ChangeLog and the mail lists. diff --git a/init.d/README b/init.d/README index 4aee97b..76b4434 100644 --- a/init.d/README +++ b/init.d/README @@ -41,7 +41,10 @@ Suse Linux: When configure.pl is run, the script suse-backuppc is created. -(Can a Suse user add some instructions here??) +Using Suse 9.0 "chkconfig --level" doesn't work, so you should run: + + chkconfig backuppc 345 + chkconfig --list backuppc Gentoo Linux: ============ diff --git a/init.d/src/gentoo-backuppc b/init.d/src/gentoo-backuppc index e214941..3df501e 100755 --- a/init.d/src/gentoo-backuppc +++ b/init.d/src/gentoo-backuppc @@ -21,7 +21,7 @@ checkconfig() { start() { checkconfig || return 1 ebegin "Starting BackupPC" - start-stop-daemon --start --user ${USER} --pidfile ${PID_FILE} --exec ${EXEC} -- ${EXEC_OPTIONS} + start-stop-daemon --start --chuid ${USER} --user ${USER} --pidfile ${PID_FILE} --exec ${EXEC} -- ${EXEC_OPTIONS} eend $? } diff --git a/lib/BackupPC/CGI/Restore.pm b/lib/BackupPC/CGI/Restore.pm index 12d6020..a57422e 100644 --- a/lib/BackupPC/CGI/Restore.pm +++ b/lib/BackupPC/CGI/Restore.pm @@ -63,7 +63,7 @@ sub action (my $name = $In{"fcb$i"}) =~ s/%([0-9A-F]{2})/chr(hex($1))/eg; $badFileCnt++ if ( $name =~ m{(^|/)\.\.(/|$)} ); if ( @fileList == 0 ) { - $pathHdr = $name; + $pathHdr = substr($name, 0, rindex($name, "/")); } else { while ( substr($name, 0, length($pathHdr)) ne $pathHdr ) { $pathHdr = substr($pathHdr, 0, rindex($pathHdr, "/")); diff --git a/lib/BackupPC/Lang/it.pm b/lib/BackupPC/Lang/it.pm new file mode 100644 index 0000000..a6da40f --- /dev/null +++ b/lib/BackupPC/Lang/it.pm @@ -0,0 +1,1307 @@ +#!/usr/bin/perl +# +# $Id: it.pm,v 1.1 2004/02/23 07:42:57 cbarratt Exp $ +# +# Italian i18n file +# +# (C) Lorenzo Cappelletti 2004 +# + + +# -------------------------------- + +$Lang{Start_Archive} = "Avvia archivio"; +$Lang{Stop_Dequeue_Archive} = "Arresta/disaccoda archivio"; +$Lang{Start_Full_Backup} = "Avvia backup completo"; +$Lang{Start_Incr_Backup} = "Avvia backup incrementale"; +$Lang{Stop_Dequeue_Backup} = "Arresta/disaccoda backup"; +$Lang{Restore} = "Ripristina"; + +$Lang{Type_full} = "completo"; +$Lang{Type_incr} = "incrementale"; + +# ----- + +$Lang{Only_privileged_users_can_view_admin_options} = "Solo gli utenti privilegiati possono visualizzare le opzioni di amministrazione."; +$Lang{H_Admin_Options} = "Server BackupPC: opzioni di amministrazione"; +$Lang{Admin_Options} = "Opzioni di amministrazione"; +$Lang{Admin_Options_Page} = < +\${h1("Controllo server")} +
+ +
Arresta il server: +
Ricarica la configurazione del server: +
+
+\${h1("Configurazione server")} +
    +
  • Other options can go here... e.g., +
  • Modifica configurazione server +
+EOF +$Lang{Unable_to_connect_to_BackupPC_server} = "Impossibile connettersi al server BackupPC", + "Questo script CGI (\$MyURL) non è in grado di connettersi al server" + . " BackupPC su \$Conf{ServerHost} alla porta \$Conf{ServerPort}. L'errore è:" + . " \$err.", + "Forse il server BackupPC non è in esecuzioneor c'è un errore" + . " nella configurazione. Contattare l'amministratore di sistema."; +$Lang{Admin_Start_Server} = < +Il server BackupPC presso \$Conf{ServerHost} sulla porta \$Conf{ServerPort} +non è attualmente in esecuzione (forse è stato arrestato oppure non è stato ancora avviato).
+Si desidera avviarlo? + + + +EOF + +# ----- + +$Lang{H_BackupPC_Server_Status} = "Stato server BackupPC"; + +$Lang{BackupPC_Server_Status}= < +\${h2("Informazioni generali server")} + +
    +
  • Il PID del server è \$Info{pid} sull\'host \$Conf{ServerHost}, + versione \$Info{Version}, avviato il \$serverStartTime. +
  • Questo rapporto di stato è stato generato il \$now. +
  • La configurazione è stata caricata l'ultima volte il \$configLoadTime. +
  • Il prossimo accodamento dei PC sarà effettuato il \$nextWakeupTime. +
  • Altre informazioni: +
      +
    • \$numBgQueue richieste pendenti di backup dall\'ultimo risveglio + programmato +
    • \$numUserQueue richieste pendenti di backup da parte degli utenti +
    • \$numCmdQueue richieste pendenti di comandi + \$poolInfo +
    • Recentemente il sistema dei file di pool è stato al + \$Info{DUlastValue}% (\$DUlastTime). Il massimo di oggi + è del \$Info{DUDailyMax}% (\$DUmaxTime), mentre quello + di ieri era del \$Info{DUDailyMaxPrev}%. +
    +
+ +\${h2("Processi attualmente in esecuzione")} +

+ + + + + + + + + +\$jobStr +
Host Tipo Utente Data inizio Comando PID PID Xfer
+

+ +\${h2("Fallimenti che richiedono attenzione")} +

+ + + + + + + + +\$statusStr +
Host Tipo Utente Ultimo tentativo Dettagli Data errore Ultimo errore (diverso da ping)
+EOF + +# -------------------------------- +$Lang{BackupPC__Server_Summary} = "BackupPC: prospetto server"; ++$Lang{BackupPC__Archive} = "BackupPC: Archive"; ++$Lang{BackupPC_Summary} = < +Questo rapporto di stato è stato generato il \$now. +

+ +\${h2("Host con backup buoni")} +

+Ci sono \$hostCntGood host sottoposti a backup per un totale di: +

    +
  • \$fullTot backup completi per una dimensione toatle di \${fullSizeTot}GB + (prima del processo di pooling e compressione), +
  • \$incrTot backup incrementali per una dimensione totale di \${incrSizeTot}GB + (prima del processo di pooling e compressione). +
+ + + + + + + + + + + +\$strGood +
Host Utente Completi Età completi
(giorni)
Dimensione completi
(GB)
Velocità
(MB/s)
Incrementali Età incrementali
(giorni)
Stato Ultimo tentativo
+

+\${h2("Host senza backup")} +

+Ci sono \$hostCntNone host senza alcun backup. +

+ + + + + + + + + + + +\$strNone +
Host Utente Completi Età completi
(giorni)
Dimensione completi
(GB)
Velocità
(MB/s)
Incrementali Età incrementali
(giorni)
Stato Ultimo tentativo
+EOF + +$Lang{BackupPC_Archive} = < + + + +È stato effettuato il backup di \$hostCntGood host per una dimensione +totale di \${fullSizeTot}GB +

+

+ + + + + + + + +\$strGood +\$checkAllHosts +
Host Utente Dimensione
backup
+
+

+ +EOF + +$Lang{BackupPC_Archive2} = < +\$HostListStr + +

+\$hiddenStr + + + + + +\$paramStr + + + + +
+EOF + +$Lang{BackupPC_Archive2_location} = < + Localizzazione archivio/dispositivi + + +EOF + +$Lang{BackupPC_Archive2_compression} = < + Compressione + + nessuna
+ gzip
+ bzip2 + + +EOF + +$Lang{BackupPC_Archive2_parity} = < + Numero di file di parità + + +EOF + +$Lang{BackupPC_Archive2_split} = < + Suddividi output in + Megabyte + +EOF + +# ----------------------------------- +$Lang{Pool_Stat} = <Il pool di \${poolSize}GB comprende \$info->{"\${name}FileCnt"} + file e \$info->{"\${name}DirCnt"} directory (al \$poolTime), +
  • L\'hash del pool dà \$info->{"\${name}FileCntRep"} file + ripetuti con la catena più lunga di \$info->{"\${name}FileRepMax"}, +
  • La pulizia notturna ha rimosso \$info->{"\${name}FileCntRm"} + file per una dimensione di \${poolRmSize}GB (circa il \$poolTime), +EOF + +# -------------------------------- +$Lang{BackupPC__Backup_Requested_on__host} = "BackupPC: richiesta di backup per \$host"; +# -------------------------------- +$Lang{REPLY_FROM_SERVER} = < +La risposta del server ` stata: \$reply +

    +Ritorna alla homepage di \$host. +EOF +# -------------------------------- +$Lang{BackupPC__Start_Backup_Confirm_on__host} = "BackupPC: conferma avvio backup per \$host"; +# -------------------------------- +$Lang{Are_you_sure_start} = < +Si sta per avviare un bakcup \$type per \$host. + +

    + + + +Avviare veramente? + + +
    +EOF +# -------------------------------- +$Lang{BackupPC__Stop_Backup_Confirm_on__host} = "BackupPC: Conferma di arresto backup per \$host"; +# -------------------------------- +$Lang{Are_you_sure_stop} = < +Si sta per arrestare/disaccodare i backup per \$host; + +
    + + +Also, please don\'t start another backup for + hours. +

    +Arrestare veramente? + + +

    + +EOF +# -------------------------------- +$Lang{Only_privileged_users_can_view_queues_} = "Solo gli utenti con privilegi possono visualizzare la coda."; +# -------------------------------- +$Lang{Only_privileged_users_can_archive} = "Solo gli utenti privilegiati possono archiviare."; +# -------------------------------- +$Lang{BackupPC__Queue_Summary} = "BackupPC: Prospetto coda"; +# -------------------------------- +$Lang{Backup_Queue_Summary} = <
    +\${h2("Prospetto code utenti")} +

    +Sono state accodate le seguenti richieste degli utenti: +

    + + + + +\$strUser +
    Host Data richiesta Utente
    +

    + +\${h2("Prospetto code in background")} +

    +Sono attualmente in coda le seguenti richieste di background: + + + + +\$strBg +
    Host Data richiesta Utente
    +

    +\${h2("Prospetto coda comandi")} +

    +Sono attualmente in coda le seguenti richieste di comandi: + + + + + +\$strCmd +
    Host Data richiesta Utente Comando
    +EOF + +# -------------------------------- +$Lang{Backup_PC__Log_File__file} = "BackupPC: file di log \$file"; +$Lang{Log_File__file__comment} = < +EOF +# -------------------------------- +$Lang{Contents_of_log_file} = <\$file modificato il \$mtimeStr \$comment +EOF + +# -------------------------------- +$Lang{skipped__skipped_lines} = "[ saltate \$skipped righe ]\n"; +# -------------------------------- +$Lang{_pre___Can_t_open_log_file__file} = "

    \nImpossibile aprire il file di log \$file\n";
    +
    +# --------------------------------
    +$Lang{BackupPC__Log_File_History} = "BackupPC: cronologia file di log";
    +$Lang{Log_File_History__hdr} = <
    +
    +
    +    
    +    
    +\$str
    +
    File Dimensione Data modifica
    +EOF + +# ------------------------------- +$Lang{Recent_Email_Summary} = < + + + + + +\$str +
    Destinatario Host Data Oggetto
    +EOF + + +# ------------------------------ +$Lang{Browse_backup__num_for__host} = "BackupPC: Sfoglia backup \$num per \$host"; + +# ------------------------------ +$Lang{Restore_Options_for__host} = "BackupPC: Opzioni di ripristino per \$host"; +$Lang{Restore_Options_for__host2} = < +Sono state selezionate i seguenti file/directory dalla condivisione +\$share, backup numero \$num: +
      +\$fileListStr +
    +

    +Sono disponibili tre scelte per il ripristino di questi file/directory. +Selezionare una delle opzioni seguenti. +

    +\${h2("Opzione 1: ripristino diretto")} +

    +EOF + +$Lang{Restore_Options_for__host_Option1} = <

    +Attenzione: ogni file esistente che corrisponde ai file selezionati +sarà sovrascritto! + +

    +
    + + + +\$hiddenStr + + + + + + + + + + + + + +
    Ripristino dei file sull\'host + + + Search for available shares (NOT IMPLEMENTED)
    Ripristino dei file sulla condivisione
    Ripristino dei file al di sotto della directory
    + (relativa alla condivisione)
    +
    +EOF + +$Lang{Restore_Options_for__host_Option1_disabled} = < +È possibile scaricare un archivio zip contenente tutti i +file/directory selezionati. Sarà poi possibile usare un applicativo +locale, come WinZip, per visualizzare o estrarre un file qualsiasi. +

    +Attenzione: a seconda dei file/directory selezionati, l\'archivio +potrebbe essere molto grande. La creazione ed il trasferimento dell\'archivio +potrebbe richiedere diversi minuti e sarà necessario disporre di +abbastanza spazio sul proprio disco rigido locale per poterlo contenere. +

    +
    + + + +\$hiddenStr + + Creare +l\'archivio relativamente a \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} +(altrimenti l\'archivio conterrà percorsi completi). +
    +Compressione (0=off, 1=fast,...,9=best) + +
    + +
    +EOF + +# ------------------------------ + +$Lang{Option_2__Download_Zip_archive2} = < +\${h2("Opzione 2: scaricamento archivio zip")} +

    +Archive::Zip non è installato e non è quindi possibile +scaricare un archivio zip. +Contattare l\'amministratore di sistemaper installare Archive::Zip da +a href="http://www.cpan.org">www.cpan.org. +

    +EOF + + +# ------------------------------ +$Lang{Option_3__Download_Zip_archive} = < +È possibile scaricare un archivio tar contenente tutti i +file/directory selezionati. Sarà poi possibile usare un applicativo +locale, come tar o WinZip, per visualizzare o estrarre un file qualsiasi. +

    +Attenzione: a seconda dei file/directory selezionati, l\'archivio +potrebbe essere molto grande. La creazione ed il trasferimento dell\'archivio +potrebbe richiedere diversi minuti e sarà necessario disporre di +abbastanza spazio sul proprio disco rigido locale per poterlo contenere. +

    +
    + + + +\$hiddenStr + + Creare +l\'archivio relativamente a \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} +(altrimenti l\'archivio conterrà percorsi completi). +
    + +
    +EOF + + +# ------------------------------ +$Lang{Restore_Confirm_on__host} = "BackupPC: Conferma ripristino su \$host"; + +$Lang{Are_you_sure} = < +Si sta per avviare il ripristino diretto sulla macchina \$In{hostDest}. +I file seguenti saranno ripristinati sulla condivisione \$In{shareDest} +dal backup numero \$num: +

    + + +\$fileListStr +
    File/directory originaleRipristinato su
    + +

    + + + + + + +\$hiddenStr +Avviare veramente? + + +
    +EOF + + +# -------------------------- +$Lang{Restore_Requested_on__hostDest} = "BackupPC: ripristino richiesto per \$hostDest"; +$Lang{Reply_from_server_was___reply} = < +La risposta del server ` stata: \$reply +

    +Ritorna alla homepage di \$hostDest. +EOF + +$Lang{BackupPC_Archive_Reply_from_server} = < +La risposta del server è stata: \$reply +EOF + + +# ------------------------- +$Lang{Host__host_Backup_Summary} = "BackupPC: prospetto backup host \$host"; + +$Lang{Host__host_Backup_Summary2} = < +\$warnStr +

      +\$statusStr +
    +\${h2("Azioni utente")} +

    +

    + +\$startIncrStr + + +
    +\${h2("Prospetto backup")} +

    +Cliccare sul numero di bakcup per sfogliare e ripristinare i file di backup. +

    + + + + + + + + + +\$str +
    Numero
    backup
    Tipo Completo Data avvio Durata
    (minuti)
    Età
    (giorni)
    Percorso backup server
    +

    + +\$restoreStr +

    +

    +\${h2("Prospetto errori trasferimento")} +

    + + + + + + + + + +\$errStr +
    Numero
    backup
    Tipo Vedere Numero errori
    trasferimento
    Numero file
    con problemi
    Numero condivisioni
    con problemi
    Numero
    errori tar
    +

    + +\${h2("Prospetto dimensioni file/contatore riutilizzo")} +

    +I file esistenti sono quelli già presenti nel pool; i file nuovi sono +quelli aggiunti al pool. +I file vuoti e gli errori SMB non sono conteggiati nei contatori di +riutilizzo e file nuovi. + + + + + + + + + + + + + + + + + +\$sizeStr +
    Totali File esistenti File nuovi
    Numero
    backup
    Tipo Numero
    file
    Dimensione
    (MB)
    Velocità
    (MB/s)
    Numero
    file
    Dimensione
    (MB)
    Numero
    file
    Dimensione
    (MB)
    +

    + +\${h2("Prospetto compressione")} +

    +Prestazione della compressione per file già nel pool e per quelli +nuovi. +

    + + + + + + + + + + + + + + + +\$compStr +
    File esistenti File nuovi
    Numero
    backup
    Tipo Livello
    compressione
    Dimensione
    (MB)
    Compresso
    (MB)
    Tasso
    compressione
    Dimensione
    (MB)
    Compresso
    (MB)
    Tasso
    compressione
    +

    +EOF + +$Lang{Host__host_Archive_Summary} = "BackupPC: prospetto archivi host \$host"; +$Lang{Host__host_Archive_Summary2} = < +\$warnStr +
      +\$statusStr +
    + +\${h2("Azioni utente")} +

    +

    + + + + +
    + +\$ArchiveStr + +EOF + +# ------------------------- +$Lang{Error} = "BackupPC: Errore"; +$Lang{Error____head} = <\$mesg

    +EOF + +# ------------------------- +$Lang{NavSectionTitle_} = "Server"; + +# ------------------------- +$Lang{Backup_browse_for__host} = < + + + +
    + + + + +
      +
    • Si sta sfogliando il backup numero \$num effettuato il \$backupTime + (\$backupAge giorni fa), +\$filledBackup +
    • Entra directory: +
    • Fare clic su una directory per aprirla +
    • Fare clic su un file per ripristinarlo +
    • È possibile visualizzare la cronologia dei backup della directory corrente +
    +
    + +\${h2("Contents of \${EscHTML(\$dirDisplay)}")} +
    + + + + + +
    + +
    + +
    + \$dirStr +
    +
    + +
    + +
    + \$fileHeader + \$topCheckAll + \$fileStr + \$checkAll +
    +
    +
    + + +
    +EOF + +# ------------------------------ +$Lang{DirHistory_backup_for__host} = "BackupPC: Cronologia backup directory per \$host"; + +# +# These two strings are used to build the links for directories and +# file versions. Files are appended with a version number. +# +$Lang{DirHistory_dirLink} = "dir"; +$Lang{DirHistory_fileLink} = "v"; + +$Lang{DirHistory_for__host} = < +Questa videata mostra tutte le versioni uniche disponibili nei diversi backup: +
      +
    • Fare clic su un numero di backup per ritornare al navigatore di backup +
    • Fare clic sul collegamento ad una directory + (\$Lang->{DirHistory_dirLink}) per navigare nella directory stessa +
    • Fare clic sul collegamento ad un file (\$Lang->{DirHistory_fileLink}0, + \$Lang->{DirHistory_fileLink}1, ...) per scaricare quel file +
    • I file con lo stesso contenuto fra backup diversi hanno lo stesso + numero di versione +
    • I file o directory non disponibili in uno specifico backup presentano + una casella vuota +
    • I file visualizzati con la stessa versione possono avere attributi + diversi. Selezionare il numero di backup per visualizzare gli + attributi del file. +
    + +\${h2("Cronologia di \${EscHTML(\$dirDisplay)}")} + +
    + +\$backupNumStr +\$backupTimeStr +\$fileStr +
    Numero backup
    Data backup
    +EOF + +# ------------------------------ +$Lang{Restore___num_details_for__host} = "BackupPC: dettagli ripristino numero \$num per \$host"; + +$Lang{Restore___num_details_for__host2 } = < + + + + + + + + + + + + + + + + + + + +
    Numero \$Restores[\$i]{num}
    Richiesto da \$RestoreReq{user}
    Data richiesta \$reqTime
    Risultato \$Restores[\$i]{result}
    Messaggio d\'errore \$Restores[\$i]{errorMsg}
    Host sorgente \$RestoreReq{hostSrc}
    Numero backup
    sorgente
    \$RestoreReq{num}
    Condivisione
    sorgente
    \$RestoreReq{shareSrc}
    Host destinazione \$RestoreReq{hostDest}
    Condivisione
    destinazione
    \$RestoreReq{shareDest}
    Data avvio \$startTime
    Durata \$duration min
    Numero file \$Restores[\$i]{nFiles}
    Dimensione totale \${MB}MB
    Tasso
    trasferimento
    \$MBperSecMB/s
    Errori
    creazione tar
    \$Restores[\$i]{tarCreateErrs}
    Errori
    trasferimento
    \$Restores[\$i]{xferErrs}
    File log
    trasferimento
    +Vedi, +Errori +
    +

    +\${h1("Elenco file/directory")} +

    + + +\$fileListStr +
    File/directory originaliRipristinato su
    +EOF + +# ------------------------------ +$Lang{Archive___num_details_for__host} = "BackupPC: Dettagli archivio n. \$num per \$host"; + +$Lang{Archive___num_details_for__host2 } = < + + + + + + + + + +
    Number \$Archives[\$i]{num}
    Requested by \$ArchiveReq{user}
    Request time \$reqTime
    Result \$Archives[\$i]{result}
    Error Message \$Archives[\$i]{errorMsg}
    Start time \$startTime
    Duration \$duration\'
    Xfer log file +Visualizza, +Errori +
    +

    +\${h1("Elenco host")} +

    + + +\$HostListStr +
    HostNumero backup
    +EOF + +# ----------------------------------- +$Lang{Email_Summary} = "BackupPC: Prospetto email"; + +# ----------------------------------- +# !! ERROR messages !! +# ----------------------------------- +$Lang{BackupPC__Lib__new_failed__check_apache_error_log} = "BackupPC::Lib->new fallita: controllare il file error_log di Apache\n"; +$Lang{Wrong_user__my_userid_is___} = + "Utente errato: il mio ID utente è \$> invece di \$uid" + . "(\$Conf{BackupPCUser})\n"; +# $Lang{Only_privileged_users_can_view_PC_summaries} = "Solo gli utenti privilegiati possono visualizzare i prospetti dei PC."; +$Lang{Only_privileged_users_can_stop_or_start_backups} = + "Solo gli utenti privilegiati possono arrestare o avviare un backup su" + . " \${EscHTML(\$host)}."; +$Lang{Invalid_number__num} = "Numero non valido: \$num"; +$Lang{Unable_to_open__file__configuration_problem} = "Impossibile aprire il file \$file: problema di configurazione?"; +$Lang{Only_privileged_users_can_view_log_or_config_files} = "Solo gli utenti privilegiati possono visualizzare i file di log o di configurazione."; +$Lang{Only_privileged_users_can_view_log_files} = "Solo gli utenti privilegiati possono visualizzare i file di log."; +$Lang{Only_privileged_users_can_view_email_summaries} = "Solo gli utenti privilegiati possono visualizzare il prospetto delle email."; +$Lang{Only_privileged_users_can_browse_backup_files} = "Solo gli utenti privilegiati possono sfogliare i file di backup" + . " per l\'host \${EscHTML(\$In{host})}."; +$Lang{Empty_host_name} = "Nome host vuoto."; +$Lang{Directory___EscHTML} = "La directory \${EscHTML(\"\$TopDir/pc/\$host/\$num\")}" + . " è vuota"; +$Lang{Can_t_browse_bad_directory_name2} = "Impossibile sfogliare la director. Nome non valido:" + . " \${EscHTML(\$relDir)}"; +$Lang{Only_privileged_users_can_restore_backup_files} = "Solo gli utenti privilegiati possono ripristinare dei file di backup" + . " per l\'host \${EscHTML(\$In{host})}."; +$Lang{Bad_host_name} = "Nome host non valido \${EscHTML(\$host)}"; +$Lang{You_haven_t_selected_any_files__please_go_Back_to} = "Non è stato selezionato alcun file. Andare indietro per" + . " per selezionare un file."; +$Lang{You_haven_t_selected_any_hosts} = "Non è stato selezionato alcun host. Andare indietro" + . " per selezionarne uno."; +$Lang{Nice_try__but_you_can_t_put} = "Bella mossa, man non è possibile mettere \'..\' in nessun nome di file"; +$Lang{Host__doesn_t_exist} = "L\'host \${EscHTML(\$In{hostDest})} non esiste"; +$Lang{You_don_t_have_permission_to_restore_onto_host} = "Non si possiedono i permessi per ripristinare sull\'host" + . " \${EscHTML(\$In{hostDest})}"; +$Lang{Can_t_open_create} = "Impossibile creare/aprire " + . "\${EscHTML(\"\$TopDir/pc/\$hostDest/\$reqFileName\")}"; +$Lang{Only_privileged_users_can_restore_backup_files2} = "Solo gli utenti privilegiati possono ripristinare i file" + . " per l\'host \${EscHTML(\$host)}."; +$Lang{Empty_host_name} = "Nome host vuoto"; +$Lang{Unknown_host_or_user} = "Host o utente sconosciuti \${EscHTML(\$host)}"; +$Lang{Only_privileged_users_can_view_information_about} = "Solo gli utenti privilegiati possono visualizzare le informazioni" + . " sull\'host \${EscHTML(\$host)}." ; +$Lang{Only_privileged_users_can_view_archive_information} = "Solo gli utenti privilegiati possono visualizzare le informazioni sugli archivi."; +$Lang{Only_privileged_users_can_view_restore_information} = "Solo gli utenti privilegiati possono visualizzare le informazioni di ripristino."; +$Lang{Restore_number__num_for_host__does_not_exist} = "Il numero di ripristino \$num per l\'host \${EscHTML(\$host)}" + . " non esiste."; +$Lang{Archive_number__num_for_host__does_not_exist} = "L'archivio numero \$num per l'host \${EscHTML(\$host)}" + . " non esiste."; +$Lang{Can_t_find_IP_address_for} = "Impossibile trovare l\'indirizzo IP per \${EscHTML(\$host)}"; +$Lang{host_is_a_DHCP_host} = < +Finché non vedo \$host ad un indirizzo DHCP preciso, sarà +possibile avviare questa richiesta solo da quello stesso client. +EOF + +######################## +# ok you can do it then +######################## + +$Lang{Backup_requested_on_DHCP__host} = "Richiesta di backup su DHCP \$host (\$In{hostIP}) da parte di" + . " \$User da \$ENV{REMOTE_ADDR}"; + +$Lang{Backup_requested_on__host_by__User} = "Richiesta di backup per \$host da \$User"; +$Lang{Backup_stopped_dequeued_on__host_by__User} = "Backup arrestato/disaccodato per \$host da \$User"; + +$Lang{Restore_requested_to_host__hostDest__backup___num} = "Richiesta di ripristino per l\'host \$hostDest, backup numero \$num," + . " da parte di \$User da \$ENV{REMOTE_ADDR}"; +$Lang{Archive_requested} = "Archivio richiesto da parte di \$User da \$ENV{REMOTE_ADDR}"; + +# ------------------------------------------------- +# ------- Stuff that was forgotten ---------------- +# ------------------------------------------------- + +$Lang{Status} = "Stato"; +$Lang{PC_Summary} = "Prospetto PC"; +$Lang{LOG_file} = "File log"; +$Lang{LOG_files} = "File log"; +$Lang{Old_LOGs} = "Vecchi log"; +$Lang{Email_summary} = "Prospetto email"; +$Lang{Config_file} = "File configurazione"; +$Lang{Hosts_file} = "File host"; +$Lang{Current_queues} = "Code correnti"; +$Lang{Documentation} = "Documentazione"; + +#$Lang{Host_or_User_name} = "Host o nome utente:"; +$Lang{Go} = "Vai"; +$Lang{Hosts} = "Host"; + +$Lang{There_have_been_no_archives} = "

    Non ci sono state archiviazioni

    \n"; +$Lang{This_PC_has_never_been_backed_up} = "

    Non è mai stato eseguito un backup per questo PC!!!

    \n"; +$Lang{This_PC_is_used_by} = "
  • Questo PC è usato da \${UserLink(\$user)}"; + +$Lang{Extracting_only_Errors} = "(Estrazione dei soli errori)"; +$Lang{XferLOG} = "TransLOG"; +$Lang{Errors} = "Errori"; + +# ------------ +$Lang{Last_email_sent_to__was_at___subject} = <L\'ultima email inviata a \${UserLink(\$user)} è stata spedita il \$mailTime con oggetto "\$subj". +EOF +# ------------ +$Lang{The_command_cmd_is_currently_running_for_started} = <Il comando \$cmd, avviato il \$startTime, è attualmente in esecuzione per \$host. +EOF + +# ----------- +$Lang{Host_host_is_queued_on_the_background_queue_will_be_backed_up_soon} = <L\'host \$host è accodato nella coda di background (il backup comincerà a breve). +EOF + +# ---------- +$Lang{Host_host_is_queued_on_the_user_queue__will_be_backed_up_soon} = <L\'host \$host è accodato nella coda utente (il backup comincerà a breve). +EOF + +# --------- +$Lang{A_command_for_host_is_on_the_command_queue_will_run_soon} = <È già presente un comando per \$host nella coda dei comandi (sarà eseguito a breve). +EOF + +# -------- +$Lang{Last_status_is_state_StatusHost_state_reason_as_of_startTime} = <L\'ultimo stato è \"\$Lang->{\$StatusHost{state}}\"\$reason del \$startTime. +EOF + +# -------- +$Lang{Last_error_is____EscHTML_StatusHost_error} = <L\'ultimo errore è \"\${EscHTML(\$StatusHost{error})}\". +EOF + +# ------ +$Lang{Pings_to_host_have_failed_StatusHost_deadCnt__consecutive_times} = <I ping verso \$host sono falliti per \$StatusHost{deadCnt} volte consecutive. +EOF + +# ----- +$Lang{Prior_to_that__pings} = "Prima di questo, i ping"; + +# ----- +$Lang{priorStr_to_host_have_succeeded_StatusHostaliveCnt_consecutive_times} = <\$priorStr verso \$host hanno avuto successo per \$StatusHost{aliveCnt} + volte consecutive. +EOF + +$Lang{Because__host_has_been_on_the_network_at_least__Conf_BlackoutGoodCnt_consecutive_times___} = <Poiché \$host è rimasto in rete per almeno \$Conf{BlackoutGoodCnt} +volte consecutive, il backup non sarà effettuato dalle \$t0 alle \$t1 di \$days. +EOF + +$Lang{Backups_are_deferred_for_hours_hours_change_this_number} = <I backup sono stati posticipati per \$hours ore +({Stop_Dequeue_Archive})}&host=\$host\">modifica questo numero). +EOF + +$Lang{tryIP} = " e \$StatusHost{dhcpHostIP}"; + +#$Lang{Host_Inhost} = "Host \$In{host}"; + +$Lang{checkAll} = < + Seleziona tutto + + + +EOF + +$Lang{checkAllHosts} = < + Seleziona tutto + + + +EOF + +$Lang{fileHeader} = < Nome + Tipo + Modo + Numero + Dimensione + Data modifica + +EOF + +$Lang{Home} = "Casa"; +$Lang{Browse} = "Naviga backup"; +$Lang{Last_bad_XferLOG} = "Ultimo TransLOG fallito"; +$Lang{Last_bad_XferLOG_errors_only} = "Ultimo TransLOG fallito (solo errori)"; + +$Lang{This_display_is_merged_with_backup} = < Questa visualizzazione è fusa con il backup numero \$numF. +EOF + +$Lang{Visit_this_directory_in_backup} = < Selezionare il backup che si desidera visualizzare: +EOF + +$Lang{Restore_Summary} = < +Fare clic sul numero del ripristino per maggiori dettagli. + + + + + + + + + + +\$restoreStr +
    Numero
    ripristino
    Risultato Data avvio Durata
    (minuti)
    Numero
    file
    Dimensione
    (MB)
    Numero
    errori tar
    Numero errori
    trasferimento
    +

    +EOF + +$Lang{Archive_Summary} = < +Fare clic sul numero di archivio per maggiori dettagli. + + + + + + +\$ArchiveStr +
    Numero
    archivio
    Risultato Data
    avvio
    Durata
    minuti
    +

    +EOF + +$Lang{BackupPC__Documentation} = "BackupPC: Documentazione"; + +$Lang{No} = "no"; +$Lang{Yes} = "sì"; + +$Lang{The_directory_is_empty} = <La directory \${EscHTML(\$dirDisplay)} è vuota + +EOF + +#$Lang{on} = "acceso"; +$Lang{off} = "spento"; + +$Lang{backupType_full} = "comp."; +$Lang{backupType_incr} = "incr."; +$Lang{backupType_partial} = "parziale"; + +$Lang{failed} = "fallito"; +$Lang{success} = "eseguito"; +$Lang{and} = "e"; + +# ------ +# Hosts states and reasons +$Lang{Status_idle} = "inattivo"; +$Lang{Status_backup_starting} = "avvio backup"; +$Lang{Status_backup_in_progress} = "backup in esecuzione"; +$Lang{Status_restore_starting} = "avvio ripristino"; +$Lang{Status_restore_in_progress} = "restore in esecuzione"; +$Lang{Status_link_pending} = "collegamenti pendenti"; +$Lang{Status_link_running} = "collegamenti in esecuzione"; + +$Lang{Reason_backup_done} = "backup eseguito"; +$Lang{Reason_restore_done} = "restore eseguito"; +$Lang{Reason_nothing_to_do} = "nulla da fare"; +$Lang{Reason_backup_failed} = "backup fallito"; +$Lang{Reason_restore_failed} = "restore fallito"; +$Lang{Reason_archive_failed} = "archivio fallito"; +$Lang{Reason_no_ping} = "no ping"; +$Lang{Reason_backup_canceled_by_user} = "backup annullato dall\'utente"; +$Lang{Reason_restore_canceled_by_user} = "ripristino annullato dall\'utente"; +$Lang{Reason_archive_canceled_by_user} = "archivio annullato dall\'utente"; + +# --------- +# Email messages + +# No backup ever +$Lang{EMailNoBackupEverSubj} = "BackupPC: nessun backup riuscito per \$host"; +$Lang{EMailNoBackupEverMesg} = <<'EOF'; +To: $user$domain +Subject: $subj + +Ciao $userName, + +Il nostro software di backup non e` ancora riuscito ad effettuare un +backup del tuo PC ($host). I backup dei PC dovrebbero essere eseguiti +automaticamente quando il tuo PC e` connesso alla rete. E` necessario +richiedere il supporto tecnico nel caso in cui: + + - il tuo PC sia stato connesso regolarmente alla rete, nel qual caso + potrebbe sussistere un problema di configurazione o impostazione + che impedisce l'esecuzione del backup; + + - non si desideri che sia eseguito il backup del proprio PC e che + questo messaggio non sia piu` inviato. + +In caso contrario, assicurati che il tuo PC sia connesso alla rete la +prossima volta che sei in ufficio. + +Ciao. + +BackupPC Genie +http://backuppc.sourceforge.net/ +EOF + +# No recent backup +$Lang{EMailNoBackupRecentSubj} = "BackupPC: non ci sono backup recenti per \$host"; +$Lang{EMailNoBackupRecentMesg} = <<'EOF'; +To: $user$domain +Subject: $subj + +Ciao $userName, + +e` stato effettuato correttamente il backup del tuo PC ($host) per +$days giorni. Dal $firstTime fino a $days fa sono stati eseguiti con +successo $numBackups backup. I backup dei PC dovrebbero avvenire +automaticamente quando il tuo PC e` connesso alla rete. + +Se il tuo PC e` rimasto connesso alla rete solo per qualche ora durante +gli ultimi $days giorni, dovresti contattare l'amministratore di sistema +per capire perche' i backup non sono stati effettuati. + +In caso contrario, se sei fuori ufficio, non c'e` molto che tu possa +fare, se non copiare manualmente i file particolarmente critici su un +altro dispositivo. Tieni presente che qualsiasi file creato o modificato +negli ultimi $days giorni (compresi i nuovi messaggi di posta elettronica +e gli allegati) non possono essere ripristinato se il tuo PC si guasta. + +Ciao. + +BackupPC Genie +http://backuppc.sourceforge.net +EOF + +# Old Outlook files +$Lang{EMailOutlookBackupSubj} = "BackupPC: i file di Outlook su \$host richiedono un backup"; +$Lang{EMailOutlookBackupMesg} = <<'EOF'; +To: $user$domain +Subject: $subj + +Ciao $userName, + +Il backup dei file di Outlook presenti sul tuo PC $howLong. + +Questi file contengono tutti i tuoi messaggi di posta elettronica, gli +allegati, i contatti e gli appuntamenti. Il backup del tuo PC e` stato +effettuato correttamente $numBackups volte, a partire dal $firstTime fino +a $lastTime giorni fa. Outlook, pero`, blocca tutti i suoi file quando +e` in esecuzione, impedendo di fatto il backup dei suoi file. + +Ti consiglio di effettuare il backup dei file di Outlook quando sei +collegato alla rete. E` sufficiente uscire da Outlook e da tutte le altre +applicazioni e, semplicemente usando il tuo programma di navigazione, +andare alla seguente pagina: + + $CgiURL?host=$host + +Seleziona "Avvia backup incrementale" due volte per avviare un nuovo +backup incrementale. E` possibile selezionare "Ritorna alla pagina di +$host" e quindi cliccare su "ricarica" per controllare lo stato del backup. +Il backup dovrebbe essere pronto entro pochi minuti. + +Ciao. + +BackupPC Genie +http://backuppc.sourceforge.net +EOF + +$Lang{howLong_not_been_backed_up} = "non e` riuscito"; +$Lang{howLong_not_been_backed_up_for_days_days} = "risale a \$days giorni fa"; diff --git a/lib/BackupPC/RsyncDigest.pm b/lib/BackupPC/RsyncDigest.pm index e6a2407..3dd0896 100644 --- a/lib/BackupPC/RsyncDigest.pm +++ b/lib/BackupPC/RsyncDigest.pm @@ -165,7 +165,9 @@ sub digestStart # close($fh); $fio->digestAdd($fileName, - $blockSize || $fio->blockSize($fileSize, $defBlkSize), + $blockSize + || BackupPC::RsyncDigest->blockSize($fileSize, + $defBlkSize), $checksumSeed); # # now re-open the file and re-read the first byte diff --git a/lib/BackupPC/Xfer/Rsync.pm b/lib/BackupPC/Xfer/Rsync.pm index d033798..e8b605a 100644 --- a/lib/BackupPC/Xfer/Rsync.pm +++ b/lib/BackupPC/Xfer/Rsync.pm @@ -222,7 +222,12 @@ sub start } } if ( $t->{type} eq "full" ) { - $logMsg = "full backup started for directory $t->{shareName}"; + if ( $t->{partialNum} ) { + $logMsg = "full backup started for directory $t->{shareName};" + . " updating partial $t->{partialNum}"; + } else { + $logMsg = "full backup started for directory $t->{shareName}"; + } } else { $incrDate = $bpc->timeStamp($t->{lastFull} - 3600, 1); $logMsg = "incr backup started back to $incrDate for directory" @@ -281,6 +286,7 @@ sub start rsyncCmdType => "full", rsyncArgs => $rsyncArgs, timeout => $conf->{ClientTimeout}, + doPartial => defined($t->{partialNum}) ? 1 : undef, logHandler => sub { my($str) = @_; $str .= "\n"; diff --git a/lib/BackupPC/Xfer/RsyncFileIO.pm b/lib/BackupPC/Xfer/RsyncFileIO.pm index 2fa3d27..db43a5d 100644 --- a/lib/BackupPC/Xfer/RsyncFileIO.pm +++ b/lib/BackupPC/Xfer/RsyncFileIO.pm @@ -191,6 +191,10 @@ sub checksumSeed my($fio, $checksumSeed) = @_; $fio->{checksumSeed} = $checksumSeed; + $fio->log("Checksum caching enabled (checksumSeed = $checksumSeed)") + if ( $fio->{logLevel} >= 1 && $checksumSeed == 32761 ); + $fio->log("Checksum seed is $checksumSeed") + if ( $fio->{logLevel} >= 2 && $checksumSeed != 32761 ); } sub dirs @@ -639,6 +643,10 @@ sub attrSkippedFile $fio->{rxLocalAttr} = $attr; $fio->{rxFile} = $f; $fio->{rxSize} = $attr->{size}; + delete($fio->{rxInFd}); + delete($fio->{rxOutFd}); + delete($fio->{rxDigest}); + delete($fio->{rxInData}); return $fio->fileDeltaRxDone(); } diff --git a/makeDist b/makeDist index e31e844..7492a03 100755 --- a/makeDist +++ b/makeDist @@ -91,6 +91,7 @@ my @PerlSrc = qw( lib/BackupPC/Lang/en.pm lib/BackupPC/Lang/es.pm lib/BackupPC/Lang/fr.pm + lib/BackupPC/Lang/it.pm lib/BackupPC/Xfer/Archive.pm lib/BackupPC/Xfer/Smb.pm lib/BackupPC/Xfer/Tar.pm @@ -113,10 +114,23 @@ my $ConfVars = {}; my $errCnt; $errCnt += CheckConfigParams("conf/config.pl", $ConfVars, 0); + +# +# These config parameters are not used in the code, so ignore them. +# $ConfVars->{BackupPCUser} = 2; -$ConfVars->{CgiDir} = 2; -$ConfVars->{InstallDir} = 2; -$ConfVars->{CgiImageDir} = 2; +$ConfVars->{CgiDir} = 2; +$ConfVars->{InstallDir} = 2; +$ConfVars->{CgiImageDir} = 2; + +# +# These config parameters are used in the code to be backward compatible, +# but are not present in the current config file, so ignore them. +# +$ConfVars->{BlackoutHourBegin} = 2; +$ConfVars->{BlackoutHourEnd} = 2; +$ConfVars->{BlackoutWeekDays} = 2; + foreach my $file ( @PerlSrc ) { $errCnt += CheckConfigParams($file, $ConfVars, 1); } @@ -404,7 +418,7 @@ sub CheckLangTags my($en, $enVars) = LangParse("lib/BackupPC/Lang/en.pm"); my($errors); - foreach my $lang ( qw(fr.pm de.pm es.pm) ) { + foreach my $lang ( qw(fr.pm de.pm es.pm it.pm) ) { my($d, $dVars) = LangParse("lib/BackupPC/Lang/$lang"); foreach my $v1 ( @$en ) { my $v2 = shift(@$d);