From 7dee89bfce659051d486cc66515bb7f22bbc4f09 Mon Sep 17 00:00:00 2001 From: cbarratt Date: Thu, 8 May 2003 06:11:56 +0000 Subject: [PATCH] * Added German translation, provided by Manfred Herrmann. * Fixed large-file problem with rsync, reported by Manfred Herrmann. * Fixed zip and tar file download from CGI under mod_perl. Reported by Pierre Bourgin and Paul Lukins. * Fixed directory browsing and top-level directory browsing in 2.0.0beta0. Reported by several users. * Added suse-linux init.d script from Leon Letto. * Added Gentoo linux init.d script from Tim Demarest. * Applied additional i18n strings from GFK and the translation team. * Fixed option parsing so that getopts errors are reported and we exit. * Changed reporting of Xfer PIDs so that rsync cancel works correctly. * Added -v option to BackupPC_dump for verbose output (useful when you run the command manually). Added messages for all exits. * If nmblookup returns multiple IP addresses, NetBiosHostIPFind() now returns the first IP address that matches the subnet mask. Suggested by Tim Demarest. * Fixed BackupPC::View so the top-level directory is handled correctly. This allows the top-level share/directory to be restored via the CGI interface. Reported by several users. * Fixed RsyncFileIO failures on certain large files by replacing seek() with sysseek(). Reported by Manfred Herrmann. * Added configurable highlighting of PC status in the CGI summary screen; submitted by Tim Demarest. * Fixed command queue CGI display; submitted by Tim Demarest. --- ChangeLog | 45 +- README | 3 + bin/BackupPC | 41 +- bin/BackupPC_compressPool | 2 +- bin/BackupPC_dump | 109 +- bin/BackupPC_link | 2 +- bin/BackupPC_nightly | 2 +- bin/BackupPC_restore | 67 +- bin/BackupPC_sendEmail | 5 +- bin/BackupPC_serverMesg | 2 +- bin/BackupPC_tarCreate | 9 +- bin/BackupPC_tarExtract | 2 +- bin/BackupPC_trashClean | 2 +- bin/BackupPC_zcat | 2 +- bin/BackupPC_zipCreate | 5 +- cgi-bin/BackupPC_Admin | 106 +- conf/config.pl | 23 +- configure.pl | 4 +- doc-src/BackupPC.pod | 173 ++- init.d/README | 37 +- init.d/src/gentoo-backuppc | 45 + init.d/src/gentoo-backuppc.conf | 6 + init.d/src/suse-backuppc | 54 + lib/BackupPC/Attrib.pm | 2 +- lib/BackupPC/FileZIO.pm | 11 +- lib/BackupPC/Lang/de.pm | 1013 +++++++++++++++ lib/BackupPC/Lang/en.pm | 8 +- lib/BackupPC/Lang/es.pm | 2016 +++++++++++++++--------------- lib/BackupPC/Lang/fr.pm | 8 +- lib/BackupPC/Lib.pm | 121 +- lib/BackupPC/PoolWrite.pm | 2 +- lib/BackupPC/View.pm | 28 +- lib/BackupPC/Xfer/Rsync.pm | 14 +- lib/BackupPC/Xfer/RsyncFileIO.pm | 42 +- lib/BackupPC/Xfer/Smb.pm | 4 +- lib/BackupPC/Xfer/Tar.pm | 4 +- lib/BackupPC/Zip/FileMember.pm | 2 +- makeDist | 10 +- 38 files changed, 2770 insertions(+), 1261 deletions(-) create mode 100755 init.d/src/gentoo-backuppc create mode 100644 init.d/src/gentoo-backuppc.conf create mode 100755 init.d/src/suse-backuppc create mode 100644 lib/BackupPC/Lang/de.pm diff --git a/ChangeLog b/ChangeLog index 152b607..7f5534a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,49 @@ # Version __VERSION__, __RELEASEDATE__ #------------------------------------------------------------------------ +* Added German translation, provided by Manfred Herrmann. + +* Fixed large-file problem with rsync, reported by Manfred Herrmann. + +* Fixed zip and tar file download from CGI under mod_perl. Reported + by Pierre Bourgin and Paul Lukins. + +* Fixed directory browsing and top-level directory browsing in 2.0.0beta0. + Reported by several users. + +* Added suse-linux init.d script from Leon Letto. + +* Added Gentoo linux init.d script from Tim Demarest. + +* Applied additional i18n strings from GFK and the translation team. + +* Fixed option parsing so that getopts errors are reported and we exit. + +* Changed reporting of Xfer PIDs so that rsync cancel works correctly. + +* Added -v option to BackupPC_dump for verbose output (useful when + you run the command manually). Added messages for all exits. + +* If nmblookup returns multiple IP addresses, NetBiosHostIPFind() + now returns the first IP address that matches the subnet mask. + Suggested by Tim Demarest. + +* Fixed BackupPC::View so the top-level directory is handled correctly. + This allows the top-level share/directory to be restored via the + CGI interface. Reported by several users. + +* Fixed RsyncFileIO failures on certain large files by replacing seek() + with sysseek(). Reported by Manfred Herrmann. + +* Added configurable highlighting of PC status in the CGI summary + screen; submitted by Tim Demarest. + +* Fixed command queue CGI display; submitted by Tim Demarest. + +#------------------------------------------------------------------------ +# Version 2.0.0beta1, 30 Mar 2003 +#------------------------------------------------------------------------ + * Support for rsync and rsyncd backup and restore. Changes to BackupPC_dump, BackupPC_restore, and new modules BackupPC::Xfer::Rsync and BackupPC::Xfer::RsyncFileIO. @@ -30,7 +73,7 @@ now supports English and French, and adding more languages is now easy. New config paramater $Conf{Language} sets the language. -* Added Spanish translation es.pm from Javier. +* Added Spanish translation es.pm from Javieri Gonzalez. * Added optional user-defined pre/post dump/restore commands, allowing things like database shutdown/startup for dumps. diff --git a/README b/README index ca2bfd4..be5bf1e 100644 --- a/README +++ b/README @@ -23,6 +23,9 @@ nmblookup from the Samba distribution. Version >= 2.2.0 of Samba is recommended (smbclient's tar feature in 2.0.7 has bugs for certain path lengths). See www.samba.org for source and binaries. +If you use rsync you will need File::RsyncP on SourceForge or www.cpan.org, +plus rsync 2.5.6 on the client machines. + To install BackupPC run these commands as root: tar zxf BackupPC-__VERSION__.tar.gz diff --git a/bin/BackupPC b/bin/BackupPC index d61aa56..d18bcef 100755 --- a/bin/BackupPC +++ b/bin/BackupPC @@ -47,7 +47,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -70,8 +70,7 @@ use Digest::MD5; # Handle command line options ########################################################################### my %opts; -getopts("d", \%opts); -if ( @ARGV != 0 ) { +if ( !getopts("d", \%opts) || @ARGV != 0 ) { print("usage: $0 [-d]\n"); exit(1); } @@ -797,16 +796,11 @@ sub Main_Check_Job_Messages } else { print(LOG $bpc->timeStamp, "dhcp $host: $mesg\n"); } - } elsif ( $mesg =~ /^started (.*) dump, pid=(-?\d+), tarPid=(-?\d+), share=(.*)/ ) { + } elsif ( $mesg =~ /^started (.*) dump, share=(.*)/ ) { $Jobs{$host}{type} = $1; - $Jobs{$host}{xferPid} = $2; - $Jobs{$host}{tarPid} = $3; - $Jobs{$host}{shareName} = $4; + $Jobs{$host}{shareName} = $2; print(LOG $bpc->timeStamp, - "Started $1 backup on $host" - . " (pid=$Jobs{$host}{pid}, xferPid=$2", - $Jobs{$host}{tarPid} > 0 - ? ", tarPid=$Jobs{$host}{tarPid}" : "", + "Started $1 backup on $host (pid=$Jobs{$host}{pid}", $Jobs{$host}{dhcpHostIP} ? ", dhcp=$Jobs{$host}{dhcpHostIP}" : "", ", share=$Jobs{$host}{shareName})\n"); @@ -818,16 +812,13 @@ sub Main_Check_Job_Messages $Status{$host}{aliveCnt}++; $Status{$host}{dhcpCheckCnt}-- if ( $Status{$host}{dhcpCheckCnt} > 0 ); - } elsif ( $mesg =~ /^started_restore (\S+) (\S+)/ ) { - $Jobs{$host}{type} = "restore"; + } elsif ( $mesg =~ /^xferPids (.*)/ ) { $Jobs{$host}{xferPid} = $1; - $Jobs{$host}{tarPid} = $2; + } elsif ( $mesg =~ /^started_restore/ ) { + $Jobs{$host}{type} = "restore"; print(LOG $bpc->timeStamp, "Started restore on $host" - . " (pid=$Jobs{$host}{pid}, xferPid=$2", - $Jobs{$host}{tarPid} > 0 - ? ", tarPid=$Jobs{$host}{tarPid}" : "", - ")\n"); + . " (pid=$Jobs{$host}{pid})\n"); $Status{$host}{state} = "Status_restore_in_progress"; $Status{$host}{reason} = ""; $Status{$host}{type} = "restore"; @@ -1022,11 +1013,17 @@ sub Main_Check_Client_Messages "Stopping current backup of $host," . " request by $user (backoff=$backoff)\n"); kill(2, $Jobs{$host}{pid}); - vec($FDread, $Jobs{$host}{fn}, 1) = 0; - close($Jobs{$host}{fh}); - delete($Jobs{$host}); + # + # Don't close the pipe now; wait until the child + # really exits later. Otherwise close() will + # block until the child has exited. + # old code: + ##vec($FDread, $Jobs{$host}{fn}, 1) = 0; + ##close($Jobs{$host}{fh}); + ##delete($Jobs{$host}); + $Status{$host}{state} = "Status_idle"; - $Status{$host}{reason} = "Reason_backup_canceled_by_user"; #FIXME: user should be $user (we need to substitute the variable in the l10n stuff) + $Status{$host}{reason} = "Reason_backup_canceled_by_user"; $Status{$host}{activeJob} = 0; $Status{$host}{startTime} = time; $reply = "ok: backup of $host cancelled"; diff --git a/bin/BackupPC_compressPool b/bin/BackupPC_compressPool index 397c64d..1eedad3 100755 --- a/bin/BackupPC_compressPool +++ b/bin/BackupPC_compressPool @@ -49,7 +49,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_dump b/bin/BackupPC_dump index 3160bc9..e6d75f3 100755 --- a/bin/BackupPC_dump +++ b/bin/BackupPC_dump @@ -5,7 +5,7 @@ # # DESCRIPTION # -# Usage: BackupPC_dump [-i] [-f] [-d] [-e] +# Usage: BackupPC_dump [-i] [-f] [-d] [-e] [-v] # # Flags: # @@ -24,6 +24,8 @@ # dhcp hosts that are no longer on the network will not expire # old backups. # +# -v verbose. for manual usage: prints failure reasons in more detail. +# # BackupPC_dump is run periodically by BackupPC to backup $client. # The file $TopDir/pc/$client/backups is read to decide whether a # full or incremental backup needs to be run. If no backup is @@ -68,7 +70,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -98,9 +100,8 @@ my $Hosts; $bpc->ChildInit(); my %opts; -getopts("defi", \%opts); -if ( @ARGV != 1 ) { - print("usage: $0 [-d] [-e] [-f] [-i] \n"); +if ( !getopts("defiv", \%opts) || @ARGV != 1 ) { + print("usage: $0 [-d] [-e] [-f] [-i] [-v] \n"); exit(1); } if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) { @@ -113,6 +114,8 @@ my $host; # this is the real host name my($clientURI, $user); +$bpc->verbose(1) if ( $opts{v} ); + if ( $opts{d} ) { # # The client name $client is simply a DHCP address. We need to check @@ -120,19 +123,35 @@ if ( $opts{d} ) { # host name via NetBios using nmblookup. # $hostIP = $client; - exit(1) if ( $bpc->CheckHostAlive($hostIP) < 0 - || $Conf{NmbLookupCmd} eq "" ); + if ( $bpc->CheckHostAlive($hostIP) < 0 ) { + print("Exiting because CheckHostAlive($hostIP) failed\n") + if ( $opts{v} ); + exit(1); + } + if ( $Conf{NmbLookupCmd} eq "" ) { + print("Exiting because \$Conf{NmbLookupCmd} is empty\n") + if ( $opts{v} ); + exit(1); + } ($client, $user) = $bpc->NetBiosInfoGet($hostIP); - exit(1) if ( $host !~ /^([\w\.\s-]+)$/ ); + if ( $client !~ /^([\w\.\s-]+)$/ ) { + print("Exiting because NetBiosInfoGet($hostIP) returned '$client'," + . " an invalid host name\n") + if ( $opts{v} ); + exit(1) + } $Hosts = $bpc->HostInfoRead($client); - exit(1) if ( !defined($Hosts->{$client}) ); $host = $client; } else { $Hosts = $bpc->HostInfoRead($client); } +if ( !defined($Hosts->{$client}) ) { + print("Exiting because host $client does not exist in the hosts file\n"); + exit(1) +} my $Dir = "$TopDir/pc/$client"; -my $xferPid = -1; +my @xferPid = (); my $tarPid = -1; # @@ -152,6 +171,9 @@ $SIG{INT} = \&catch_signal; $SIG{ALRM} = \&catch_signal; $SIG{TERM} = \&catch_signal; $SIG{PIPE} = \&catch_signal; +$SIG{STOP} = \&catch_signal; +$SIG{TSTP} = \&catch_signal; +$SIG{TTIN} = \&catch_signal; my $Pid = $$; # @@ -190,6 +212,8 @@ if ( !$opts{d} ) { # Ok, NS doesn't know about it. Maybe it is a NetBios name # instead. # + print("Name server doesn't know about $host; trying NetBios\n") + if ( $opts{v} ); if ( !defined($hostIP = $bpc->NetBiosHostIPFind($host)) ) { print(LOG $bpc->timeStamp, "dump failed: Can't find host $host\n"); @@ -227,6 +251,8 @@ $bpc->ServerDisconnect(); if ( $opts{d} ) { if ( $StatusHost{activeJob} ) { # oops, something is already running for this host + print("Exiting because backup is already running for $client\n") + if ( $opts{v} ); exit(0); } print("DHCP $hostIP $clientURI\n"); @@ -347,6 +373,7 @@ if ( !defined($XferLOG) ) { print("dump failed: unable to open/create $Dir/XferLOG$fileExt\n"); exit(1); } +$XferLOG->writeTeeStdout(1) if ( $opts{v} ); unlink("$Dir/NewFileList"); my $startTime = time(); @@ -486,6 +513,7 @@ for my $shareName ( @$ShareNames ) { backups => \@Backups, compress => $Conf{CompressLevel}, XferMethod => $Conf{XferMethod}, + pidHandler => \&pidHandler, }); if ( !defined($logMsg = $xfer->start()) ) { @@ -500,11 +528,17 @@ for my $shareName ( @$ShareNames ) { sleep(1); kill(9, $tarPid); } + if ( @xferPid ) { + kill(2, @xferPid); + sleep(1); + kill(9, @xferPid); + } UserCommandRun("DumpPostUserCmd") if ( $NeedPostCmd ); exit(1); } - $xferPid = $xfer->xferPid; + @xferPid = $xfer->xferPid; + if ( $useTar ) { # # The parent must close both handles on the pipe since the children @@ -512,17 +546,13 @@ for my $shareName ( @$ShareNames ) { # close(RH); close(WH); - print(LOG $bpc->timeStamp, $logMsg, - " (xferPid=$xferPid, tarPid=$tarPid)\n"); - } elsif ( $xferPid > 0 ) { - print(LOG $bpc->timeStamp, $logMsg, " (xferPid=$xferPid)\n"); - } else { - print(LOG $bpc->timeStamp, $logMsg, "\n"); } - print("started $type dump, pid=$xferPid, tarPid=$tarPid," - . " share=$shareName\n"); + print(LOG $bpc->timeStamp, $logMsg, "\n"); + print("started $type dump, share=$shareName\n"); + + pidHandler(@xferPid); - if ( $useTar || $xferPid > 0 ) { + if ( $useTar ) { # # Parse the output of the transfer program and BackupPC_tarExtract # while they run. Since we might be reading from two or more children @@ -611,10 +641,10 @@ for my $shareName ( @$ShareNames ) { # # kill off the tranfer program, first nicely then forcefully # - if ( $xferPid > 0 ) { - kill(2, $xferPid); + if ( @xferPid ) { + kill(2, @xferPid); sleep(1); - kill(9, $xferPid); + kill(9, @xferPid); } # # kill off the tar process, first nicely then forcefully @@ -787,17 +817,15 @@ sub catch_signal UserCommandRun("DumpPostUserCmd") if ( $NeedPostCmd ); $XferLOG->write(\"exiting after signal $signame\n"); $XferLOG->close(); - if ( $xferPid > 0 ) { - if ( kill(2, $xferPid) <= 0 ) { - sleep(1); - kill(9, $xferPid); - } + if ( @xferPid ) { + kill(2, @xferPid); + sleep(1); + kill(9, @xferPid); } if ( $tarPid > 0 ) { - if ( kill(2, $tarPid) <= 0 ) { - sleep(1); - kill(9, $tarPid); - } + kill(2, $tarPid); + sleep(1); + kill(9, $tarPid); } unlink("$Dir/timeStamp.level0"); unlink("$Dir/NewFileList"); @@ -910,6 +938,23 @@ sub CorrectHostCheck return; } +# +# The Xfer method might tell us from time to time about processes +# it forks. We tell BackupPC about this (for status displays) and +# keep track of the pids in case we cancel the backup +# +sub pidHandler +{ + @xferPid = @_; + @xferPid = grep(/./, @xferPid); + return if ( !@xferPid && $tarPid < 0 ); + my @pids = @xferPid; + push(@pids, $tarPid) if ( $tarPid > 0 ); + my $str = join(",", @pids); + $XferLOG->write(\"Xfer PIDs are now $str\n") if ( defined($XferLOG) ); + print("xferPids $str\n"); +} + # # Run an optional pre- or post-dump command # diff --git a/bin/BackupPC_link b/bin/BackupPC_link index 147383c..2da62f6 100755 --- a/bin/BackupPC_link +++ b/bin/BackupPC_link @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_nightly b/bin/BackupPC_nightly index 43ba98c..7b726b1 100755 --- a/bin/BackupPC_nightly +++ b/bin/BackupPC_nightly @@ -35,7 +35,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_restore b/bin/BackupPC_restore index 709e7fd..212f928 100755 --- a/bin/BackupPC_restore +++ b/bin/BackupPC_restore @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -79,7 +79,7 @@ my $startTime = time(); my $Hosts = $bpc->HostInfoRead($client); my $Dir = "$TopDir/pc/$client"; -my $xferPid = -1; +my @xferPid = (); my $tarPid = -1; # @@ -254,6 +254,7 @@ my $xferArgs = { pathHdrSrc => $RestoreReq{pathHdrSrc}, pathHdrDest => $RestoreReq{pathHdrDest}, fileList => $RestoreReq{fileList}, + pidHandler => \&pidHandler, }; $xfer->args($xferArgs); @@ -324,9 +325,12 @@ if ( $useTar ) { # close(WH); - $xferPid = $xfer->xferPid; - print(LOG $bpc->timeStamp, $logMsg, " (tarPid=$tarPid, xferPid=$xferPid)\n"); - print("started restore, tarPid=$tarPid, xferPid=$xferPid\n"); + @xferPid = $xfer->xferPid; + + print(LOG $bpc->timeStamp, $logMsg, "\n"); + print("started_restore\n"); + + pidHandler(@xferPid); # # Parse the output of the transfer program and BackupPC_tarCreate @@ -384,8 +388,8 @@ if ( $useTar ) { # # otherwise the xfer module does everything for us # - print(LOG $bpc->timeStamp, "Starting restore (tarPid=-1, xferPid=-1)\n"); - print("started restore, tarPid=-1, xferPid=-1\n"); + print(LOG $bpc->timeStamp, "Starting restore\n"); + print("started_restore\n"); ($tarCreateFileCnt, $tarCreateByteCnt, $tarCreateErrCnt, $tarCreateErr) = $xfer->run(); } @@ -434,17 +438,15 @@ sub catch_signal # Note: needs to be tested for each kind of XferMethod # print(LOG $bpc->timeStamp, "cleaning up after signal $signame\n"); - if ( $xferPid > 0 ) { - if ( kill(2, $xferPid) <= 0 ) { - sleep(1); - kill(9, $xferPid); - } + if ( @xferPid ) { + kill(2, @xferPid); + sleep(1); + kill(9, @xferPid); } if ( $tarPid > 0 ) { - if ( kill(2, $tarPid) <= 0 ) { - sleep(1); - kill(9, $tarPid); - } + kill(2, $tarPid); + sleep(1); + kill(9, $tarPid); } $stat{xferOK} = 0; $stat{hostError} = "aborted by signal $signame"; @@ -464,15 +466,19 @@ sub RestoreCleanup # # kill off the tranfer program, first nicely then forcefully # - kill(2, $xferPid) if ( $xferPid > 0 ); - sleep(1); - kill(9, $xferPid) if ( $xferPid > 0 ); + if ( @xferPid ) { + kill(2, @xferPid); + sleep(1); + kill(9, @xferPid); + } # # kill off the tar process, first nicely then forcefully # - kill(2, $tarPid) if ( $tarPid > 0 ); - sleep(1); - kill(9, $tarPid) if ( $tarPid > 0 ); + if ( $tarPid > 0 ) { + kill(2, $tarPid); + sleep(1); + kill(9, $tarPid); + } } my $lastNum = -1; @@ -553,6 +559,23 @@ sub RestoreCleanup } } +# +# The Xfer method might tell us from time to time about processes +# it forks. We tell BackupPC about this (for status displays) and +# keep track of the pids in case we cancel the backup +# +sub pidHandler +{ + @xferPid = @_; + @xferPid = grep(/./, @xferPid); + return if ( !@xferPid && $tarPid < 0 ); + my @pids = @xferPid; + push(@pids, $tarPid) if ( $tarPid > 0 ); + my $str = join(",", @pids); + $XferLOG->write(\"Xfer PIDs are now $str\n") if ( defined($XferLOG) ); + print("xferPids $str\n"); +} + # # Run an optional pre- or post-dump command # diff --git a/bin/BackupPC_sendEmail b/bin/BackupPC_sendEmail index d5d4e00..c1447bb 100755 --- a/bin/BackupPC_sendEmail +++ b/bin/BackupPC_sendEmail @@ -31,7 +31,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -59,8 +59,7 @@ use vars qw(%UserEmailInfo); do "$TopDir/log/UserEmailInfo.pl"; my %opts; -getopts("t", \%opts); -if ( @ARGV != 0 ) { +if ( !getopts("t", \%opts) || @ARGV != 0 ) { print("usage: $0 [-t]\n"); exit(1); } diff --git a/bin/BackupPC_serverMesg b/bin/BackupPC_serverMesg index f80e6d7..700bcd1 100755 --- a/bin/BackupPC_serverMesg +++ b/bin/BackupPC_serverMesg @@ -43,7 +43,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_tarCreate b/bin/BackupPC_tarCreate index 7327a7a..43240d3 100755 --- a/bin/BackupPC_tarCreate +++ b/bin/BackupPC_tarCreate @@ -48,7 +48,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -69,9 +69,8 @@ my $BinDir = $bpc->BinDir(); my %Conf = $bpc->Conf(); my %opts; -getopts("th:n:p:r:s:", \%opts); -if ( @ARGV < 1 ) { +if ( !getopts("th:n:p:r:s:", \%opts) || @ARGV < 1 ) { print(STDERR "usage: $0 [-t] [-h host] [-n dumpNum] [-s shareName]" . " [-r pathRemove] [-p pathAdd]" . " files/directories...\n"); @@ -227,13 +226,13 @@ sub TarWrite my $done = $WriteBufSz - length($WriteBuf); if ( syswrite($fh, $WriteBuf . substr($$dataRef, 0, $done)) != $WriteBufSz ) { - print(STDERR "Unable to write to output file\n"); + print(STDERR "Unable to write to output file ($!)\n"); exit(1); } while ( $done + $WriteBufSz <= length($$dataRef) ) { if ( syswrite($fh, substr($$dataRef, $done, $WriteBufSz)) != $WriteBufSz ) { - print(STDERR "Unable to write to output file\n"); + print(STDERR "Unable to write to output file ($!)\n"); exit(1); } $done += $WriteBufSz; diff --git a/bin/BackupPC_tarExtract b/bin/BackupPC_tarExtract index d8f6311..af88e9a 100755 --- a/bin/BackupPC_tarExtract +++ b/bin/BackupPC_tarExtract @@ -27,7 +27,7 @@ # #======================================================================== # -# Version 2.0.0beta0, released 23 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_trashClean b/bin/BackupPC_trashClean index 1c78b1c..edea64c 100755 --- a/bin/BackupPC_trashClean +++ b/bin/BackupPC_trashClean @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_zcat b/bin/BackupPC_zcat index f1032c4..1c7ba02 100755 --- a/bin/BackupPC_zcat +++ b/bin/BackupPC_zcat @@ -32,7 +32,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/bin/BackupPC_zipCreate b/bin/BackupPC_zipCreate index 36a1e30..cb56ac2 100755 --- a/bin/BackupPC_zipCreate +++ b/bin/BackupPC_zipCreate @@ -51,7 +51,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -75,9 +75,8 @@ my $BinDir = $bpc->BinDir(); my %Conf = $bpc->Conf(); my %opts; -getopts("th:n:p:r:s:c:", \%opts); -if ( @ARGV < 1 ) { +if ( !getopts("th:n:p:r:s:c:", \%opts) || @ARGV < 1 ) { print(STDERR "usage: $0 [-t] [-h host] [-n dumpNum] [-s shareName]" . " [-r pathRemove] [-p pathAdd] [-c compressionLevel]" . " files/directories...\n"); diff --git a/cgi-bin/BackupPC_Admin b/cgi-bin/BackupPC_Admin index a2eefad..6e9d9f5 100755 --- a/cgi-bin/BackupPC_Admin +++ b/cgi-bin/BackupPC_Admin @@ -107,7 +107,7 @@ if ( !defined($Hosts) || $bpc->HostsMTime() != $HostsMTime ) { $HostsMTime = $bpc->HostsMTime(); $Hosts = $bpc->HostInfoRead(); - # turn operators list into a hash for quick lookups + # turn moreUsers list into a hash for quick lookups foreach my $host (keys %$Hosts) { $Hosts->{$host}{moreUsers} = {map {$_, 1} split(",", $Hosts->{$host}{moreUsers}) } @@ -156,7 +156,7 @@ sub Action_Summary ErrorExit($Lang->{Only_privileged_users_can_view_PC_summaries} ); } foreach my $host ( sort(keys(%Status)) ) { - my($fullDur, $incrCnt, $incrAge, $fullSize, $fullRate); + my($fullDur, $incrCnt, $incrAge, $fullSize, $fullRate, $reasonHilite); my @Backups = $bpc->BackupInfoRead($host); my $fullCnt = $incrCnt = 0; my $fullAge = $incrAge = -1; @@ -193,9 +193,12 @@ sub Action_Summary $fullTot += $fullCnt; $incrTot += $incrCnt; $fullSize = sprintf("%.2f", $fullSize / 1000); - if (! $incrAge) { $incrAge = " "; } + $incrAge = " " if ( $incrAge eq "" ); + $reasonHilite = $Conf{CgiStatusHilightColor}{$Status{$host}{reason}}; + $reasonHilite = " bgcolor=\"$reasonHilite\"" if ( $reasonHilite ne "" ); + $str = < ${HostLink($host)} + ${HostLink($host)} ${UserLink($Hosts->{$host}{user})} $fullCnt $fullAge @@ -312,12 +315,12 @@ EOF while ( @CmdQueue ) { my $req = pop(@CmdQueue); my $reqTime = timeStamp2($req->{reqTime}); - (my $cmd = $req->{cmd}) =~ s/$BinDir\///; + (my $cmd = $req->{cmd}[0]) =~ s/$BinDir\///; $strCmd .= < ${HostLink($req->{host})} $reqTime $req->{user} - $cmd + $cmd $req->{cmd}[0] EOF } Header($Lang->{BackupPC__Queue_Summary}); @@ -349,16 +352,16 @@ sub Action_View } elsif ( $type eq "XferErrbad" ) { $file = "$TopDir/pc/$host/SmbLOG.bad"; $file = "$TopDir/pc/$host/XferLOG.bad" if ( !-f $file && !-f "$file.z"); - $comment = "(Extracting only Errors)"; + $comment = $Lang->{Extracting_only_Errors}; } elsif ( $type eq "XferErr" ) { $file = "$TopDir/pc/$host/SmbLOG$ext"; $file = "$TopDir/pc/$host/XferLOG$ext" if ( !-f $file && !-f "$file.z"); - $comment = "(Extracting only Errors)"; + $comment = $Lang->{Extracting_only_Errors}; } elsif ( $type eq "RestoreLOG" ) { $file = "$TopDir/pc/$host/RestoreLOG$ext"; } elsif ( $type eq "RestoreErr" ) { $file = "$TopDir/pc/$host/RestoreLOG$ext"; - $comment = "(Extracting only Errors)"; + $comment = $Lang->{Extracting_only_Errors}; } elsif ( $host ne "" && $type eq "config" ) { $file = "$TopDir/pc/$host/config.pl"; $file = "$TopDir/conf/$host.pl" @@ -859,10 +862,6 @@ EOF # # Provide the selected files via a tar archive. # - # We no longer use fork/exec (as in v1.5.0) since some mod_perls - # do not correctly preserve the stdout connection to the client - # browser, so we execute BackupPC_tarCreate in-line. - # my @fileListTrim = @fileList; if ( @fileListTrim > 10 ) { @fileListTrim = (@fileListTrim[0..9], '...'); @@ -873,33 +872,30 @@ EOF if ( $In{relative} ) { @pathOpts = ("-r", $pathHdr, "-p", ""); } - # - # We use syswrite since BackupPC_tarCreate uses syswrite too. - # Need to test this with mod_perl: PaulL says it doesn't work. - # - syswrite(STDOUT, <cmdSystemOrEval(["$BinDir/BackupPC_tarCreate", + "-h", $host, + "-n", $num, + "-s", $share, + @pathOpts, + @fileList + ], + sub { print(@_); } ); - do "$BinDir/BackupPC_tarCreate"; } elsif ( $In{type} == 2 ) { # # Provide the selected files via a zip archive. # - # We no longer use fork/exec (as in v1.5.0) since some mod_perls - # do not correctly preserve the stdout connection to the client - # browser, so we execute BackupPC_tarCreate in-line. - # my @fileListTrim = @fileList; if ( @fileListTrim > 10 ) { @fileListTrim = (@fileListTrim[0..9], '...'); @@ -910,27 +906,28 @@ EOF if ( $In{relative} ) { @pathOpts = ("-r", $pathHdr, "-p", ""); } - # - # We use syswrite since BackupPC_tarCreate uses syswrite too. - # Need to test this with mod_perl: PaulL says it doesn't work. - # - syswrite(STDOUT, <cmdSystemOrEval(["$BinDir/BackupPC_zipCreate", + "-h", $host, + "-n", $num, + "-c", $In{compressLevel}, + "-s", $share, + @pathOpts, + @fileList + ], + sub { print(@_); } + ); } elsif ( $In{type} == 3 ) { # # Do restore directly onto host @@ -1262,8 +1259,8 @@ EOF $errStr .= < $Backups[$i]{num} $ltype - XferLOG, - Errors + $Lang->{XferLOG}, + $Lang->{Errors} $Backups[$i]{xferErrs} $Backups[$i]{xferBadFile} $Backups[$i]{xferBadShare} @@ -1395,7 +1392,7 @@ sub Action_GeneralInfo GetStatusInfo("info jobs hosts queueLen"); my $Privileged = CheckPermission(); - my($jobStr, $statusStr, $tarPidHdr); + my($jobStr, $statusStr); foreach my $host ( sort(keys(%Jobs)) ) { my $startTime = timeStamp2($Jobs{$host}{startTime}); next if ( $host eq $bpc->trashJob @@ -1403,6 +1400,7 @@ sub Action_GeneralInfo $Jobs{$host}{type} = $Status{$host}{type} if ( $Jobs{$host}{type} eq "" && defined($Status{$host})); (my $cmd = $Jobs{$host}{cmd}) =~ s/$BinDir\///g; + (my $xferPid = $Jobs{$host}{xferPid}) =~ s/,/, /g; $jobStr .= < ${HostLink($host)} $Jobs{$host}{type} @@ -1410,12 +1408,8 @@ sub Action_GeneralInfo $startTime $cmd $Jobs{$host}{pid} - $Jobs{$host}{xferPid} + $xferPid EOF - if ( $Jobs{$host}{tarPid} > 0 ) { - $jobStr .= " $Jobs{$host}{tarPid} \n"; - $tarPidHdr ||= " tar PID \n"; - } $jobStr .= "\n"; } foreach my $host ( sort(keys(%Status)) ) { @@ -1432,8 +1426,8 @@ EOF || -f "$TopDir/pc/$host/XferLOG.bad.z" ) { $XferViewStr = <XferLOG, -XferErr +$Lang->{XferLOG}, +$Lang->{Errors} EOF } else { $XferViewStr = ""; @@ -1683,7 +1677,7 @@ sub CheckPermission } $PrivAdmin = $Privileged; $Privileged ||= $User eq $Hosts->{$host}{user}; - $Privileged ||= defined($Hosts->{$host}{operators}{$User}); + $Privileged ||= defined($Hosts->{$host}{moreUsers}{$User}); return $Privileged; } diff --git a/conf/config.pl b/conf/config.pl index 8b0e00c..59584a2 100644 --- a/conf/config.pl +++ b/conf/config.pl @@ -454,11 +454,13 @@ $Conf{BackupFilesOnly} = undef; # For tar, if the exclude file contains a "/" it is assumed to be anchored # at the start of the string. Since all the tar paths start with "./", # BackupPC prepends a "." if the exclude file starts with a "/". Note -# that GNU tar version >= 1.3.7 is required for the exclude option to +# that GNU tar version >= 1.13.7 is required for the exclude option to # work correctly. For linux or unix machines you should add # "/proc" to $Conf{BackupFilesExclude} unless you have specified # --one-file-system in $Conf{TarClientCmd} or --one-file-system in -# $Conf{RsyncArgs}. +# $Conf{RsyncArgs}. Also, for tar, do not use a trailing "/" in +# the directory name: a trailing "/" causes the name to not match +# and the directory will not be excluded. # # Examples: # $Conf{BackupFilesExclude} = '/temp'; @@ -995,13 +997,15 @@ $Conf{RestorePostUserCmd} = undef; # # Override the client's host name. This allows multiple clients -# to all refer to the same physical hostj. This should only be +# to all refer to the same physical host. This should only be # set in the per-PC config file and is only used by BackupPC at # the last moment prior to generating the command used to backup # that machine (ie: the value of $Conf{ClientNameAlias} is invisible -# everywhere else in BackupPC). Eg: +# everywhere else in BackupPC). The setting can be a host name or +# IP address, eg: # # $Conf{ClientNameAlias} = 'realHostName'; +# $Conf{ClientNameAlias} = '192.1.1.15'; # # will cause the relevant smb/tar/rsync backup/restore commands to be # directed to realHostName, not the client name. @@ -1239,6 +1243,17 @@ $Conf{CgiNavBarBgColor} = '#ddeeee'; $Conf{CgiHeaderBgColor} = '#99cc33'; $Conf{CgiBodyBgColor} = '#ffffff'; +# +# Hilight colors based on status that are used in the PC summary page. +# +$Conf{CgiStatusHilightColor} = { + Reason_backup_failed => '#ffcccc', + Reason_backup_done => '#ccffcc', + Reason_no_ping => '#ffff99', + Reason_backup_in_progress => '#66cc99', + Reason_backup_canceled_by_user => '#ff9900', +}; + # # Additional CGI header text. For example, if you wanted each CGI page # to auto refresh every 900 seconds, you could add this text: diff --git a/configure.pl b/configure.pl index 262e7b3..36c702d 100755 --- a/configure.pl +++ b/configure.pl @@ -416,6 +416,7 @@ foreach my $lib ( qw(BackupPC/Lib.pm BackupPC/FileZIO.pm BackupPC/Attrib.pm BackupPC/Xfer/Smb.pm BackupPC/Xfer/Rsync.pm BackupPC/Xfer/RsyncFileIO.pm BackupPC/Zip/FileMember.pm BackupPC/Lang/en.pm BackupPC/Lang/fr.pm BackupPC/Lang/es.pm + BackupPC/Lang/de.pm ) ) { InstallFile("lib/$lib", "$Conf{InstallDir}/lib/$lib", 0444); } @@ -429,7 +430,8 @@ if ( $Conf{CgiImageDir} ne "" ) { } printf("Making init.d scripts\n"); -foreach my $init ( qw(linux-backuppc solaris-backuppc debian-backuppc) ) { +foreach my $init ( qw(gentoo-backuppc gentoo-backuppc.conf linux-backuppc + solaris-backuppc debian-backuppc suse-backuppc) ) { InstallFile("init.d/src/$init", "init.d/$init", 0444); } diff --git a/doc-src/BackupPC.pod b/doc-src/BackupPC.pod index 4b6e640..ea46308 100644 --- a/doc-src/BackupPC.pod +++ b/doc-src/BackupPC.pod @@ -1248,7 +1248,7 @@ you should turn it off: chmod u-s __CGIDIR__/BackupPC_Admin To tell Apache to use mod_perl to execute BackupPC_Admin, add this -to Apache's httpd.conf file: +to Apache's 1.x httpd.conf file: PerlModule Apache::Registry @@ -1261,10 +1261,33 @@ to Apache's httpd.conf file: +For Apache 2.x and perl 5.8.x + +Apache 2.0.44 with Perl 5.8.0 on RedHat 7.1, Don Silvia reports that +this works: + + LoadModule perl_module modules/mod_perl.so + PerlModule Apache2 + + + SetHandler perl-script + PerlResponseHandler ModPerl::Registry + PerlOptions +ParseHeaders + Options +ExecCGI + + Order deny,allow + Deny from all + Allow from 192.168.0 + AuthName "Backup Admin" + 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, which saves memory compared to loading separate copies in every -Apache process after they are forked. See Stas's definitive +Apache process after they are forked. See Stas's definitive mod_perl guide at L. =back @@ -1311,7 +1334,8 @@ to hardcode the user to www you could add this to httpd.conf: Finally, you should also edit the config.pl file and adjust, as necessary, the CGI-specific settings. They're near the end of the config file. In particular, you should specify which users or groups have administrator -(privileged) access. Also, the configure.pl script placed various +(privileged) access: see the config settings $Conf{CgiAdminUserGroup} +and $Conf{CgiAdminUsers}. Also, the configure.pl script placed various images into $Conf{CgiImageDir} that BackupPC_Admin needs to serve up. You should make sure that $Conf{CgiImageDirURL} is the correct URL for the image directory. @@ -1534,40 +1558,86 @@ can now re-start BackupPC. =head2 Debugging installation problems This section will probably grow based on the types of questions on -the BackupPC mail list. +the BackupPC mail list. Eventually the FAQ at +L will include more details +than this section. + +=over 4 + +=item Check log files Assuming BackupPC can start correctly you should inspect __TOPDIR__/log/LOG for any errors. Assuming backups for a particular host start, you should be able to look in __TOPDIR__/pc/$host/LOG for error messages -specific to that host. +specific to that host. Always check both log files. -The most likely problems will relate to connecting to the smb shares on -each host. On each failed backup, a file __TOPDIR__/pc/$host/XferERR will -be created. This is the stderr output from smbclient. The first line -will show the full smbclient command that was run. Based on the error -messages you should figure out what is wrong. Possible errors on the -server side are invalid host, invalid share name, bad username or password. -Possible errors on the client side are misconfiguration of the share, -username or password. +=item CGI script doesn't run -You should run smbclient manually and verify that you can connect to -the host in interactive mode, eg: +Perhaps the most common program with the installation is getting the +CGI script to run. Often the setuid isn't configured correctly, or +doesn't work on your system. - smbclient '\\hostName\shareName' -U userName +First, try running BackupPC_Admin manually as the BackupPC user, eg: -shareName should match the $Conf{SmbShareName} setting and userName -should match the the $Conf{SmbShareUserName} setting. + su __BACKUPPCUSER__ + __CGIDIR__/BackupPC_Admin -You will be prompted for the password. You should then see this prompt: +Now try running it as the httpd user (which ever user apache runs as); - smb: \> + su httpd + __CGIDIR__/BackupPC_Admin -Verify that "ls" works and then type "quit" to exit. +In both cases do you get normal html output? + +If the first case works but the second case fails with an error that +the wrong user is running the script then you have a setuid problem. +(This assumes you are running BackupPC_Admin without mod_perl, and +you therefore need seduid to work. If you are using mod_perl then +apache should run as user __BACKUPPCUSER__.) + +First you should make sure the cgi-bin directory is on a file system +that doesn't have the "nosuid" mount option. + +Next, experiment by creating this script: + + #!/bin/perl + + printf("My userid is $> (%s)\n", (getpwuid($>))[0]); + +then chown it to backuppc and chmod u+s: + + root# chown backuppc testsetuid + root# chmod u+s testsetuid + root# chmod a+x testsetuid + root# ls -l testsetuid + -rwsr-xr-x 1 backuppc wheel 76 Aug 26 09:46 testsetuid* + +Now run this program as a normal user. What uid does it print? +Try changing the first line of the script to directly call sperl: + + #!/usr/bin/sperl5.8.0 + +(modify according to your version and path). Does this work +instead? + +Finally, you should invoke the CGI script from a browser, using +a URL like: -Secondly, you should also verify that nmblookup correctly returns -the netbios name. This is essential for DHCP hosts, and depending -upon the setting of $Conf{FixedIPNetBiosNameCheck} might also be -required for fixed IP address hosts too. Run this command: + http://myHost/cgi-bin/BackupPC/BackupPC_Admin + +You should make sure REMOTE_USER is being set by apache (see the +earlier section) so that user authentication works. Make sure +the config settings $Conf{CgiAdminUserGroup} and $Conf{CgiAdminUsers} +correctly specify the privileged administrator users. + +=item Can't ping or find host + +Please read the section L. + +You should also verify that nmblookup correctly returns the netbios name. +This is essential for DHCP hosts, and depending upon the setting of +$Conf{FixedIPNetBiosNameCheck} might also be required for fixed IP +address hosts too. Run this command: nmblookup -A hostName @@ -1584,6 +1654,46 @@ Verify that the host name is printed. The output might look like: The first name, converted to lower case, is used for the host name. +=item Transport method doesn't work + +The BackupPC_dump command now has a -v option, so the easiest way to +debug backup problems on a specific host is to run BackupPC_dump +manually as the BackupPC user: + + su __BACKUPPCUSER__ + __INSTALLDIR__/bin/BackupPC_zcat + +The most likely problems will relate to connecting to the smb shares on +each host. On each failed backup, a file __TOPDIR__/pc/$host/XferLOG.bad.z +will be created. This is the stderr output from the transport program. +You can view this file via the CGI interface, or manually uncompress it +with; + + __INSTALLDIR__/bin/BackupPC_zcat __TOPDIR__/pc/$host/XferLOG.bad.z | more + +The first line will show the full command that was run (eg: rsync, tar +or smbclient). Based on the error messages you should figure out what +is wrong. Possible errors on the server side are invalid host, invalid +share name, bad username or password. Possible errors on the client +side are misconfiguration of the share, username or password. + +You should try running the command manually to see what happens. +For example, for smbclient you should it manually and verify that +you can connect to the host in interactive mode, eg: + + smbclient '\\hostName\shareName' -U userName + +shareName should match the $Conf{SmbShareName} setting and userName +should match the the $Conf{SmbShareUserName} setting. + +You will be prompted for the password. You should then see this prompt: + + smb: \> + +Verify that "ls" works and then type "quit" to exit. + +=back + =head1 Restore functions BackupPC supports several different methods for restoring files. The @@ -2840,13 +2950,14 @@ the appropriate config file: ln -s ../../conf/ConfigWinDesktop.pl config.pl or, better yet, create a config.pl file in __TOPDIR__/pc/$host -that contains this line: +that includes the default config.pl file using perl's "do" +command: - do "../../conf/ConfigWinDesktop.pl"; + do "__TOPDIR__/conf/ConfigWinDesktop.pl"; This alternative allows you to set other configuration options -specific to each host (perhaps even overriding the settings in -the included file). +specific to each host after the "do" command (perhaps even +overriding the settings in the included file). Note that you could also include snippets of configuration settings from the main configuration file. However, be aware that the @@ -2901,7 +3012,9 @@ for v1.5.0. He also contributed the first skeleton of BackupPC_restore. Guillaume Filion wrote BackupPC_zipCreate and added the CGI support for zip download, in addition to some CGI cleanup, for v1.5.0. -Javier provided the Spanish translation, es.pm. +Javier Gonzalez provided the Spanish translation, es.pm. + +Manfred provided the German translation, de.pm. 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 c696a77..4aee97b 100644 --- a/init.d/README +++ b/init.d/README @@ -29,6 +29,41 @@ You should then run the following commands as root: This will auto-start backuppc at run levels 3, 4 and 5. +Debian Linux: +============ + +When configure.pl is run, the script debian-backuppc is created. + +(Can a Debian user add some instructions here??) + +Suse Linux: +========== + +When configure.pl is run, the script suse-backuppc is created. + +(Can a Suse user add some instructions here??) + +Gentoo Linux: +============ + +When configure.pl is run, the script gentoo-backuppc and the init conf files +gentoo-backuppc.conf are created. They should be copied to the following +locations: + + cp gentoo-backuppc /etc/init.d/backuppc + cp gentoo-backuppc.conf /etc/conf.d/backuppc + +You can test it by running these commands as root: + + /etc/init.d/backuppc start + /etc/init.d/backuppc status + /etc/init.d/backuppc stop + +After copying these files, run the following as root to make BackupPC to +start automatically at boot (at the default run level): + + rc-update add backuppc default + Solaris: ======= @@ -42,4 +77,4 @@ and /etc/rc0.d. This will auto-start backuppc at run level 3 and stop it at run level 0. -*** NOTE: the solaris startup script and instructions have not been tested *** +(Can a Solaris user please tell me if these instructions are correct?) diff --git a/init.d/src/gentoo-backuppc b/init.d/src/gentoo-backuppc new file mode 100755 index 0000000..e214941 --- /dev/null +++ b/init.d/src/gentoo-backuppc @@ -0,0 +1,45 @@ +#!/sbin/runscript +# +# DESCRIPTION +# +# Startup init script for BackupPC on Gentoo` linux. +# +# Distributed with BackupPC version __VERSION__, released __RELEASEDATE__. +# +# description: Starts and stops the BackupPC server +# Copy to /etc/init.d and run 'rc-update add backuppc default' + +# get our configuration options +source /etc/conf.d/backuppc + +checkconfig() { + if [ ! -f ${CONF_FILE} ] ; then + eeror "No ${CONF_FILE} exists!" + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting BackupPC" + start-stop-daemon --start --user ${USER} --pidfile ${PID_FILE} --exec ${EXEC} -- ${EXEC_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping BackupPC" + start-stop-daemon --stop --pidfile ${PID_FILE} --name BackupPC + eend $? +} + +restart() { + ebegin "Restarting BackupPC" + svc_stop + svc_start + eend $? "Failed to restart BackupPC" +} + +status() { + return + eend $? +} + diff --git a/init.d/src/gentoo-backuppc.conf b/init.d/src/gentoo-backuppc.conf new file mode 100644 index 0000000..f53890c --- /dev/null +++ b/init.d/src/gentoo-backuppc.conf @@ -0,0 +1,6 @@ +CONF_FILE=__TOPDIR__/conf/config.pl +USER=__BACKUPPCUSER__ +PID_FILE=__TOPDIR__/log/BackupPC.pid +EXEC=__INSTALLDIR__/bin/BackupPC +EXEC_OPTIONS=-d + diff --git a/init.d/src/suse-backuppc b/init.d/src/suse-backuppc new file mode 100755 index 0000000..00049cc --- /dev/null +++ b/init.d/src/suse-backuppc @@ -0,0 +1,54 @@ +#!/bin/sh +# +# DESCRIPTION +# +# Startup init script for BackupPC on suse linux. +# +# Distributed with BackupPC version __VERSION__, released __RELEASEDATE__. +# + +set -e + +# +BINDIR=__INSTALLDIR__/bin +DATADIR=__TOPDIR__ +USER=__BACKUPPCUSER__ +# +NAME=backuppc +DAEMON=BackupPC + +test -x $BINDIR/$DAEMON || exit 0 + +case "$1" in + start) + echo -n "Starting $NAME: " + startproc -f -p $DATADIR/log/BackupPC.pid -u $USER $BINDIR/$DAEMON -d + echo "ok." + ;; + stop) + echo -n "Stopping $NAME: " + start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid -u $USER \ + --oknodo + echo "ok." + ;; + restart) + echo -n "Stopping $NAME: " + start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid -u $USER \ + --oknodo + echo "ok." + echo -n "Starting $NAME: " + startproc -f -p $DATADIR/log/BackupPC.pid -u $USER $BINDIR/$DAEMON -d + echo "ok." + ;; + reload|force-reload) + echo "Reloading $NAME configuration files" + start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid \ + --signal 1 -x /usr/bin/perl + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/lib/BackupPC/Attrib.pm b/lib/BackupPC/Attrib.pm index 7591774..05547be 100644 --- a/lib/BackupPC/Attrib.pm +++ b/lib/BackupPC/Attrib.pm @@ -30,7 +30,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/FileZIO.pm b/lib/BackupPC/FileZIO.pm index 7022896..48554b8 100644 --- a/lib/BackupPC/FileZIO.pm +++ b/lib/BackupPC/FileZIO.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -246,6 +246,7 @@ sub write my $n = length($$dataRef); return if ( !$self->{write} ); + print($$dataRef) if ( $self->{writeTeeStdout} ); return 0 if ( $n == 0 ); if ( !$self->{compress} ) { # @@ -303,6 +304,14 @@ sub name return $self->{name}; } +sub writeTeeStdout +{ + my($self, $param) = @_; + + $self->{writeTeeStdout} = $param if ( defined($param) ); + return $self->{writeTeeStdout}; +} + sub close { my($self) = @_; diff --git a/lib/BackupPC/Lang/de.pm b/lib/BackupPC/Lang/de.pm new file mode 100644 index 0000000..4195acc --- /dev/null +++ b/lib/BackupPC/Lang/de.pm @@ -0,0 +1,1013 @@ +#!/usr/bin/perl -T + +#my %lang; + +#use strict; + +# -------------------------------- + +$Lang{Start_Full_Backup} = "Starte Backup vollständig"; +$Lang{Start_Incr_Backup} = "Starte Backup incrementell"; +$Lang{Stop_Dequeue_Backup} = "Stoppen/Aussetzen Backup"; +$Lang{Restore} = "Wiederherstellung"; + +# ----- + +$Lang{H_BackupPC_Server_Status} = "BackupServer Server Status"; + +$Lang{BackupPC_Server_Status}= < +\${h2(\"Allgemeine Server Information\")} + +
    +
  • Die Server Prozess ID (PID) ist \$Info{pid}, auf Computer \$Conf{ServerHost}, + Version \$Info{Version}, gestartet am \$serverStartTime. +
  • Dieser Status wurde am \$now generiert. +
  • Computer werden am \$nextWakeupTime auf neue Aufträge geprüft. +
  • Weitere Informationen: +
      +
    • \$numBgQueue wartende backup Aufträge der letzten Prüfung, +
    • \$numUserQueue wartende Aufträge von Benutzern, +
    • \$numCmdQueue wartende Kommando Aufträge. + \$poolInfo +
    • Das Pool Filesystem (Backup-Speicherplatz) ist zu \$Info{DUlastValue}% + (\$DUlastTime) gefüllt, das Maximum-Heute ist \$Info{DUDailyMax}% (\$DUmaxTime) + und Maximum-Gestern war \$Info{DUDailyMaxPrev}%. (Hinweis: sollten ca. 70% überschritten werden, so + ist evtl. bald eine Erweiterung des Backup-Speichers erforderlich. Planung erforderlich?) +
    +
+ +\${h2("Aktuell laufende Aufträge")} +

+ + + + + + + + + +\$jobStr +
Computer Typ User Startzeit Kommando PID Transport PID
+

+ +\${h2("Fehler, die näher analysiert werden müssen!")} +

+ + + + + + + + +\$statusStr +
Computer Typ User letzter Versuch Details Fehlerzeit Letzter Fehler (außer "kein ping")
+EOF + +# -------------------------------- +$Lang{BackupPC__Server_Summary} = "BackupServer: Übersicht"; +$Lang{BackupPC_Summary}=< +Dieser Status wurde generiert am \$now. +

+ +\${h2("Computer mit erfolgreichen Backups")} +

+Es gibt \$hostCntGood Computer die erfolgreich gesichert wurden, mit insgesamt: +

    +
  • \$fullTot Voll Backups, Gesamtgröße \${fullSizeTot}GB + (vor pooling und Komprimierung), +
  • \$incrTot Incrementelle Backups, Gesamtgröße \${incrSizeTot}GB + (vor pooling und Komprimierung). +
+ + + + + + + + + + + +\$strGood +
Computer User #Voll Alter/Tage Größe/GB MB/sec #Incr Alter/Tage Status Letzte Aktion
+

+ +\${h2("Computer ohne Backups")} +

+Es gibt \$hostCntNone Computer ohne Backups !!!. +

+ + + + + + + + + + + +\$strNone +
Computer User #Voll Alter/Tage Größe/GB MB/sec #Incr Alter/Tage Status Letzter Versuch
+EOF + +# ----------------------------------- +$Lang{Pool_Stat} = <Der Pool hat eine Größe von \${poolSize}GB und enthält \$info->{"\${name}FileCnt"} Dateien und \$info->{"\${name}DirCnt"} Verzeichnisse (Stand \$poolTime). +

  • Das "Pool hashing" ergibt \$info->{"\${name}FileCntRep"} wiederholte + Dateien mit der längsten Verkettung von \$info->{"\${name}FileRepMax"}. +
  • Die nächtliche Bereinigung entfernte \$info->{"\${name}FileCntRm"} Dateien mit + einer Größe von \${poolRmSize}GB (um ca. \$poolTime). +EOF + +# -------------------------------- +$Lang{BackupPC__Backup_Requested_on__host} = "BackupServer: Backup Auftrag für \$host"; +# -------------------------------- +$Lang{REPLY_FROM_SERVER} = < +Die Antwort des Servers war: \$reply +

    +Gehe zurück zur \$host home page. +EOF +# -------------------------------- +$Lang{BackupPC__Start_Backup_Confirm_on__host} = "BackupServer: Starte Backup Bestätigung für \$host"; +# -------------------------------- +$Lang{Are_you_sure_start} = < +Sie starten ein \$type Backup für \$host. + +

    + + + +Möchten Sie das wirklich tun? + + +
    +EOF +# -------------------------------- +$Lang{BackupPC__Stop_Backup_Confirm_on__host} = "BackupServer: Beende Backup Bestätigung für \$host"; +# -------------------------------- +$Lang{Are_you_sure_stop} = < +Sie werden Backups abbrechen bzw. Aufträge löschen für Computer \$host; + +
    + + +Zusätzlich bitte keine Backups starten für die Dauer von + Stunden. +

    +Möchten Sie das wirklich tun? + + +

    + +EOF +# -------------------------------- +$Lang{Only_privileged_users_can_view_queues_} = "Nur berechtigte User können die Warteschlangen einsehen."; +# -------------------------------- +$Lang{BackupPC__Queue_Summary} = "BackupServer: Warteschlangen Übersicht"; +# -------------------------------- +$Lang{Backup_Queue_Summary} = < +\${h2("User Warteschlange Übersicht")} +

    +Die folgenden User Aufträge sind eingereiht: + + + + +\$strUser +
    Computer Uhrzeit User
    +

    + +\${h2("Hintergrund Warteschlange Übersicht")} +

    +Die folgenden Hintergrund Aufträge sind eingereiht: + + + + +\$strBg +
    Computer Uhrzeit User
    +

    + +\${h2("Kommando Warteschlange Übersicht")} +

    +Die folgenden Kommando Aufträge sind eingereiht: + + + + + +\$strCmd +
    Computer Uhrzeit User Kommando
    +EOF + +# -------------------------------- +$Lang{Backup_PC__Log_File__file} = "BackupServer: LOG Datei \$file"; +$Lang{Log_File__file__comment} = < +EOF +# -------------------------------- +$Lang{Contents_of_log_file} = <\$file, verändert am \$mtimeStr \$comment +EOF + +# -------------------------------- +$Lang{skipped__skipped_lines} = "[ überspringe \$skipped Zeilen ]\n"; +# -------------------------------- +$Lang{_pre___Can_t_open_log_file__file} = "

    \nKann LOG Datei nicht öffnen \$file\n";
    +
    +# --------------------------------
    +$Lang{BackupPC__Log_File_History} = "BackupServer: LOG Datei Historie";
    +$Lang{Log_File_History__hdr} = <
    +
    +
    +    
    +    
    +\$str
    +
    Datei Größe letzte Änderung
    +EOF + +# ------------------------------- +$Lang{Recent_Email_Summary} = < + + + + + +\$str +
    Empfänger Computer Zeitpunkt Titel
    +EOF + + +# ------------------------------ +$Lang{Browse_backup__num_for__host} = "BackupServer: Browsen des Backups \$num für Computer \$host"; + +# ------------------------------ +$Lang{Restore_Options_for__host} = "BackupServer: Restore Optionen für \$host"; +$Lang{Restore_Options_for__host2} = < +Sie haben die folgenden Dateien/Verzeichnisse von Freigabe \$share selektiert, von Backup Nummer #\$num: +
      +\$fileListStr +
    +

    +Sie haben drei verschiedene Möglichkeiten zur Wiederherstellung (Restore) der Dateien/Verzeichnisse. +Bitte wählen Sie eine der folgenden Möglichkeiten:. +

    +\${h2("Möglichkeit 1: Direct Restore")} +

    +Sie können diese Wiederherstellung starten um die Dateien/Verzeichnisse direkt auf den Computer +\$host wiederherzustellen. Alternativ können Sie einen anderen Computer und/oder Freigabe als Ziel angeben. +

    +Warnung: alle aktuell existierenden Dateien/Verzeichnisse die bereits vorhanden sind +werden überschrieben! (Tip: alternativ eine spezielle Freigabe erstellen mit schreibrecht für den +Backup-User und die wiederhergestellten Dateien/Verzeichnisse durch Stichproben prüfen, ob die beabsichtigte +Wiederherstellung korrekt ist) + +

    + + + +\$hiddenStr + + + + + + + + + + + + + +
    Restore auf Computer
    Restore auf Freigabe
    Restore in Unterverzeichnis
    (relativ zur Freigabe)
    +
    +EOF + +# ------------------------------ +$Lang{Option_2__Download_Zip_archive} = < +Sie können eine ZIP Archiv Datei downloaden, die alle selektierten Dateien/Verzeichnisse +enthält. Mit einer lokalen Anwendung (z.B. WinZIP, WinXP-ZIP-Ordner...) können Sie dann +beliebige Dateien entpacken. +

    +Warnung: Abhängig von der Anzahl und Größe der selektierten +Dateien/Verzeichnisse kann die ZIP Archiv Datei extrem groß bzw. zu groß werden. Der Download kann +sehr lange dauern und der Speicherplatz auf Ihrem PC muß ausreichen. Selektieren Sie +evtl. die Dateien/Verzeichnisse erneut und lassen sehr große und unnötige Dateien weg. +

    +

    + + + +\$hiddenStr + + Archiv relativ zu Pfad + \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} +(andernfalls enthält die Archiv Datei vollständige Pfade). +
    +Kompression (0=aus, 1=schnelle,...,9=höchste) + +
    + +
    +EOF + +# ------------------------------ + +$Lang{Option_2__Download_Zip_archive2} = < +Archive::Zip is not installed so you will not be able to download a +zip archive. +Please ask your system adminstrator to install Archive::Zip from +www.cpan.org. +

    +EOF + + +# ------------------------------ +$Lang{Option_3__Download_Zip_archive} = < +Sie können eine Tar Archiv Datei downloaden, die alle selektierten Dateien/Verzeichnisse +enthält. Mit einer lokalen Anwendung (z.B. tar, WinZIP...) können Sie dann +beliebige Dateien entpacken. +

    +Warnung: Abhängig von der Anzahl und Größe der selektierten +Dateien/Verzeichnisse kann die Tar Archiv Datei extrem groß bzw. zu groß werden. Der Download kann +sehr lange dauern und der Speicherplatz auf Ihrem PC muß ausreichen. Selektieren Sie +evtl. die Dateien/Verzeichnisse erneut und lassen sehr große und unnötige Dateien weg. +

    +

    + + + +\$hiddenStr + + Archiv relativ zu Pfad + \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} +(andernfalls enthält die Archiv Datei vollständige Pfade). +
    + +
    +EOF + + +# ------------------------------ +$Lang{Restore_Confirm_on__host} = "BackupServer: Restore Confirm on \$host"; + +$Lang{Are_you_sure} = < +Sie starten eine direkte Wiederherstellung auf den Computer \$In{hostDest}. +Die folgenden Dateien werden auf die Freigabe \$In{shareDest} wiederhergestellt, vom +Backup Nummer \$num: +

    + + +\$fileListStr +
    Original Datei/VerzeichnisWird wiederhergestellt nach
    + +

    + + + + + + +\$hiddenStr +Wollen Sie das wirklich tun? + + +
    +EOF + + +# -------------------------- +$Lang{Restore_Requested_on__hostDest} = "BackupServer: Wiederherstellung beauftragt auf Computer \$hostDest"; +$Lang{Reply_from_server_was___reply} = < +Die Antwort des BackupServers war: \$reply +

    +Zurück zur \$hostDest home page. +EOF + +# ------------------------- +$Lang{Host__host_Backup_Summary} = "BackupServer: Computer \$host Backup Übersicht"; + +$Lang{Host__host_Backup_Summary2} = < +\$warnStr +

      +\$statusStr +
    + +\${h2("User Aktionen")} +

    +

    + +\$startIncrStr + + +
    + +\${h2("Backup Übersicht")} +

    +Klicken Sie auf die Backup-Nummer um Dateien zu browsen und bei Bedarf wiederherzustellen. + + + + + + + + + +\$str +
    Backup# Typ Filled Start Zeitpunkt Dauer/mins Alter/Tage Server Backup Pfad
    +

    + +\$restoreStr + +\${h2("Xfer Fehler Übersicht - bitte kontrollieren")} +

    + + + + + + + + + +\$errStr +
    Backup# Typ Anzeigen #Xfer Fehler #Dateifehler #Freigabefehler #tar Fehler
    +

    + +\${h2("Datei Größe/Anzahl Wiederverwendungs Übersicht")} +

    +"Bestehende Dateien" bedeutet bereits im Pool vorhanden.
    +"Neue Dateien" bedeutet neu zum Pool hinzugefügt.
    +Leere Dateien und Datei-Fehler sind nicht in den Summen enthalten. + + + + + + + + + + + + + + + + + +\$sizeStr +
    Gesamt Bestehende Dateien Neue Dateien
    Backup# Typ #Dateien Größe/MB MB/sec #Dateien Größe/MB #Dateien Größe/MB
    +

    + +\${h2("Kompression Übersicht")} +

    +Kompressionsergebnisse für bereits im Backup-Pool vorhandene und für neu komprimierte Dateien. + + + + + + + + + + + + + + + +\$compStr +
    vorhandene Dateien neue Dateien
    Backup# Typ Comp Level Größe/MB Comp/MB Comp Größe/MB Comp/MB Comp
    +

    +EOF + +# ------------------------- +$Lang{Error} = "BackupServer: Fehler"; +$Lang{Error____head} = <\$mesg

    +EOF + +# ------------------------- +$Lang{NavSectionTitle_} = "Server"; + +# ------------------------- +$Lang{Backup_browse_for__host} = < + + + +
      +
    • Sie browsen das Backup #\$num, erstellt am \$backupTime + (vor \$backupAge Tagen), +\$filledBackup +
    • Klicken Sie auf ein Verzeichnis um dieses zu durchsuchen. +
    • Klicken Sie auf eine Datei um diese per download wiederherzustellen. +
    + +\${h2("Contents of \${EscHTML(\$dirDisplay)}")} +
    + + + + + +
    + +
    + +
    + \$dirStr +
    +
    + + +
    +
    + + \$fileHeader + \$topCheckAll + \$fileStr + \$checkAll +
    +
    +
    + +
    +
    +EOF + +# ------------------------------ +$Lang{Restore___num_details_for__host} = "BackupServer: Restore #\$num Details für Computer \$host"; + +$Lang{Restore___num_details_for__host2 } = < + + + + + + + + + + + + + + + + + + + +
    Nummer \$Restores[\$i]{num}
    beauftragt von \$RestoreReq{user}
    Auftrag Zeitpunkt \$reqTime
    Ergebnis \$Restores[\$i]{result}
    Fehlermeldung \$Restores[\$i]{errorMsg}
    Quelle Computer \$RestoreReq{hostSrc}
    Quelle Backup Nr. \$RestoreReq{num}
    Quelle Freigabe \$RestoreReq{shareSrc}
    Ziel Computer \$RestoreReq{hostDest}
    Ziel Freigabe \$RestoreReq{shareDest}
    Start Zeitpunkt \$startTime
    Dauer \$duration min
    Anzahl Dateien \$Restores[\$i]{nFiles}
    Größe gesamt \${MB} MB
    Transferrate \$MBperSec MB/sec
    TarCreate Fehler \$Restores[\$i]{tarCreateErrs}
    Xfer Fehler \$Restores[\$i]{xferErrs}
    Xfer LOG Datei +Anzeigen, +Fehler +
    +

    +\${h1("Datei/Verzeichnis Liste")} +

    + + +\$fileListStr +
    Original Datei/Verzeichniswiederhergestellt nach
    +EOF + +# ----------------------------------- +$Lang{Email_Summary} = "BackupServer: e-mail Übersicht"; + +# ----------------------------------- +# !! ERROR messages !! +# ----------------------------------- +$Lang{BackupPC__Lib__new_failed__check_apache_error_log} = "BackupPC::Lib->new failed: überprüfen Sie die apache error_log\n"; +$Lang{Wrong_user__my_userid_is___} = + "Falscher User: meine userid ist \$>, anstatt \$uid" + . "(\$Conf{BackupPCUser})\n"; +$Lang{Only_privileged_users_can_view_PC_summaries} = "Nur berechtigte User können die Computer Übersicht einsehen."; +$Lang{Only_privileged_users_can_stop_or_start_backups} = + "Nur berechtigte User können Backups starten und stoppen für" + . " \${EscHTML(\$host)}."; +$Lang{Invalid_number__num} = "ungültige Nummer \$num"; +$Lang{Unable_to_open__file__configuration_problem} = "kann Datei nicht öffnen \$file: Konfigurationsproblem?"; +$Lang{Only_privileged_users_can_view_log_or_config_files} = "Nur berechtigte User können LOG oder config Dateien einsehen."; +$Lang{Only_privileged_users_can_view_log_files} = "Nur berechtigte User können LOG Dateien einsehen."; +$Lang{Only_privileged_users_can_view_email_summaries} = "Nur berechtigte User können die Email Übersicht einsehen."; +$Lang{Only_privileged_users_can_browse_backup_files} = "Nur berechtigte User können Backup Dateien browsen" + . " für computer \${EscHTML(\$In{host})}."; +$Lang{Empty_host_name} = "Empty host name."; +$Lang{Directory___EscHTML} = "Verzeichnis \${EscHTML(\"\$TopDir/pc/\$host/\$num\")}" + . " ist leer"; +$Lang{Can_t_browse_bad_directory_name2} = "Kann fehlerhaften Verzeichnisnamen nicht browsen" + . " \${EscHTML(\$relDir)}"; +$Lang{Only_privileged_users_can_restore_backup_files} = "Nur berechtigte User können Dateien wiederherstellen" + . " für Computer \${EscHTML(\$In{host})}."; +$Lang{Bad_host_name} = "Falscher Computer Name \${EscHTML(\$host)}"; +$Lang{You_haven_t_selected_any_files__please_go_Back_to} = "Sie haben keine Dateien selektiert; bitte gehen Sie zurück um" + . " Dateien zu selektieren."; +$Lang{Nice_try__but_you_can_t_put} = "Sie dürfen \'..\' nicht in Dateinamen verwenden"; +$Lang{Host__doesn_t_exist} = "Computer \${EscHTML(\$In{hostDest})} existiert nicht"; +$Lang{You_don_t_have_permission_to_restore_onto_host} = "Sie haben keine Berechtigung zum Restore auf Computer" + . " \${EscHTML(\$In{hostDest})}"; +$Lang{Can_t_open_create} = "Kann Datei nicht öffnen oder erstellen " + . "\${EscHTML(\"\$TopDir/pc/\$hostDest/\$reqFileName\")}"; +$Lang{Only_privileged_users_can_restore_backup_files2} = "Nur berechtigte Benutzer dürfen Backup und Restore von Dateien" + . " für Computer \${EscHTML(\$host)} durchführen."; +$Lang{Empty_host_name} = "leerer Computer Name"; +$Lang{Unknown_host_or_user} = "Unbekannter Computer oder User \${EscHTML(\$host)}"; +$Lang{Only_privileged_users_can_view_information_about} = "Nur berechtigte User können Informationen sehen über" + . " Computer \${EscHTML(\$host)}." ; +$Lang{Only_privileged_users_can_view_restore_information} = "Nur berechtigte User können Restore Informationen einsehen."; +$Lang{Restore_number__num_for_host__does_not_exist} = "Restore Nummer \$num für Computer \${EscHTML(\$host)} existiert" + . " nicht."; + +$Lang{Unable_to_connect_to_BackupPC_server} = "Kann keine Verbindung zu BackupPC server herstellen", + "Dieses CGI script (\$MyURL) kann keine Verbindung zu BackupPC" + . " server auf \$Conf{ServerHost} port \$Conf{ServerPort} herstellen. Der Fehler" + . " war: \$err.", + "Möglicherweise ist der BackupPC server Prozess nicht gestartet oder es besteht ein" + . " Konfigurationsfehler. Bitte teilen Sie diese Fehlermeldung dem Systemadministrator mit."; + +$Lang{Can_t_find_IP_address_for} = "Kann IP-Adresse für \${EscHTML(\$host)} nicht finden"; +$Lang{host_is_a_DHCP_host} = < +Solange bis ich \$host mit einer DHCP-Adresse sehe, können Sie diesen Auftrag nur +vom diesem Client Computer aus starten. +EOF + +######################## +# ok you can do it then +######################## + +$Lang{Backup_requested_on_DHCP__host} = "Backup angefordert für DHCP Computer \$host (\$In{hostIP}) durch" + . " \$User von \$ENV{REMOTE_ADDR}"; + +$Lang{Backup_requested_on__host_by__User} = "Backup angefordert für \$host durch \$User"; +$Lang{Backup_stopped_dequeued_on__host_by__User} = "Backup gestoppt/gelöscht für \$host durch \$User"; +$Lang{log_User__User_downloaded_tar_archive_for__host} = "LOG User \$User hat tar Archiv downgeloaded von \$host," + . " Backup \$num; folgende Dateien: " + . " \${join(\", \", \@fileListTrim)}"; + +$Lang{log_User__User_downloaded_zip_archive_for__host}= "LOG User \$User hat zip Archiv downgeloaded von \$host," + . " Backup \$num; folgende Dateien: " + . "\${join(\", \", \@fileListTrim)}"; + +$Lang{Restore_requested_to_host__hostDest__backup___num} = "Restore beauftragt nach Computer \$hostDest, von Backup #\$num," + . " durch User \$User von Client \$ENV{REMOTE_ADDR}"; + +# ------------------------------------------------- +# ------- Stuff that was forgotten ---------------- +# ------------------------------------------------- + +$Lang{Status} = "Status"; +$Lang{PC_Summary} = "Computer Übersicht"; +$Lang{LOG_file} = "LOG Datei"; +$Lang{Old_LOGs} = "Alte LOGs"; +$Lang{Email_summary} = "Email Übersicht"; +$Lang{Config_file} = "Config Datei"; +$Lang{Hosts_file} = "Hosts Datei"; +$Lang{Current_queues} = "Warteschlangen"; +$Lang{Documentation} = "Dokumentation"; + +$Lang{Host_or_User_name} = "Computer oder User Name:"; +$Lang{Go} = "gehe zu"; +$Lang{Hosts} = "Computer"; + +$Lang{This_PC_has_never_been_backed_up} = "

    Dieser Computer wurde nie gesichert!!

    \n"; +$Lang{This_PC_is_used_by} = "
  • Dieser Computer wird betreut von \${UserLink(\$user)}"; + +$Lang{Extracting_only_Errors} = "(Extracting only Errors)"; +$Lang{XferLOG} = "XferLOG"; +$Lang{Errors} = "Errors"; + +# ------------ +$Lang{Last_email_sent_to__was_at___subject} = <Letzte e-mail gesendet an \${UserLink(\$user)} am \$mailTime, Titel "\$subj". +EOF +# ------------ +$Lang{The_command_cmd_is_currently_running_for_started} = <Das Kommando \$cmd wird gerade für Computer \$host ausgeführt, gestartet am \$startTime. +EOF + +# ----------- +$Lang{Host_host_is_queued_on_the_background_queue_will_be_backed_up_soon} = <Computer \$host ist in die Hintergrund-Warteschlange eingereiht (Backup wird bald gestartet). +EOF + +# ---------- +$Lang{Host_host_is_queued_on_the_user_queue__will_be_backed_up_soon} = <Computer \$host ist in die User-Warteschlange eingereiht (Backup wird bald gestartet). +EOF + +# --------- +$Lang{A_command_for_host_is_on_the_command_queue_will_run_soon} = <Ein Kommando für Computer \$host ist in der Kommando-Warteschlange (wird bald ausgeführt). +EOF + +# -------- +$Lang{Last_status_is_state_StatusHost_state_reason_as_of_startTime} = <Letzter Status ist \"\$Lang->{\$StatusHost{state}}\"\$reason vom \$startTime. +EOF + +# -------- +$Lang{Last_error_is____EscHTML_StatusHost_error} = <Letzter Fehler ist \"\${EscHTML(\$StatusHost{error})}\" +EOF + +# ------ +$Lang{Pings_to_host_have_failed_StatusHost_deadCnt__consecutive_times} = <Pings zu Computer \$host sind \$StatusHost{deadCnt} mal fehlgeschlagen. +EOF + +# ----- +$Lang{Prior_to_that__pings} = "vorher, Pings"; + +# ----- +$Lang{priorStr_to_host_have_succeeded_StatusHostaliveCnt_consecutive_times} = <\$priorStr zu Computer \$host \$StatusHost{aliveCnt} + mal fortlaufend erfolgreich. +EOF + +$Lang{Because__host_has_been_on_the_network_at_least__Conf_BlackoutGoodCnt_consecutive_times___} = <Da Computer \$host mindestens \$Conf{BlackoutGoodCnt} +mal fortlaufend erreichbar war, wird er in der Zeit von \$t0 bis \$t1 am \$days nicht gesichert. (Die Sicherung +erfolgt automatisch außerhalb der konfigurierten Betriebszeit) +EOF + +$Lang{Backups_are_deferred_for_hours_hours_change_this_number} = <Backups sind für die nächsten \$hours Stunden deaktiviert. +(diese Zeit ändern). +EOF + +$Lang{tryIP} = " und \$StatusHost{dhcpHostIP}"; + +$Lang{Host_Inhost} = "Computer \$In{host}"; + +$Lang{checkAll} = < + alles auswählen + + + +EOF + +$Lang{fileHeader} = < Name + Typ + Rechte + Backup# + Größe + letzte Änderung + +EOF + +$Lang{Home} = "Home"; +$Lang{Last_bad_XferLOG} = "Letzte bad XferLOG"; +$Lang{Last_bad_XferLOG_errors_only} = "Letzte bad XferLOG (nur Fehler)"; + +$Lang{This_display_is_merged_with_backup} = < Diese Liste ist mit Backup #\$numF verbunden. +EOF + +$Lang{Visit_this_directory_in_backup} = < Dieses Verzeichnis in Backup #\$otherDirs browsen. +EOF + +$Lang{Restore_Summary} = < +Klicken Sie auf die Restore Nummer (Restore#) für mehr Details. + + + + + + + + + + +\$restoreStr +
    Restore# Ergebnis Start Zeitpunkt Dauer/mins #Dateien Größe/MB #tar Fehler #Xfer Fehler
    +

    +EOF + +$Lang{BackupPC__Documentation} = "BackupServer: Dokumentation"; + +$Lang{No} = "nein"; +$Lang{Yes} = "ja"; + +$Lang{The_directory_is_empty} = <Das Verzeichnis \${EscHTML(\$dirDisplay)} ist leer. + +EOF + +#$Lang{on} = "on"; +$Lang{off} = "aus"; + +$Lang{full} = "voll"; +$Lang{incremental} = "incr"; + +$Lang{failed} = "fehler"; +$Lang{success} = "erfolgreich"; +$Lang{and} = "und"; + +# ------ +# Hosts states and reasons +$Lang{Status_idle} = "wartet"; +$Lang{Status_backup_starting} = "Backup startet"; +$Lang{Status_backup_in_progress} = "Backup läuft"; +$Lang{Status_restore_starting} = "Restore startet"; +$Lang{Status_restore_in_progress} = "Restore läuft"; +$Lang{Status_link_pending} = "Link steht an"; +$Lang{Status_link_running} = "Link läuft"; + +$Lang{Reason_backup_done} = "Backup durchgeführt"; +$Lang{Reason_restore_done} = "Restore durchgeführt"; +$Lang{Reason_nothing_to_do} = "kein Auftrag"; +$Lang{Reason_backup_failed} = "Backup Fehler"; +$Lang{Reason_no_ping} = "nicht erreichbar"; +$Lang{Reason_backup_canceled_by_user} = "Abbruch durch User"; + +# --------- +# Email messages + +# No backup ever +$Lang{EMailNoBackupEverSubj} = "BackupServer: keine Backups von \$host waren erfolgreich"; +$Lang{EMailNoBackupEverMesg} = <<'EOF'; +To: $user$domain +cc: +Subject: $subj + +Hallo $userName, + +Ihr Computer ($host) wurde durch den BackupServer noch nie erfolgreich gesichert. + +Backups sollten automatisch erfolgen, wenn Ihr Computer am Netzwerk angschlossen ist. +Sie sollten Ihren Backup-Betreuer oder den IT-Dienstleister kontaktieren, wenn: + + - Ihr Computer regelmäßig am Netzwerk angeschlossen ist. Dann handelt es sich + um ein Installations- bzw. Konfigurationsproblem, was die Durchführung von + automatischen Backups verhindert. + + - Wenn Sie kein automatisches Backup des Computers brauchen und diese e-mail nicht + mehr erhalten möchten. + +Andernfalls sollten Sie sicherstellen, daß Ihr Computer regelmäßig korrekt am Netzwerk +angeschlossen wird. + +Mit freundlichen Grüßen, +Ihr BackupServer +http://backuppc.sourceforge.net +http://www.zipptec.de +EOF + +# No recent backup +$Lang{EMailNoBackupRecentSubj} = "BackupServer: keine neuen Backups für Computer \$host"; +$Lang{EMailNoBackupRecentMesg} = <<'EOF'; +To: $user$domain +cc: +Subject: $subj + +Hallo $userName, + +Ihr Computer ($host) wurde seit $days Tagen nicht mehr erfolgreich gesichert. + +Ihr Computer wurde von vor $firstTime Tagen bis vor $days Tagen $numBackups mal +erfolgreich gesichert. +Backups sollten automatisch erfolgen, wenn Ihr Computer am Netzwerk angschlossen ist. + +Wenn Ihr Computer in den letzten $days Tagen mehr als ein paar Stunden am +Netzwerk angeschlossen war, sollten Sie Ihren Backup-Betreuer oder +den IT-Dienstleister kontaktieren um die Ursache zu ermitteln und zu beheben. +Andernfalls, wenn Sie z. B. lange Zeit nicht im Büro sind, können Sie höchstens +manuell Ihre Dateien sichern (evtl. kopieren auf eine externe Festplatte). + +Bitte denken Sie daran, dass alle in den letzten $days Tagen gänderten Dateien (z. B. +auch e-mails und Anhänge oder Datenbankeinträge) verloren gehen falls Ihre +Festplatte einen crash erleidet oder Dateien durch versehentliches Löschen oder +Virenbefall unbrauchbar werden. + +Mit freundlichen Grüßen, +Ihr BackupServer +http://backuppc.sourceforge.net +http://www.zipptec.de +EOF + +# Old Outlook files +$Lang{EMailOutlookBackupSubj} = "BackupServer: Outlook Dateien auf Computer \$host - Sicherung erforderlich"; +$Lang{EMailOutlookBackupMesg} = <<'EOF'; +To: $user$domain +cc: +Subject: $subj + +Hallo $userName, + +die Outlook Dateien auf Ihrem Computer wurden $howLong Tage nicht gesichert. +Diese Dateien enthalten Ihre e-mails, Anhänge, Adressen und Kalender. + +Ihr Computer wurde zwar $numBackups mal seit $firstTime Tagen bis vor $lastTime Tagen +gesichert. Allerdings sperrt Outlook den Zugriff auf diese Dateien. + +Es wird folgendes Vorgehen empfohlen: + +1. Der Computer muss an das BackupServer Netzwerk angeschlossen sein. +2. Beenden Sie das Outlook Programm. +3. Starten Sie ein incrementelles Backup mit dem Internet-Browser hier: + + $CgiURL?host=$host + + Name und Passwort eingeben und dann 2 mal nacheinander + auf "Starte Backup incrementell" klicken + Klicken Sie auf "Gehe zurück zur ...home page" und beobachten Sie + den Status des Backup-Vorgangs (Browser von Zeit zu Zeit aktualisieren). + Das sollte je nach Dateigröße nur eine kurze Zeit dauern. + + +Mit freundlichen Grüßen, +Ihr BackupServer +http://backuppc.sourceforge.net +http://www.zipptec.de +EOF + +$Lang{howLong_not_been_backed_up} = "Backup nicht erfolgreich"; +$Lang{howLong_not_been_backed_up_for_days_days} = "kein Backup seit \$days Tagen"; + +#end of lang_de.pm diff --git a/lib/BackupPC/Lang/en.pm b/lib/BackupPC/Lang/en.pm index b9a5e4d..5b26015 100644 --- a/lib/BackupPC/Lang/en.pm +++ b/lib/BackupPC/Lang/en.pm @@ -47,8 +47,8 @@ $Lang{BackupPC_Server_Status}= < Start Time Command PID - Xfer PID - \$tarPidHdr + Xfer PID + \$jobStr

    @@ -754,6 +754,10 @@ $Lang{Hosts} = "Hosts"; $Lang{This_PC_has_never_been_backed_up} = "

    This PC has never been backed up!!

    \n"; $Lang{This_PC_is_used_by} = "
  • This PC is used by \${UserLink(\$user)}"; +$Lang{Extracting_only_Errors} = "(Extracting only Errors)"; +$Lang{XferLOG} = "XferLOG"; +$Lang{Errors} = "Errors"; + # ------------ $Lang{Last_email_sent_to__was_at___subject} = <Last email sent to \${UserLink(\$user)} was at \$mailTime, subject "\$subj". diff --git a/lib/BackupPC/Lang/es.pm b/lib/BackupPC/Lang/es.pm index caa3f75..9bf33db 100644 --- a/lib/BackupPC/Lang/es.pm +++ b/lib/BackupPC/Lang/es.pm @@ -1,1006 +1,1010 @@ -#!/bin/perl -T - -#my %lang; - -#use strict; - -# -------------------------------- - -$Lang{Start_Full_Backup} = "Comenzar copia de seguridad completa"; -$Lang{Start_Incr_Backup} = "Comenzar copia de seguridad incremental"; -$Lang{Stop_Dequeue_Backup} = "Parar/anular copia de seguridad"; -$Lang{Restore} = "Restaurar"; - -# ----- - -$Lang{H_BackupPC_Server_Status} = "Estado del Servidor BackupPC"; - -$Lang{BackupPC_Server_Status}= < -\${h2(\"Información General del servidor\")} - -
      -
    • El PID del servidor es \$Info{pid}, en el host \$Conf{ServerHost}, - version \$Info{Version}, iniciado el \$serverStartTime. -
    • Esta información de estado se ha generado el \$now. -
    • La cola de PC´s se activará de nuevo el \$nextWakeupTime. -
    • Información adicional: -
        -
      • \$numBgQueue solicitudes pendientes de copia de seguridad desde la última activación programada, -
      • \$numUserQueue solicitudes pendientes de copia de seguridad de usuarios, -
      • \$numCmdQueue solicitudes de comandos pendientes , - \$poolInfo -
      • El sistema de archivos estaba recientemente al \$Info{DUlastValue}% - (\$DUlastTime), el máximo de hoy es \$Info{DUDailyMax}% (\$DUmaxTime) - y el máximo de ayer era \$Info{DUDailyMaxPrev}%. -
      -
    - -\${h2("Trabajos en Ejecución")} -

    - - - - - - - - - \$tarPidHdr -\$jobStr -
    Host Tipo Usuario Hora de Inicio Comando PID Transfer. PID
    -

    - -\${h2("Fallos que Precisan Atención")} -

    - - - - - - - - -\$statusStr -
    Host Tipo Usuario Ultimo Intento Detalles Hora del error Ultimo error (ping no incluido)
    -EOF - -# -------------------------------- -$Lang{BackupPC__Server_Summary} = "BackupPC: Resumen del Servidor"; -$Lang{BackupPC_Summary}=< -Este status ha sido generado el \$now. -

    - -\${h2("Hosts con Buenas Copias de Seguridad")} -

    -Il y a \$hostCntGood hosts tienen copia de seguridad, de un total de : -

      -
    • \$fullTot copias de seguridad completas con tamaño total de \${fullSizeTot} GB - (antes de agrupar y comprimir), -
    • \$incrTot copias de seguridad incrementales con tamaño total de \${incrSizeTot} GB - (antes de agrupar y comprimir). -
    - - - - - - - - - - - -\$strGood -
    Host Usuario #Completo Completo Antig./Días Completo Tamaño/GB Velocidad MB/sec #Incrementales Incrementales Antig/Días Estado Ultimo Intento
    -

    - -\${h2("Hosts Sin Copias de Seguridad")} -

    -Hay \$hostCntNone hosts sin copias de seguridad. -

    - - - - - - - - - - - -\$strNone -
    Host Usuario #Completo Completo Antig./Días Completo Tamaño/GB Velocidad MB/sec #Incrementales Incrementales Antig/Días Estado Ultimo Intento
    -EOF - -# ----------------------------------- -$Lang{Pool_Stat} = <El grupo tiene \${poolSize}GB incluyendo \$info->{"\${name}FileCnt"} archivos - y \$info->{"\${name}DirCnt"} directorios (as of \$poolTime), -

  • El procesamiento del grupo da \$info->{"\${name}FileCntRep"} archivos - repetidos cuya cadena más larga es \$info->{"\${name}FileRepMax"}, -
  • El proceso de limpieza nocturna ha eliminado \$info->{"\${name}FileCntRm"} archivos de - tamaño \${poolRmSize}GB (around \$poolTime), -EOF - -# -------------------------------- -$Lang{BackupPC__Backup_Requested_on__host} = "BackupPC: Copia de Seguridad Solicitada en \$host"; -# -------------------------------- -$Lang{REPLY_FROM_SERVER} = < -La respuesta del servidor fué: \$reply -

    -Volver a \$host home page. -EOF -# -------------------------------- -$Lang{BackupPC__Start_Backup_Confirm_on__host} = "BackupPC: Confirme inicio de copia de seguridad en \$host"; -# -------------------------------- -$Lang{Are_you_sure_start} = < -Va a hacer comenzar una copia de seguridad \$type en \$host. - -

    - - - -¿Realmente quiere hacer esto? - - -
    -EOF -# -------------------------------- -$Lang{BackupPC__Stop_Backup_Confirm_on__host} = "BackupPC: Confirmación de Parada de Copia de Seguridad en \$host"; -# -------------------------------- -$Lang{Are_you_sure_stop} = < -Está a punto de parar/quitar de la cola las copias de seguridad en \$host; - -
    - - -Asimismo, por favor no empiece otra copia de seguridad durante - horas. -

    -¿Realmente quiere hacer esto? - - -

    - -EOF -# -------------------------------- -$Lang{Only_privileged_users_can_view_queues_} = "Sólo los administradores pueden ver las colas."; -# -------------------------------- -$Lang{BackupPC__Queue_Summary} = "BackupPC: Resumen de la Cola"; -# -------------------------------- -$Lang{Backup_Queue_Summary} = < -\${h2("Resumen de la Cola de Usuarios")} -

    -Las siguientes solicitudes de usuarios están actualmente en cola: - - - - -\$strUser -
    Host Hora Sol. Usuario
    -

    - -\${h2("Resumen de Cola en Segundo Plano")} -

    -Las siguientes solicitudes en segundo plano están actualmente en cola: - - - - -\$strBg -
    Host Hora Sol. Usuario
    -

    - -\${h2("Resumen de Cola de Comandos")} -

    -Los siguientes comandos están actualmente en cola: - - - - - -\$strCmd -
    Host Hora Sol. Usuario Comando
    -EOF - -# -------------------------------- -$Lang{Backup_PC__Log_File__file} = "BackupPC: Archivo de Registro \$file"; -$Lang{Log_File__file__comment} = < -EOF -# -------------------------------- -$Lang{Contents_of_log_file} = <\$file, modificado \$mtimeStr \$comment -EOF - -# -------------------------------- -$Lang{skipped__skipped_lines} = "[ saltadas \$skipped lineas ]\n"; -# -------------------------------- -$Lang{_pre___Can_t_open_log_file__file} = "

    \nNo puedo abrir el archivo de registro \$file\n";
    -
    -# --------------------------------
    -$Lang{BackupPC__Log_File_History} = "BackupPC: Historial de Archivo de Registro";
    -$Lang{Log_File_History__hdr} = <
    -
    -
    -    
    -    
    -\$str
    -
    File Size Hora Modificación
    -EOF - -# ------------------------------- -$Lang{Recent_Email_Summary} = < - - - - - -\$str -
    Destinatario Host Hora Asunto
    -EOF - - -# ------------------------------ -$Lang{Browse_backup__num_for__host} = "BackupPC: Hojear copia de seguridad \$num de \$host"; - -# ------------------------------ -$Lang{Restore_Options_for__host} = "BackupPC: Opciones de restauración para \$host"; -$Lang{Restore_Options_for__host2} = < -Ha seleccionado los siguientes archivos/directorios de -la unidad \$share, copia número #\$num: -
      -\$fileListStr -
    -

    -Tiene tres opciones para restaurar estos archivos/directorios. -Por favor, seleccione una de las siguientes opciones. -

    -\${h2("Opción 1: Restauración Directa")} -

    -Puede empezar un proceso que restaurará estos archivos directamente en -\$host. -

    -¡Atención!: ¡Cualquier archivo existente con el mismo nombre que los que ha -seleccionado será sobreescrito! - -

    - - - -\$hiddenStr - - - - - - - - - - - - - -
    Restaurar los archivos al host
    Restaurar los archivos a la unidad
    Restaurar los archivos bajo el directorio
    (relativo a la unidad)
    -
    -EOF - -# ------------------------------ -$Lang{Option_2__Download_Zip_archive} = < -Puede descargar un archivo comprimido (.zip) conteniendo todos los archivos y directorios que -ha seleccionado. Después puede hacer uso de una aplicación local, como WinZip, -para ver o extraer cualquiera de los archivos. -

    -¡Atención!: Dependiendo de que archivos/carpetas haya seleccionado, -este archivo puede ser muy grande. Podría tardar muchos minutos -crear y transferir el archivo. Además necesitará suficiente espacio el el disco -local para almacenarlo. -

    -

    - - - -\$hiddenStr - - Hacer archivo relativo -a \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} -(en caso contrario el archivo contendrá las rutas completas). -
    -Compresión (0=desactivada, 1=rápida,...,9=máxima) - -
    - -
    -EOF - -# ------------------------------ - -$Lang{Option_2__Download_Zip_archive2} = < -El programa Archive::Zip no está instalado, de modo que no podrá descargar un -archivo comprimido zip. -Por favor, solicite a su administrador de sistemas que instale Archive::Zip de -www.cpan.org. -

    -EOF - - -# ------------------------------ -$Lang{Option_3__Download_Zip_archive} = < -Puede descargar un archivo comprimido (.Tar) conteniendo todos los archivos y -directorios que ha seleccionado. Después puede hacer uso de una aplicación -local, como Tar o WinZip,para ver o extraer cualquiera de los archivos. -

    -¡Atención!: Dependiendo de que archivos/carpetas haya seleccionado, -este archivo puede ser muy grande. Podría tardar muchos minutos -crear y transferir el archivo. Además necesitará suficiente espacio el el disco -local para almacenarlo. -

    -

    - - - -\$hiddenStr - - Hacer el archivo -relativo a \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} -(en caso contrario el archivo contendrá las rutas completas). -
    - -
    -EOF - - -# ------------------------------ -$Lang{Restore_Confirm_on__host} = "BackupPC: Restore Confirm on \$host"; - -$Lang{Are_you_sure} = < -Está a punto de comenzar una restauración directamente a la máquina \$In{hostDest}. -Los siguientes archivos serán restaurados en la unidad \$In{shareDest}, de -la copia de seguridad número \$num: -

    - - -\$fileListStr -
    Archivo/Dir Original Será restaurado a
    - -

    - - - - - - -\$hiddenStr -Do you really want to do this? - - -
    -EOF - - -# -------------------------- -$Lang{Restore_Requested_on__hostDest} = "BackupPC: Restauración solicitada en \$hostDest"; -$Lang{Reply_from_server_was___reply} = < -La respuesta del servidor fué: \$reply -

    -Go back to \$hostDest home page. -EOF - -# ------------------------- -$Lang{Host__host_Backup_Summary} = "BackupPC: Host \$host Resumen de Copia de Seguridad"; - -$Lang{Host__host_Backup_Summary2} = < -\$warnStr -

      -\$statusStr -
    - -\${h2("Acciones del Usuario")} -

    -

    - -\$startIncrStr - - -
    - -\${h2("Resumen de Copia de Seguridad")} -

    -Haga click en el número de copia de seguridad para revisar y restaurar archivos. - - - - - - - - - -\$str -
    Copia Nº Tipo Completo Fecha Inicio Duracion/mn Antigüedad/dias Ruta a la Copia en el Servidor
    -

    - -\$restoreStr - -\${h2("Resumen de Errores de Transferencia")} -

    - - - - - - - - - -\$errStr -
    Copia Nº Tipo Ver Nº Xfer errs Nº err. archivos Nº err. unidades Nº err. tar
    -

    - -\${h2("Resumen de Total/Tamaño de Archivos Reutilizados")} -

    -Los archivos existentes son aquellos que ya están en el lote; los nuevos son -aquellos que se han añadido al lote. -Los archivos vacíos y los errores SMB no cuentan en las cifras de reutilizados -ni en la de nuevos. - - - - - - - - - - - - - - - - - -\$sizeStr -
    Totales Archivos Existentes Archivos Nuevos
    Copia Nº Tipo Nº Archivos Tamaño/MB MB/sg Nº Archivos Tamaño/MB Nº Archivos Tamaño/MB
    -

    - -\${h2("Resumen de Compresión")} -

    -Efectividad de compresión para los archivos ya existentes en el lote y los -archivos nuevos comprimidos. - - - - - - - - - - - - - - - -\$compStr -
    Archivos Existentes Archivos Nuevos
    Copia Nº Tipo Nivel Comp Tamaño/MB Comp/MB Comp Tamaño/MB Comp/MB Comp
    -

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

    -EOF - -# ------------------------- -$Lang{NavSectionTitle_} = "Servidor"; - -# ------------------------- -$Lang{Backup_browse_for__host} = < - - - -
      -
    • Está revisando la copia de seguridad Nº\$num, que comenzó hacia las \$backupTime - (hace \$backupAge dias), -\$filledBackup -
    • Haga click en uno de los directorios de abajo para revisar sus contenidos, -
    • Haga click en un archivo para restaurarlo. -
    - -\${h2("Contenido de \${EscHTML(\$dirDisplay)}")} -
    - - - - - -
    - -
    - -
    - \$dirStr -
    -
    - - -
    -
    - - \$fileHeader - \$topCheckAll - \$fileStr - \$checkAll -
    -
    -
    - -
    -
    -EOF - -# ------------------------------ -$Lang{Restore___num_details_for__host} = "BackupPC: Detalles de la restauración Nº\$num de \$host"; - -$Lang{Restore___num_details_for__host2 } = < - - - - - - - - - - - - - - - - - - - -
    Número \$Restores[\$i]{num}
    Solicitado por \$RestoreReq{user}
    Hora Petición \$reqTime
    Resultado \$Restores[\$i]{result}
    Mensaje de Error \$Restores[\$i]{errorMsg}
    Host Origen \$RestoreReq{hostSrc}
    Nº copia origen \$RestoreReq{num}
    Unidad origen \$RestoreReq{shareSrc}
    Host destino \$RestoreReq{hostDest}
    Unidad destino \$RestoreReq{shareDest}
    Hora comienzo \$startTime
    Duración \$duration min
    Número de archivos \$Restores[\$i]{nFiles}
    Tamaño total \${MB} MB
    Tasa de transferencia \$MBperSec MB/sec
    Errores creación Tar \$Restores[\$i]{tarCreateErrs}
    Errores de transferencia \$Restores[\$i]{xferErrs}
    Archivo registro de transferencia -View, -Errors -
    -

    -\${h1("Lista de Archivos/Directorios")} -

    - - -\$fileListStr -
    Dir/archivo originalRestaurado a
    -EOF - -# ----------------------------------- -$Lang{Email_Summary} = "BackupPC: Resumen de Correos"; - -# ----------------------------------- -# !! ERROR messages !! -# ----------------------------------- -$Lang{BackupPC__Lib__new_failed__check_apache_error_log} = "BackupPC::Lib->nuevo ha fallado: revise el error_log de apache\n"; -$Lang{Wrong_user__my_userid_is___} = - "Usuario erróneo: mi userid es \$>, en lugar de \$uid" - . "(\$Conf{BackupPCUser})\n"; -$Lang{Only_privileged_users_can_view_PC_summaries} = "Sólo los usuarios autorizados pueden ver los resúmenes de PC´s."; -$Lang{Only_privileged_users_can_stop_or_start_backups} = - "Sólo los usuarios autorizados pueden comenzar a detener las copias" - . " \${EscHTML(\$host)}."; -$Lang{Invalid_number__num} = "Número no válido \$num"; -$Lang{Unable_to_open__file__configuration_problem} = "No puedo abrir \$file: ¿problema de configuración?"; -$Lang{Only_privileged_users_can_view_log_or_config_files} = "Sólo los usuarios autorizados pueden ver registros o archivos de configuración."; -$Lang{Only_privileged_users_can_view_log_files} = "Sólo los usuarios autorizados pueden ver archivos de registro."; -$Lang{Only_privileged_users_can_view_email_summaries} = "Sólo los usuarios autorizados pueden ver resúmenes de correo."; -$Lang{Only_privileged_users_can_browse_backup_files} = "Sólo los usuarios autorizados pueden revisar los archivos de las copias de seguridad" - . " for host \${EscHTML(\$In{host})}."; -$Lang{Empty_host_name} = "Número de host vacío."; -$Lang{Directory___EscHTML} = "El directorio \${EscHTML(\"\$TopDir/pc/\$host/\$num\")}" - . " está vacío"; -$Lang{Can_t_browse_bad_directory_name2} = "No puedo mostrar un nombre de directorio erróneo" - . " \${EscHTML(\$relDir)}"; -$Lang{Only_privileged_users_can_restore_backup_files} = "Sólo los usuarios autorizados pueden restaurar copias de seguridad" - . " para el host \${EscHTML(\$In{host})}."; -$Lang{Bad_host_name} = "Nombre de host erróneo \${EscHTML(\$host)}"; -$Lang{You_haven_t_selected_any_files__please_go_Back_to} = "No ha seleccionado nigún archivo; por favor, vuelva a" - . " seleccione algunos archivos."; -$Lang{Nice_try__but_you_can_t_put} = "Buen intento, pero no puede usar \'..\' en los nombres de archivo"; -$Lang{Host__doesn_t_exist} = "El Host \${EscHTML(\$In{hostDest})} no existe"; -$Lang{You_don_t_have_permission_to_restore_onto_host} = "No tiene autorización para restaurar en el host" - . " \${EscHTML(\$In{hostDest})}"; -$Lang{Can_t_open_create} = "No puedo abrir/crear " - . "\${EscHTML(\"\$TopDir/pc/\$hostDest/\$reqFileName\")}"; -$Lang{Only_privileged_users_can_restore_backup_files2} = "Sólo los usuarios autorizados pueden restaurar copias de seguridad" - . " del host \${EscHTML(\$host)}."; -$Lang{Empty_host_name} = "Nombre de host vacío"; -$Lang{Unknown_host_or_user} = "Unknown host or user \${EscHTML(\$host)}"; -$Lang{Only_privileged_users_can_view_information_about} = "Sólo los usuarios autorizados pueden ver información del" - . " host \${EscHTML(\$host)}." ; -$Lang{Only_privileged_users_can_view_restore_information} = "Sólo los usuarios autorizados pueden ver información de restauración."; -$Lang{Restore_number__num_for_host__does_not_exist} = "El número de restauración \$num del host \${EscHTML(\$host)} " - . " no existe."; - -$Lang{Unable_to_connect_to_BackupPC_server} = "Imposible conectar al servidor BackupPC", - "Este script CGI (\$MyURL) no puede conectar al servidor BackupPC" - . " en \$Conf{ServerHost} puerto \$Conf{ServerPort}. El error" - . " fué: \$err.", - "Quizá el servidor BackupPC no está activo o hay un " - . " error de configuración. Por favor informe a su administrador de sistemas."; - -$Lang{Can_t_find_IP_address_for} = "No puedo encontrar la dirección IP de \${EscHTML(\$host)}"; -$Lang{host_is_a_DHCP_host} = < -Hasta que vea \$host en una dirección DHCP concreta, sólo puede -comenzar este proceso desde la propia máquina cliente. -EOF - -######################## -# ok you can do it then -######################## - -$Lang{Backup_requested_on_DHCP__host} = "Copia de seguridad solicitada en DHCP \$host (\$In{hostIP}) por" - . " \$User desde \$ENV{REMOTE_ADDR}"; - -$Lang{Backup_requested_on__host_by__User} = "Copia de seguridad solicitada en \$host por \$User"; -$Lang{Backup_stopped_dequeued_on__host_by__User} = "Copia de seguridad detenida/desprogramada en \$host por \$User"; -$Lang{log_User__User_downloaded_tar_archive_for__host} = "El usuario del registro \$User ha descargado un archivo Tar para \$host," - . " copia de seguridad \$num; los archivos eran: " - . " \${join(\", \", \@fileListTrim)}"; - -$Lang{log_User__User_downloaded_zip_archive_for__host}= "El usuario del registro \$User ha descargado un archivo Zip para \$host," - . " copia de seguridad \$num; los archivos eran: " - . "\${join(\", \", \@fileListTrim)}"; - -$Lang{Restore_requested_to_host__hostDest__backup___num} = "Restauración solicitada para el host \$hostDest, copia de seguridad #\$num," - . " por \$User desde \$ENV{REMOTE_ADDR}"; - -# ------------------------------------------------- -# ------- Stuff that was forgotten ---------------- -# ------------------------------------------------- - -$Lang{Status} = "Estado"; -$Lang{PC_Summary} = "Resumen PC"; -$Lang{LOG_file} = "Archivo Registro"; -$Lang{Old_LOGs} = "Registros antiguos"; -$Lang{Email_summary} = "Resumen correo"; -$Lang{Config_file} = "Archivo configuración"; -$Lang{Hosts_file} = "Archivo Hosts"; -$Lang{Current_queues} = "Colas actuales"; -$Lang{Documentation} = "Documentación"; - -$Lang{Host_or_User_name} = "Host o usuario:"; -$Lang{Go} = "Aceptar"; -$Lang{Hosts} = "Hosts"; - -$Lang{This_PC_has_never_been_backed_up} = "

    !Nunca se ha hecho copia de seguridad de este PC!

    \n"; -$Lang{This_PC_is_used_by} = "
  • This PC es utilizado por \${UserLink(\$user)}"; - -# ------------ -$Lang{Last_email_sent_to__was_at___subject} = <El último mensaje enviado a \${UserLink(\$user)} fué a las \$mailTime, asunto "\$subj". -EOF -# ------------ -$Lang{The_command_cmd_is_currently_running_for_started} = <El comando \$cmd está ejecutandose para \$host, comenzado a \$startTime. -EOF - -# ----------- -$Lang{Host_host_is_queued_on_the_background_queue_will_be_backed_up_soon} = <El host \$host está en cola en la cola en segundo plano (pronto tendrá copia de seguridad). -EOF - -# ---------- -$Lang{Host_host_is_queued_on_the_user_queue__will_be_backed_up_soon} = <Host \$host está en cola en la cola de usuarios (pronto tendrá copia de seguridad). -EOF - -# --------- -$Lang{A_command_for_host_is_on_the_command_queue_will_run_soon} = <Un comando para \$host está en la cola de comandos (se ejecutará pronto). -EOF - -# -------- -$Lang{Last_status_is_state_StatusHost_state_reason_as_of_startTime} = <El último estado fué \"\$Lang->{\$StatusHost{state}}\"\$reason a las \$startTime. -EOF - -# -------- -$Lang{Last_error_is____EscHTML_StatusHost_error} = <El último error fué \"\${EscHTML(\$StatusHost{error})}\" -EOF - -# ------ -$Lang{Pings_to_host_have_failed_StatusHost_deadCnt__consecutive_times} = <Los pings a \$host han fallado \$StatusHost{deadCnt} veces consecutivas. -EOF - -# ----- -$Lang{Prior_to_that__pings} = "Antes de eso, pings"; - -# ----- -$Lang{priorStr_to_host_have_succeeded_StatusHostaliveCnt_consecutive_times} = <\$priorStr a \$host han tenido éxito \$StatusHost{aliveCnt} - veces consecutivas. -EOF - -$Lang{Because__host_has_been_on_the_network_at_least__Conf_BlackoutGoodCnt_consecutive_times___} = <Dado que \$host ha estado en la red al menos \$Conf{BlackoutGoodCnt} -veces consecutivas, no se le realizará copia de seguridad desde \$t0 hasta \$t1 en \$days. -EOF - -$Lang{Backups_are_deferred_for_hours_hours_change_this_number} = <Las copias de seguridad se retrasarán durante \$hours hours -(Cambie este número). -EOF - -$Lang{tryIP} = " y \$StatusHost{dhcpHostIP}"; - -$Lang{Host_Inhost} = "Host \$In{host}"; - -$Lang{checkAll} = < - Seleccionar todo - - - -EOF - -$Lang{fileHeader} = < Nombre - Tipo - Modo - Nº - Tamaño - Hora Mod. - -EOF - -$Lang{Home} = "Principal"; -$Lang{Last_bad_XferLOG} = "Ultimo error en registro de transferencia"; -$Lang{Last_bad_XferLOG_errors_only} = "Ultimo error en registro de transferencia (errores sólo)"; - -$Lang{This_display_is_merged_with_backup} = < Esta pantalla está unida a la copia de seguridad Nº\$numF. -EOF - -$Lang{Visit_this_directory_in_backup} = < Explorar este directorio en copia de seguridad Nº\$otherDirs. -EOF - -$Lang{Restore_Summary} = < -Haga click en el número de restauración para ver sus detalles. - - - - - - - - - - -\$restoreStr -
    Restauración Nº Resultado Fecha Inicio Dur/mins Nº Archivos MB Nº Err. Tar Nº Err. Transf.#xferErrs
    -

    -EOF - -$Lang{BackupPC__Documentation} = "BackupPC: Documentacion"; - -$Lang{No} = "no"; -$Lang{Yes} = "si"; - -$Lang{The_directory_is_empty} = <El directorio \${EscHTML(\$dirDisplay)} está vacio - -EOF - -#$Lang{on} = "activo"; -$Lang{off} = "inactivo"; - -$Lang{full} = "completo"; -$Lang{incremental} = "incremental"; - -$Lang{failed} = "fallido"; -$Lang{success} = "éxito"; -$Lang{and} = "y"; - -# ------ -# Hosts states and reasons -$Lang{Status_idle} = "inactivo"; -$Lang{Status_backup_starting} = "comenzando copia de seguridad"; -$Lang{Status_backup_in_progress} = "copia de seguridad ejecutándose"; -$Lang{Status_restore_starting} = "comenzando restauración"; -$Lang{Status_restore_in_progress} = "restauración ejecutándose"; -$Lang{Status_link_pending} = "conexión pendiente"; -$Lang{Status_link_running} = "conexión en curso"; - -$Lang{Reason_backup_done} = "copia de seguridad realizada"; -$Lang{Reason_restore_done} = "restauración realizada"; -$Lang{Reason_nothing_to_do} = "nada por hacer"; -$Lang{Reason_backup_failed} = "copia de seguridad fallida"; -$Lang{Reason_no_ping} = "no hay ping"; -$Lang{Reason_backup_canceled_by_user} = "copia cancelada por el usuario"; - -# --------- -# Email messages - -# No backup ever -$Lang{EMailNoBackupEverSubj} = "BackupPC: ningúna copia de \$host ha tenido éxito"; -$Lang{EMailNoBackupEverMesg} = <<'EOF'; -To: $user$domain -cc: -Subject: $subj - -Estimado $userName, - -Su PC ($host) nunca ha completado una copia de seguridad mediante nuestro -programa de copias de seguridad. Las copias de seguridad deberían ejecutarse -automáticamente cuando su PC se conecta a la red. Debería contactar con su -soporte técnico si: - - - Su ordenador ha estado conectado a la red con regularidad. Esto implicaría - que existe algún problema de instalación o configuración que impide que se - realicen las copias de seguridad. - - - No desea realizar copias de seguridad y no quiere recibir más mensajes - como éste. - -De no ser así, asegúrese de que su PC está conectado a la red la próxima vez -que esté en la oficina. - -Saludos: -Agente BackupPC -http://backuppc.sourceforge.net -EOF - -# No recent backup -$Lang{EMailNoBackupRecentSubj} = "BackupPC: no hay copias de seguridad recientes de \$host"; -$Lang{EMailNoBackupRecentMesg} = <<'EOF'; -To: $user$domain -cc: -Subject: $subj - -Estimado $userName, - -No se ha podido completar ninguna copia de seguridad de su PC ($host) durante -$days días. -Su PC ha realizado copias de seguridad correctas $numBackups veces desde -$firstTime hasta hace $days días. -Las copias de seguridad deberían efectuarse automáticamente cuando su PC está -conectado a la red. - -Si su PC ha estado conectado durante algunas horas a la red durante los últimos -$days días debería contactar con su soporte técnico para ver porqué las copias -de seguridad no funcionan adecuadamente. - -Por otro lado, si está fuera de la oficina, no hay mucho que se pueda hacer al -respecto salvo copiar manualmente los archivos especialmente críticos a otro -soporte físico. Debería estar al corriente de que cualquier archivo que haya -creado o modificado en los últimos $days días (incluyendo todo el correo nuevo -y archivos adjuntos) no pueden ser restaurados si su disco se avería. - -Saludos: -Agente BackupPC -http://backuppc.sourceforge.net -EOF - -# Old Outlook files -$Lang{EMailOutlookBackupSubj} = "BackupPC: Los archivos de Outlook de \$host necesitan ser copiados"; -$Lang{EMailOutlookBackupMesg} = <<'EOF'; -To: $user$domain -cc: -Subject: $subj - -Estimado $userName, - -Los archivos de Outlook de su PC tienen $howLong. -Estos archivos contienen todo su correo, adjuntos, contactos e información de -su agenda. Su PC ha sido correctamente salvaguardado $numBackups veces desde -$firstTime hasta hace $lastTime días. Sin embargo, Outlook bloquea todos sus -archivos mientras funciona, impidiendo que pueda hacerse copia de seguridad de -los mismos. - -Se le recomienda hacer copia de seguridad de los archivos de Outlook cuando esté -conectado a la red cerrando Outlook y el resto de aplicaciones y utilizando su -navegador de internet. Haga click en este vínculo: - - $CgiURL?host=$host - -Seleccione "Comenzar copia de seguridad incremental" dos veces para comenzar -una neva copia de seguridad incremental. -Puede seleccionar "Volver a la página de $host " y hacer click en "refrescar" -para ver el estado del proceso de copia de seguridad. Debería llevarle sólo -unos minutos completar el proceso. - -Saludos: -Agente BackupPC -http://backuppc.sourceforge.net -EOF - -$Lang{howLong_not_been_backed_up} = "no se le ha realizado una copia de seguridad con éxito"; -$Lang{howLong_not_been_backed_up_for_days_days} = "no se le ha realizado una copia de seguridad durante \$days días"; - -#end of lang_en.pm +#!/bin/perl -T + +#my %lang; + +#use strict; + +# -------------------------------- + +$Lang{Start_Full_Backup} = "Comenzar copia de seguridad completa"; +$Lang{Start_Incr_Backup} = "Comenzar copia de seguridad incremental"; +$Lang{Stop_Dequeue_Backup} = "Parar/anular copia de seguridad"; +$Lang{Restore} = "Restaurar"; + +# ----- + +$Lang{H_BackupPC_Server_Status} = "Estado del Servidor BackupPC"; + +$Lang{BackupPC_Server_Status}= < +\${h2(\"Información General del servidor\")} + +

      +
    • El PID del servidor es \$Info{pid}, en el host \$Conf{ServerHost}, + version \$Info{Version}, iniciado el \$serverStartTime. +
    • Esta información de estado se ha generado el \$now. +
    • La cola de PC´s se activará de nuevo el \$nextWakeupTime. +
    • Información adicional: +
        +
      • \$numBgQueue solicitudes pendientes de copia de seguridad desde la última activación programada, +
      • \$numUserQueue solicitudes pendientes de copia de seguridad de usuarios, +
      • \$numCmdQueue solicitudes de comandos pendientes , + \$poolInfo +
      • El sistema de archivos estaba recientemente al \$Info{DUlastValue}% + (\$DUlastTime), el máximo de hoy es \$Info{DUDailyMax}% (\$DUmaxTime) + y el máximo de ayer era \$Info{DUDailyMaxPrev}%. +
      +
    + +\${h2("Trabajos en Ejecución")} +

    + + + + + + + + + +\$jobStr +
    Host Tipo Usuario Hora de Inicio Comando PID Transfer. PID
    +

    + +\${h2("Fallos que Precisan Atención")} +

    + + + + + + + + +\$statusStr +
    Host Tipo Usuario Ultimo Intento Detalles Hora del error Ultimo error (ping no incluido)
    +EOF + +# -------------------------------- +$Lang{BackupPC__Server_Summary} = "BackupPC: Resumen del Servidor"; +$Lang{BackupPC_Summary}=< +Este status ha sido generado el \$now. +

    + +\${h2("Hosts con Buenas Copias de Seguridad")} +

    +Il y a \$hostCntGood hosts tienen copia de seguridad, de un total de : +

      +
    • \$fullTot copias de seguridad completas con tamaño total de \${fullSizeTot} GB + (antes de agrupar y comprimir), +
    • \$incrTot copias de seguridad incrementales con tamaño total de \${incrSizeTot} GB + (antes de agrupar y comprimir). +
    + + + + + + + + + + + +\$strGood +
    Host Usuario #Completo Completo Antig./Días Completo Tamaño/GB Velocidad MB/sec #Incrementales Incrementales Antig/Días Estado Ultimo Intento
    +

    + +\${h2("Hosts Sin Copias de Seguridad")} +

    +Hay \$hostCntNone hosts sin copias de seguridad. +

    + + + + + + + + + + + +\$strNone +
    Host Usuario #Completo Completo Antig./Días Completo Tamaño/GB Velocidad MB/sec #Incrementales Incrementales Antig/Días Estado Ultimo Intento
    +EOF + +# ----------------------------------- +$Lang{Pool_Stat} = <El grupo tiene \${poolSize}GB incluyendo \$info->{"\${name}FileCnt"} archivos + y \$info->{"\${name}DirCnt"} directorios (as of \$poolTime), +

  • El procesamiento del grupo da \$info->{"\${name}FileCntRep"} archivos + repetidos cuya cadena más larga es \$info->{"\${name}FileRepMax"}, +
  • El proceso de limpieza nocturna ha eliminado \$info->{"\${name}FileCntRm"} archivos de + tamaño \${poolRmSize}GB (around \$poolTime), +EOF + +# -------------------------------- +$Lang{BackupPC__Backup_Requested_on__host} = "BackupPC: Copia de Seguridad Solicitada en \$host"; +# -------------------------------- +$Lang{REPLY_FROM_SERVER} = < +La respuesta del servidor fué: \$reply +

    +Volver a \$host home page. +EOF +# -------------------------------- +$Lang{BackupPC__Start_Backup_Confirm_on__host} = "BackupPC: Confirme inicio de copia de seguridad en \$host"; +# -------------------------------- +$Lang{Are_you_sure_start} = < +Va a hacer comenzar una copia de seguridad \$type en \$host. + +

    + + + +¿Realmente quiere hacer esto? + + +
    +EOF +# -------------------------------- +$Lang{BackupPC__Stop_Backup_Confirm_on__host} = "BackupPC: Confirmación de Parada de Copia de Seguridad en \$host"; +# -------------------------------- +$Lang{Are_you_sure_stop} = < +Está a punto de parar/quitar de la cola las copias de seguridad en \$host; + +
    + + +Asimismo, por favor no empiece otra copia de seguridad durante + horas. +

    +¿Realmente quiere hacer esto? + + +

    + +EOF +# -------------------------------- +$Lang{Only_privileged_users_can_view_queues_} = "Sólo los administradores pueden ver las colas."; +# -------------------------------- +$Lang{BackupPC__Queue_Summary} = "BackupPC: Resumen de la Cola"; +# -------------------------------- +$Lang{Backup_Queue_Summary} = < +\${h2("Resumen de la Cola de Usuarios")} +

    +Las siguientes solicitudes de usuarios están actualmente en cola: + + + + +\$strUser +
    Host Hora Sol. Usuario
    +

    + +\${h2("Resumen de Cola en Segundo Plano")} +

    +Las siguientes solicitudes en segundo plano están actualmente en cola: + + + + +\$strBg +
    Host Hora Sol. Usuario
    +

    + +\${h2("Resumen de Cola de Comandos")} +

    +Los siguientes comandos están actualmente en cola: + + + + + +\$strCmd +
    Host Hora Sol. Usuario Comando
    +EOF + +# -------------------------------- +$Lang{Backup_PC__Log_File__file} = "BackupPC: Archivo de Registro \$file"; +$Lang{Log_File__file__comment} = < +EOF +# -------------------------------- +$Lang{Contents_of_log_file} = <\$file, modificado \$mtimeStr \$comment +EOF + +# -------------------------------- +$Lang{skipped__skipped_lines} = "[ saltadas \$skipped lineas ]\n"; +# -------------------------------- +$Lang{_pre___Can_t_open_log_file__file} = "

    \nNo puedo abrir el archivo de registro \$file\n";
    +
    +# --------------------------------
    +$Lang{BackupPC__Log_File_History} = "BackupPC: Historial de Archivo de Registro";
    +$Lang{Log_File_History__hdr} = <
    +
    +
    +    
    +    
    +\$str
    +
    File Size Hora Modificación
    +EOF + +# ------------------------------- +$Lang{Recent_Email_Summary} = < + + + + + +\$str +
    Destinatario Host Hora Asunto
    +EOF + + +# ------------------------------ +$Lang{Browse_backup__num_for__host} = "BackupPC: Hojear copia de seguridad \$num de \$host"; + +# ------------------------------ +$Lang{Restore_Options_for__host} = "BackupPC: Opciones de restauración para \$host"; +$Lang{Restore_Options_for__host2} = < +Ha seleccionado los siguientes archivos/directorios de +la unidad \$share, copia número #\$num: +
      +\$fileListStr +
    +

    +Tiene tres opciones para restaurar estos archivos/directorios. +Por favor, seleccione una de las siguientes opciones. +

    +\${h2("Opción 1: Restauración Directa")} +

    +Puede empezar un proceso que restaurará estos archivos directamente en +\$host. +

    +¡Atención!: ¡Cualquier archivo existente con el mismo nombre que los que ha +seleccionado será sobreescrito! + +

    + + + +\$hiddenStr + + + + + + + + + + + + + +
    Restaurar los archivos al host
    Restaurar los archivos a la unidad
    Restaurar los archivos bajo el directorio
    (relativo a la unidad)
    +
    +EOF + +# ------------------------------ +$Lang{Option_2__Download_Zip_archive} = < +Puede descargar un archivo comprimido (.zip) conteniendo todos los archivos y directorios que +ha seleccionado. Después puede hacer uso de una aplicación local, como WinZip, +para ver o extraer cualquiera de los archivos. +

    +¡Atención!: Dependiendo de que archivos/carpetas haya seleccionado, +este archivo puede ser muy grande. Podría tardar muchos minutos +crear y transferir el archivo. Además necesitará suficiente espacio el el disco +local para almacenarlo. +

    +

    + + + +\$hiddenStr + + Hacer archivo relativo +a \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} +(en caso contrario el archivo contendrá las rutas completas). +
    +Compresión (0=desactivada, 1=rápida,...,9=máxima) + +
    + +
    +EOF + +# ------------------------------ + +$Lang{Option_2__Download_Zip_archive2} = < +El programa Archive::Zip no está instalado, de modo que no podrá descargar un +archivo comprimido zip. +Por favor, solicite a su administrador de sistemas que instale Archive::Zip de +www.cpan.org. +

    +EOF + + +# ------------------------------ +$Lang{Option_3__Download_Zip_archive} = < +Puede descargar un archivo comprimido (.Tar) conteniendo todos los archivos y +directorios que ha seleccionado. Después puede hacer uso de una aplicación +local, como Tar o WinZip,para ver o extraer cualquiera de los archivos. +

    +¡Atención!: Dependiendo de que archivos/carpetas haya seleccionado, +este archivo puede ser muy grande. Podría tardar muchos minutos +crear y transferir el archivo. Además necesitará suficiente espacio el el disco +local para almacenarlo. +

    +

    + + + +\$hiddenStr + + Hacer el archivo +relativo a \${EscHTML(\$pathHdr eq "" ? "/" : \$pathHdr)} +(en caso contrario el archivo contendrá las rutas completas). +
    + +
    +EOF + + +# ------------------------------ +$Lang{Restore_Confirm_on__host} = "BackupPC: Restore Confirm on \$host"; + +$Lang{Are_you_sure} = < +Está a punto de comenzar una restauración directamente a la máquina \$In{hostDest}. +Los siguientes archivos serán restaurados en la unidad \$In{shareDest}, de +la copia de seguridad número \$num: +

    + + +\$fileListStr +
    Archivo/Dir Original Será restaurado a
    + +

    + + + + + + +\$hiddenStr +Do you really want to do this? + + +
    +EOF + + +# -------------------------- +$Lang{Restore_Requested_on__hostDest} = "BackupPC: Restauración solicitada en \$hostDest"; +$Lang{Reply_from_server_was___reply} = < +La respuesta del servidor fué: \$reply +

    +Go back to \$hostDest home page. +EOF + +# ------------------------- +$Lang{Host__host_Backup_Summary} = "BackupPC: Host \$host Resumen de Copia de Seguridad"; + +$Lang{Host__host_Backup_Summary2} = < +\$warnStr +

      +\$statusStr +
    + +\${h2("Acciones del Usuario")} +

    +

    + +\$startIncrStr + + +
    + +\${h2("Resumen de Copia de Seguridad")} +

    +Haga click en el número de copia de seguridad para revisar y restaurar archivos. + + + + + + + + + +\$str +
    Copia Nº Tipo Completo Fecha Inicio Duracion/mn Antigüedad/dias Ruta a la Copia en el Servidor
    +

    + +\$restoreStr + +\${h2("Resumen de Errores de Transferencia")} +

    + + + + + + + + + +\$errStr +
    Copia Nº Tipo Ver Nº Xfer errs Nº err. archivos Nº err. unidades Nº err. tar
    +

    + +\${h2("Resumen de Total/Tamaño de Archivos Reutilizados")} +

    +Los archivos existentes son aquellos que ya están en el lote; los nuevos son +aquellos que se han añadido al lote. +Los archivos vacíos y los errores SMB no cuentan en las cifras de reutilizados +ni en la de nuevos. + + + + + + + + + + + + + + + + + +\$sizeStr +
    Totales Archivos Existentes Archivos Nuevos
    Copia Nº Tipo Nº Archivos Tamaño/MB MB/sg Nº Archivos Tamaño/MB Nº Archivos Tamaño/MB
    +

    + +\${h2("Resumen de Compresión")} +

    +Efectividad de compresión para los archivos ya existentes en el lote y los +archivos nuevos comprimidos. + + + + + + + + + + + + + + + +\$compStr +
    Archivos Existentes Archivos Nuevos
    Copia Nº Tipo Nivel Comp Tamaño/MB Comp/MB Comp Tamaño/MB Comp/MB Comp
    +

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

    +EOF + +# ------------------------- +$Lang{NavSectionTitle_} = "Servidor"; + +# ------------------------- +$Lang{Backup_browse_for__host} = < + + + +
      +
    • Está revisando la copia de seguridad Nº\$num, que comenzó hacia las \$backupTime + (hace \$backupAge dias), +\$filledBackup +
    • Haga click en uno de los directorios de abajo para revisar sus contenidos, +
    • Haga click en un archivo para restaurarlo. +
    + +\${h2("Contenido de \${EscHTML(\$dirDisplay)}")} +
    + + + + + +
    + +
    + +
    + \$dirStr +
    +
    + + +
    +
    + + \$fileHeader + \$topCheckAll + \$fileStr + \$checkAll +
    +
    +
    + +
    +
    +EOF + +# ------------------------------ +$Lang{Restore___num_details_for__host} = "BackupPC: Detalles de la restauración Nº\$num de \$host"; + +$Lang{Restore___num_details_for__host2 } = < + + + + + + + + + + + + + + + + + + + +
    Número \$Restores[\$i]{num}
    Solicitado por \$RestoreReq{user}
    Hora Petición \$reqTime
    Resultado \$Restores[\$i]{result}
    Mensaje de Error \$Restores[\$i]{errorMsg}
    Host Origen \$RestoreReq{hostSrc}
    Nº copia origen \$RestoreReq{num}
    Unidad origen \$RestoreReq{shareSrc}
    Host destino \$RestoreReq{hostDest}
    Unidad destino \$RestoreReq{shareDest}
    Hora comienzo \$startTime
    Duración \$duration min
    Número de archivos \$Restores[\$i]{nFiles}
    Tamaño total \${MB} MB
    Tasa de transferencia \$MBperSec MB/sec
    Errores creación Tar \$Restores[\$i]{tarCreateErrs}
    Errores de transferencia \$Restores[\$i]{xferErrs}
    Archivo registro de transferencia +View, +Errors +
    +

    +\${h1("Lista de Archivos/Directorios")} +

    + + +\$fileListStr +
    Dir/archivo originalRestaurado a
    +EOF + +# ----------------------------------- +$Lang{Email_Summary} = "BackupPC: Resumen de Correos"; + +# ----------------------------------- +# !! ERROR messages !! +# ----------------------------------- +$Lang{BackupPC__Lib__new_failed__check_apache_error_log} = "BackupPC::Lib->nuevo ha fallado: revise el error_log de apache\n"; +$Lang{Wrong_user__my_userid_is___} = + "Usuario erróneo: mi userid es \$>, en lugar de \$uid" + . "(\$Conf{BackupPCUser})\n"; +$Lang{Only_privileged_users_can_view_PC_summaries} = "Sólo los usuarios autorizados pueden ver los resúmenes de PC´s."; +$Lang{Only_privileged_users_can_stop_or_start_backups} = + "Sólo los usuarios autorizados pueden comenzar a detener las copias" + . " \${EscHTML(\$host)}."; +$Lang{Invalid_number__num} = "Número no válido \$num"; +$Lang{Unable_to_open__file__configuration_problem} = "No puedo abrir \$file: ¿problema de configuración?"; +$Lang{Only_privileged_users_can_view_log_or_config_files} = "Sólo los usuarios autorizados pueden ver registros o archivos de configuración."; +$Lang{Only_privileged_users_can_view_log_files} = "Sólo los usuarios autorizados pueden ver archivos de registro."; +$Lang{Only_privileged_users_can_view_email_summaries} = "Sólo los usuarios autorizados pueden ver resúmenes de correo."; +$Lang{Only_privileged_users_can_browse_backup_files} = "Sólo los usuarios autorizados pueden revisar los archivos de las copias de seguridad" + . " for host \${EscHTML(\$In{host})}."; +$Lang{Empty_host_name} = "Número de host vacío."; +$Lang{Directory___EscHTML} = "El directorio \${EscHTML(\"\$TopDir/pc/\$host/\$num\")}" + . " está vacío"; +$Lang{Can_t_browse_bad_directory_name2} = "No puedo mostrar un nombre de directorio erróneo" + . " \${EscHTML(\$relDir)}"; +$Lang{Only_privileged_users_can_restore_backup_files} = "Sólo los usuarios autorizados pueden restaurar copias de seguridad" + . " para el host \${EscHTML(\$In{host})}."; +$Lang{Bad_host_name} = "Nombre de host erróneo \${EscHTML(\$host)}"; +$Lang{You_haven_t_selected_any_files__please_go_Back_to} = "No ha seleccionado nigún archivo; por favor, vuelva a" + . " seleccione algunos archivos."; +$Lang{Nice_try__but_you_can_t_put} = "Buen intento, pero no puede usar \'..\' en los nombres de archivo"; +$Lang{Host__doesn_t_exist} = "El Host \${EscHTML(\$In{hostDest})} no existe"; +$Lang{You_don_t_have_permission_to_restore_onto_host} = "No tiene autorización para restaurar en el host" + . " \${EscHTML(\$In{hostDest})}"; +$Lang{Can_t_open_create} = "No puedo abrir/crear " + . "\${EscHTML(\"\$TopDir/pc/\$hostDest/\$reqFileName\")}"; +$Lang{Only_privileged_users_can_restore_backup_files2} = "Sólo los usuarios autorizados pueden restaurar copias de seguridad" + . " del host \${EscHTML(\$host)}."; +$Lang{Empty_host_name} = "Nombre de host vacío"; +$Lang{Unknown_host_or_user} = "Unknown host or user \${EscHTML(\$host)}"; +$Lang{Only_privileged_users_can_view_information_about} = "Sólo los usuarios autorizados pueden ver información del" + . " host \${EscHTML(\$host)}." ; +$Lang{Only_privileged_users_can_view_restore_information} = "Sólo los usuarios autorizados pueden ver información de restauración."; +$Lang{Restore_number__num_for_host__does_not_exist} = "El número de restauración \$num del host \${EscHTML(\$host)} " + . " no existe."; + +$Lang{Unable_to_connect_to_BackupPC_server} = "Imposible conectar al servidor BackupPC", + "Este script CGI (\$MyURL) no puede conectar al servidor BackupPC" + . " en \$Conf{ServerHost} puerto \$Conf{ServerPort}. El error" + . " fué: \$err.", + "Quizá el servidor BackupPC no está activo o hay un " + . " error de configuración. Por favor informe a su administrador de sistemas."; + +$Lang{Can_t_find_IP_address_for} = "No puedo encontrar la dirección IP de \${EscHTML(\$host)}"; +$Lang{host_is_a_DHCP_host} = < +Hasta que vea \$host en una dirección DHCP concreta, sólo puede +comenzar este proceso desde la propia máquina cliente. +EOF + +######################## +# ok you can do it then +######################## + +$Lang{Backup_requested_on_DHCP__host} = "Copia de seguridad solicitada en DHCP \$host (\$In{hostIP}) por" + . " \$User desde \$ENV{REMOTE_ADDR}"; + +$Lang{Backup_requested_on__host_by__User} = "Copia de seguridad solicitada en \$host por \$User"; +$Lang{Backup_stopped_dequeued_on__host_by__User} = "Copia de seguridad detenida/desprogramada en \$host por \$User"; +$Lang{log_User__User_downloaded_tar_archive_for__host} = "El usuario del registro \$User ha descargado un archivo Tar para \$host," + . " copia de seguridad \$num; los archivos eran: " + . " \${join(\", \", \@fileListTrim)}"; + +$Lang{log_User__User_downloaded_zip_archive_for__host}= "El usuario del registro \$User ha descargado un archivo Zip para \$host," + . " copia de seguridad \$num; los archivos eran: " + . "\${join(\", \", \@fileListTrim)}"; + +$Lang{Restore_requested_to_host__hostDest__backup___num} = "Restauración solicitada para el host \$hostDest, copia de seguridad #\$num," + . " por \$User desde \$ENV{REMOTE_ADDR}"; + +# ------------------------------------------------- +# ------- Stuff that was forgotten ---------------- +# ------------------------------------------------- + +$Lang{Status} = "Estado"; +$Lang{PC_Summary} = "Resumen PC"; +$Lang{LOG_file} = "Archivo Registro"; +$Lang{Old_LOGs} = "Registros antiguos"; +$Lang{Email_summary} = "Resumen correo"; +$Lang{Config_file} = "Archivo configuración"; +$Lang{Hosts_file} = "Archivo Hosts"; +$Lang{Current_queues} = "Colas actuales"; +$Lang{Documentation} = "Documentación"; + +$Lang{Host_or_User_name} = "Host o usuario:"; +$Lang{Go} = "Aceptar"; +$Lang{Hosts} = "Hosts"; + +$Lang{This_PC_has_never_been_backed_up} = "

    !Nunca se ha hecho copia de seguridad de este PC!

    \n"; +$Lang{This_PC_is_used_by} = "
  • This PC es utilizado por \${UserLink(\$user)}"; + +$Lang{Extracting_only_Errors} = "(Extracting only Errors)"; +$Lang{XferLOG} = "XferLOG"; +$Lang{Errors} = "Errors"; + +# ------------ +$Lang{Last_email_sent_to__was_at___subject} = <El último mensaje enviado a \${UserLink(\$user)} fué a las \$mailTime, asunto "\$subj". +EOF +# ------------ +$Lang{The_command_cmd_is_currently_running_for_started} = <El comando \$cmd está ejecutandose para \$host, comenzado a \$startTime. +EOF + +# ----------- +$Lang{Host_host_is_queued_on_the_background_queue_will_be_backed_up_soon} = <El host \$host está en cola en la cola en segundo plano (pronto tendrá copia de seguridad). +EOF + +# ---------- +$Lang{Host_host_is_queued_on_the_user_queue__will_be_backed_up_soon} = <Host \$host está en cola en la cola de usuarios (pronto tendrá copia de seguridad). +EOF + +# --------- +$Lang{A_command_for_host_is_on_the_command_queue_will_run_soon} = <Un comando para \$host está en la cola de comandos (se ejecutará pronto). +EOF + +# -------- +$Lang{Last_status_is_state_StatusHost_state_reason_as_of_startTime} = <El último estado fué \"\$Lang->{\$StatusHost{state}}\"\$reason a las \$startTime. +EOF + +# -------- +$Lang{Last_error_is____EscHTML_StatusHost_error} = <El último error fué \"\${EscHTML(\$StatusHost{error})}\" +EOF + +# ------ +$Lang{Pings_to_host_have_failed_StatusHost_deadCnt__consecutive_times} = <Los pings a \$host han fallado \$StatusHost{deadCnt} veces consecutivas. +EOF + +# ----- +$Lang{Prior_to_that__pings} = "Antes de eso, pings"; + +# ----- +$Lang{priorStr_to_host_have_succeeded_StatusHostaliveCnt_consecutive_times} = <\$priorStr a \$host han tenido éxito \$StatusHost{aliveCnt} + veces consecutivas. +EOF + +$Lang{Because__host_has_been_on_the_network_at_least__Conf_BlackoutGoodCnt_consecutive_times___} = <Dado que \$host ha estado en la red al menos \$Conf{BlackoutGoodCnt} +veces consecutivas, no se le realizará copia de seguridad desde \$t0 hasta \$t1 en \$days. +EOF + +$Lang{Backups_are_deferred_for_hours_hours_change_this_number} = <Las copias de seguridad se retrasarán durante \$hours hours +(Cambie este número). +EOF + +$Lang{tryIP} = " y \$StatusHost{dhcpHostIP}"; + +$Lang{Host_Inhost} = "Host \$In{host}"; + +$Lang{checkAll} = < + Seleccionar todo + + + +EOF + +$Lang{fileHeader} = < Nombre + Tipo + Modo + Nº + Tamaño + Hora Mod. + +EOF + +$Lang{Home} = "Principal"; +$Lang{Last_bad_XferLOG} = "Ultimo error en registro de transferencia"; +$Lang{Last_bad_XferLOG_errors_only} = "Ultimo error en registro de transferencia (errores sólo)"; + +$Lang{This_display_is_merged_with_backup} = < Esta pantalla está unida a la copia de seguridad Nº\$numF. +EOF + +$Lang{Visit_this_directory_in_backup} = < Explorar este directorio en copia de seguridad Nº\$otherDirs. +EOF + +$Lang{Restore_Summary} = < +Haga click en el número de restauración para ver sus detalles. + + + + + + + + + + +\$restoreStr +
    Restauración Nº Resultado Fecha Inicio Dur/mins Nº Archivos MB Nº Err. Tar Nº Err. Transf.#xferErrs
    +

    +EOF + +$Lang{BackupPC__Documentation} = "BackupPC: Documentacion"; + +$Lang{No} = "no"; +$Lang{Yes} = "si"; + +$Lang{The_directory_is_empty} = <El directorio \${EscHTML(\$dirDisplay)} está vacio + +EOF + +#$Lang{on} = "activo"; +$Lang{off} = "inactivo"; + +$Lang{full} = "completo"; +$Lang{incremental} = "incremental"; + +$Lang{failed} = "fallido"; +$Lang{success} = "éxito"; +$Lang{and} = "y"; + +# ------ +# Hosts states and reasons +$Lang{Status_idle} = "inactivo"; +$Lang{Status_backup_starting} = "comenzando copia de seguridad"; +$Lang{Status_backup_in_progress} = "copia de seguridad ejecutándose"; +$Lang{Status_restore_starting} = "comenzando restauración"; +$Lang{Status_restore_in_progress} = "restauración ejecutándose"; +$Lang{Status_link_pending} = "conexión pendiente"; +$Lang{Status_link_running} = "conexión en curso"; + +$Lang{Reason_backup_done} = "copia de seguridad realizada"; +$Lang{Reason_restore_done} = "restauración realizada"; +$Lang{Reason_nothing_to_do} = "nada por hacer"; +$Lang{Reason_backup_failed} = "copia de seguridad fallida"; +$Lang{Reason_no_ping} = "no hay ping"; +$Lang{Reason_backup_canceled_by_user} = "copia cancelada por el usuario"; + +# --------- +# Email messages + +# No backup ever +$Lang{EMailNoBackupEverSubj} = "BackupPC: ningúna copia de \$host ha tenido éxito"; +$Lang{EMailNoBackupEverMesg} = <<'EOF'; +To: $user$domain +cc: +Subject: $subj + +Estimado $userName, + +Su PC ($host) nunca ha completado una copia de seguridad mediante nuestro +programa de copias de seguridad. Las copias de seguridad deberían ejecutarse +automáticamente cuando su PC se conecta a la red. Debería contactar con su +soporte técnico si: + + - Su ordenador ha estado conectado a la red con regularidad. Esto implicaría + que existe algún problema de instalación o configuración que impide que se + realicen las copias de seguridad. + + - No desea realizar copias de seguridad y no quiere recibir más mensajes + como éste. + +De no ser así, asegúrese de que su PC está conectado a la red la próxima vez +que esté en la oficina. + +Saludos: +Agente BackupPC +http://backuppc.sourceforge.net +EOF + +# No recent backup +$Lang{EMailNoBackupRecentSubj} = "BackupPC: no hay copias de seguridad recientes de \$host"; +$Lang{EMailNoBackupRecentMesg} = <<'EOF'; +To: $user$domain +cc: +Subject: $subj + +Estimado $userName, + +No se ha podido completar ninguna copia de seguridad de su PC ($host) durante +$days días. +Su PC ha realizado copias de seguridad correctas $numBackups veces desde +$firstTime hasta hace $days días. +Las copias de seguridad deberían efectuarse automáticamente cuando su PC está +conectado a la red. + +Si su PC ha estado conectado durante algunas horas a la red durante los últimos +$days días debería contactar con su soporte técnico para ver porqué las copias +de seguridad no funcionan adecuadamente. + +Por otro lado, si está fuera de la oficina, no hay mucho que se pueda hacer al +respecto salvo copiar manualmente los archivos especialmente críticos a otro +soporte físico. Debería estar al corriente de que cualquier archivo que haya +creado o modificado en los últimos $days días (incluyendo todo el correo nuevo +y archivos adjuntos) no pueden ser restaurados si su disco se avería. + +Saludos: +Agente BackupPC +http://backuppc.sourceforge.net +EOF + +# Old Outlook files +$Lang{EMailOutlookBackupSubj} = "BackupPC: Los archivos de Outlook de \$host necesitan ser copiados"; +$Lang{EMailOutlookBackupMesg} = <<'EOF'; +To: $user$domain +cc: +Subject: $subj + +Estimado $userName, + +Los archivos de Outlook de su PC tienen $howLong. +Estos archivos contienen todo su correo, adjuntos, contactos e información de +su agenda. Su PC ha sido correctamente salvaguardado $numBackups veces desde +$firstTime hasta hace $lastTime días. Sin embargo, Outlook bloquea todos sus +archivos mientras funciona, impidiendo que pueda hacerse copia de seguridad de +los mismos. + +Se le recomienda hacer copia de seguridad de los archivos de Outlook cuando esté +conectado a la red cerrando Outlook y el resto de aplicaciones y utilizando su +navegador de internet. Haga click en este vínculo: + + $CgiURL?host=$host + +Seleccione "Comenzar copia de seguridad incremental" dos veces para comenzar +una neva copia de seguridad incremental. +Puede seleccionar "Volver a la página de $host " y hacer click en "refrescar" +para ver el estado del proceso de copia de seguridad. Debería llevarle sólo +unos minutos completar el proceso. + +Saludos: +Agente BackupPC +http://backuppc.sourceforge.net +EOF + +$Lang{howLong_not_been_backed_up} = "no se le ha realizado una copia de seguridad con éxito"; +$Lang{howLong_not_been_backed_up_for_days_days} = "no se le ha realizado una copia de seguridad durante \$days días"; + +#end of lang_en.pm diff --git a/lib/BackupPC/Lang/fr.pm b/lib/BackupPC/Lang/fr.pm index a729415..d8521ca 100644 --- a/lib/BackupPC/Lang/fr.pm +++ b/lib/BackupPC/Lang/fr.pm @@ -45,8 +45,8 @@ $Lang{BackupPC_Server_Status}= < Date de départ Commande PID - PID du transfert - \$tarPidHdr + PID du transfert + \$jobStr

    @@ -762,6 +762,10 @@ $Lang{Hosts} = "H $Lang{This_PC_has_never_been_backed_up} = "

    Ce PC n'a jamais été sauvegardé !!

    \n"; $Lang{This_PC_is_used_by} = "
  • Ce PC est utilisé par \${UserLink(\$user)}"; +$Lang{Extracting_only_Errors} = "(Extraction des erreurs seulement)"; +$Lang{XferLOG} = "JournalXfer"; +$Lang{Errors} = "Erreurs"; + # ------------ $Lang{Last_email_sent_to__was_at___subject} = <Dernier email envoyé à \${UserLink(\$user)} le \$mailTime, avait comme sujet "\$subj". diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm index 1eb848e..d543880 100644 --- a/lib/BackupPC/Lib.pm +++ b/lib/BackupPC/Lib.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -58,7 +58,7 @@ sub new TopDir => $topDir || '/data/BackupPC', BinDir => $installDir || '/usr/local/BackupPC', LibDir => $installDir || '/usr/local/BackupPC', - Version => '2.0.0_CVS', + Version => '2.0.0beta1', BackupFields => [qw( num type startTime endTime nFiles size nFilesExist sizeExist nFilesNew sizeNew @@ -133,6 +133,14 @@ sub ConfValue return $bpc->{Conf}{$param}; } +sub verbose +{ + my($bpc, $param) = @_; + + $bpc->{verbose} = $param if ( defined($param) ); + return $bpc->{verbose}; +} + sub timeStamp { my($bpc, $t, $noPad) = @_; @@ -698,12 +706,16 @@ sub MakeFileLink sub CheckHostAlive { my($bpc, $host) = @_; - my($s, $pingCmd); + my($s, $pingCmd, $ret); # # Return success if the ping cmd is undefined or empty. # - return 0 if ( $bpc->{Conf}{PingCmd} eq "" ); + if ( $bpc->{Conf}{PingCmd} eq "" ) { + print("CheckHostAlive: return ok because \$Conf{PingCmd} is empty\n") + if ( $bpc->{verbose} ); + return 0; + } my $args = { pingPath => $bpc->{Conf}{PingPath}, @@ -715,16 +727,32 @@ sub CheckHostAlive # Do a first ping in case the PC needs to wakeup # $s = $bpc->cmdSystemOrEval($pingCmd, undef, $args); - return -1 if ( $? ); + if ( $? ) { + print("CheckHostAlive: first ping failed ($?, $!)\n") + if ( $bpc->{verbose} ); + return -1; + } # # Do a second ping and get the round-trip time in msec # $s = $bpc->cmdSystemOrEval($pingCmd, undef, $args); - return -1 if ( $? ); - return $1 if ( $s =~ /time=([\d\.]+)\s*ms/i ); - return $1/1000 if ( $s =~ /time=([\d\.]+)\s*usec/i ); - return 0; + if ( $? ) { + print("CheckHostAlive: second ping failed ($?, $!)\n") + if ( $bpc->{verbose} ); + return -1; + } + if ( $s =~ /time=([\d\.]+)\s*ms/i ) { + $ret = $1; + } elsif ( $s =~ /time=([\d\.]+)\s*usec/i ) { + $ret = $1/1000; + } else { + print("CheckHostAlive: can't extract round-trip time (not fatal)\n") + if ( $bpc->{verbose} ); + $ret = 0; + } + print("CheckHostAlive: returning $ret\n") if ( $bpc->{verbose} ); + return $ret; } sub CheckFileSystemUsage @@ -757,7 +785,12 @@ sub NetBiosInfoGet # # Skip NetBios check if NmbLookupCmd is emtpy # - return ($host, undef) if ( $bpc->{Conf}{NmbLookupCmd} eq "" ); + if ( $bpc->{Conf}{NmbLookupCmd} eq "" ) { + print("NetBiosInfoGet: return $host because \$Conf{NmbLookupCmd}" + . " is empty\n") + if ( $bpc->{verbose} ); + return ($host, undef); + } my $args = { nmbLookupPath => $bpc->{Conf}{NmbLookupPath}, @@ -769,34 +802,67 @@ sub NetBiosInfoGet $netBiosHostName ||= $1 if ( $2 eq "00" ); # host is first 00 $netBiosUserName = $1 if ( $2 eq "03" ); # user is last 03 } - return if ( !defined($netBiosHostName) ); - return (lc($netBiosHostName), lc($netBiosUserName)); + if ( !defined($netBiosHostName) ) { + print("NetBiosInfoGet: failed: can't parse return string\n") + if ( $bpc->{verbose} ); + return; + } + $netBiosHostName = lc($netBiosHostName); + $netBiosUserName = lc($netBiosUserName); + print("NetBiosInfoGet: success, returning host $netBiosHostName," + . " user $netBiosUserName\n") + if ( $bpc->{verbose} ); + return ($netBiosHostName, $netBiosUserName); } # # Given a NetBios name lookup the IP address via NetBios. +# In the case of a host returning multiple interfaces we +# return the first IP address that matches the subnet mask. +# If none match the subnet mask (or nmblookup doesn't print +# the subnet mask) then just the first IP address is returned. # sub NetBiosHostIPFind { my($bpc, $host) = @_; my($netBiosHostName, $netBiosUserName); - my($s, $nmbCmd); + my($s, $nmbCmd, $subnet, $ipAddr, $firstIpAddr); # # Skip NetBios lookup if NmbLookupFindHostCmd is emtpy # - return $host if ( $bpc->{Conf}{NmbLookupFindHostCmd} eq "" ); + if ( $bpc->{Conf}{NmbLookupFindHostCmd} eq "" ) { + print("NetBiosHostIPFind: return $host because" + . " \$Conf{NmbLookupFindHostCmd} is empty\n") + if ( $bpc->{verbose} ); + return $host; + } my $args = { nmbLookupPath => $bpc->{Conf}{NmbLookupPath}, host => $host, }; $nmbCmd = $bpc->cmdVarSubstitute($bpc->{Conf}{NmbLookupFindHostCmd}, $args); - my $resp = $bpc->cmdSystemOrEval($nmbCmd, undef, $args); - if ( $resp =~ /^\s*(\d+\.\d+\.\d+\.\d+)\s+\Q$host/m ) { - return $1; + foreach my $resp ( split(/[\n\r]+/, $bpc->cmdSystemOrEval($nmbCmd, undef, + $args) ) ) { + if ( $resp =~ /querying\s+\Q$host\E\s+on\s+(\d+\.\d+\.\d+\.\d+)/i ) { + $subnet = $1; + $subnet = $1 if ( $subnet =~ /^(.*?)(\.255)+$/ ); + } elsif ( $resp =~ /^\s*(\d+\.\d+\.\d+\.\d+)\s+\Q$host/ ) { + my $ip = $1; + $firstIpAddr = $ip if ( !defined($firstIpAddr) ); + $ipAddr = $ip if ( !defined($ipAddr) && $ip =~ /^\Q$subnet/ ); + } + } + $ipAddr = $firstIpAddr if ( !defined($ipAddr) ); + if ( defined($ipAddr) ) { + print("NetBiosHostIPFind: found IP address $ipAddr for host $host\n") + if ( $bpc->{verbose} ); + return $ipAddr; } else { - return; + print("NetBiosHostIPFind: couldn't find IP address for host $host\n") + if ( $bpc->{verbose} ); + return; } } @@ -959,11 +1025,16 @@ sub cmdExecOrEval if ( (ref($cmd) eq "ARRAY" ? $cmd->[0] : $cmd) =~ /^\&/ ) { $cmd = join(" ", $cmd) if ( ref($cmd) eq "ARRAY" ); + print("cmdExecOrEval: about to eval perl code $cmd\n") + if ( $bpc->{verbose} ); eval($cmd); print(STDERR "Perl code fragment for exec shouldn't return!!\n"); exit(1); } else { $cmd = [split(/\s+/, $cmd)] if ( ref($cmd) ne "ARRAY" ); + print("cmdExecOrEval: about to exec ", + $bpc->execCmd2ShellCmd(@$cmd), "\n") + if ( $bpc->{verbose} ); exec(@$cmd); print(STDERR "Exec failed for @$cmd\n"); exit(1); @@ -985,18 +1056,25 @@ sub cmdExecOrEval sub cmdSystemOrEval { my($bpc, $cmd, $stdoutCB, @args) = @_; - my($pid, $out); + my($pid, $out, $allOut); local(*CHILD); if ( (ref($cmd) eq "ARRAY" ? $cmd->[0] : $cmd) =~ /^\&/ ) { $cmd = join(" ", $cmd) if ( ref($cmd) eq "ARRAY" ); - my $out = eval($cmd); + print("cmdSystemOrEval: about to eval perl code $cmd\n") + if ( $bpc->{verbose} ); + $out = eval($cmd); $$stdoutCB .= $out if ( ref($stdoutCB) eq 'SCALAR' ); &$stdoutCB($out) if ( ref($stdoutCB) eq 'CODE' ); + print("cmdSystemOrEval: finished: got output $out\n") + if ( $bpc->{verbose} ); return $out if ( !defined($stdoutCB) ); return; } else { $cmd = [split(/\s+/, $cmd)] if ( ref($cmd) ne "ARRAY" ); + print("cmdSystemOrEval: about to system ", + $bpc->execCmd2ShellCmd(@$cmd), "\n") + if ( $bpc->{verbose} ); if ( !defined($pid = open(CHILD, "-|")) ) { my $err = "Can't fork to run @$cmd\n"; $? = 1; @@ -1022,10 +1100,13 @@ sub cmdSystemOrEval $$stdoutCB .= $_ if ( ref($stdoutCB) eq 'SCALAR' ); &$stdoutCB($_) if ( ref($stdoutCB) eq 'CODE' ); $out .= $_ if ( !defined($stdoutCB) ); + $allOut .= $_ if ( $bpc->{verbose} ); } $? = 0; close(CHILD); } + print("cmdSystemOrEval: finished: got output $allOut\n") + if ( $bpc->{verbose} ); return $out; } diff --git a/lib/BackupPC/PoolWrite.pm b/lib/BackupPC/PoolWrite.pm index 8ec9fd2..4fe4aa7 100644 --- a/lib/BackupPC/PoolWrite.pm +++ b/lib/BackupPC/PoolWrite.pm @@ -56,7 +56,7 @@ # #======================================================================== # -# Version 2.0.0beta0, released 23 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/lib/BackupPC/View.pm b/lib/BackupPC/View.pm index a7ec145..0572bfe 100644 --- a/lib/BackupPC/View.pm +++ b/lib/BackupPC/View.pm @@ -31,7 +31,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta2, released 13 Apr 2003. # # See http://backuppc.sourceforge.net. # @@ -45,6 +45,7 @@ use File::Path; use BackupPC::Lib; use BackupPC::Attrib qw(:all); use BackupPC::FileZIO; +use Data::Dumper; sub new { @@ -72,6 +73,7 @@ sub dirCache my($m, $backupNum, $share, $dir) = @_; my($i, $level); + #print STDERR "dirCache($backupNum, $share, $dir)\n"; $dir = "/$dir" if ( $dir !~ m{^/} ); $dir =~ s{/+$}{}; return if ( $m->{num} == $backupNum @@ -103,7 +105,7 @@ sub dirCache # $m->{mergeNums} = []; for ( $i = $m->{idx} ; $level > 0 && $i >= 0 ; $i-- ) { - #print("Do $i ($m->{backups}[$i]{noFill},$m->{backups}[$i]{level})\n"); + #print(STDERR "Do $i ($m->{backups}[$i]{noFill},$m->{backups}[$i]{level})\n"); # # skip backups with the same or higher level # @@ -123,7 +125,7 @@ sub dirCache $sharePathM = $share . $dir; } $path .= $sharePathM; - #print("Opening $path\n"); + #print(STDERR "Opening $path (share=$share)\n"); if ( !opendir(DIR, $path) ) { if ( $i == $m->{idx} ) { # @@ -148,6 +150,7 @@ sub dirCache $file = $1 if ( $file =~ /(.*)/ ); my $fileUM = $file; $fileUM = $m->{bpc}->fileNameUnmangle($fileUM) if ( $mangle ); + #print(STDERR "Doing $fileUM\n"); # # skip special files # @@ -231,6 +234,7 @@ sub dirCache next if ( $m->{files}{$file}{type} != BPC_FTYPE_DELETED ); delete($m->{files}{$file}); } + #print STDERR "Returning:\n", Dumper($m->{files}); } # @@ -239,12 +243,18 @@ sub dirCache sub fileAttrib { my($m, $backupNum, $share, $path) = @_; - my $dir = $path; - $dir =~ s{(.*)/(.*)}{$1}; - my $file = $2; - $m->dirCache($backupNum, $share, $dir); - return $m->{files}{$file}; + if ( $path =~ s{(.*)/+(.+)}{$1} ) { + my $file = $2; + $m->dirCache($backupNum, $share, $path); + return $m->{files}{$file}; + } else { + #print STDERR "Got empty $path\n"; + $m->dirCache($backupNum, "", ""); + my %attr = %{$m->{files}{$share}}; + $attr{relPath} = "/"; + return \%attr; + } } # @@ -328,7 +338,7 @@ sub findRecurse my $attr = $m->dirAttrib($backupNum, $share, $path); return if ( !defined($attr) ); - foreach my $file ( keys(%$attr) ) { + foreach my $file ( sort(keys(%$attr)) ) { &$callback($attr->{$file}, @callbackArgs); next if ( !$depth || $attr->{$file}{type} != BPC_FTYPE_DIR ); # diff --git a/lib/BackupPC/Xfer/Rsync.pm b/lib/BackupPC/Xfer/Rsync.pm index 1d647ac..ed60c87 100644 --- a/lib/BackupPC/Xfer/Rsync.pm +++ b/lib/BackupPC/Xfer/Rsync.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.0.0beta0, released 23 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -265,16 +265,20 @@ sub start $t->{rs} = File::RsyncP->new({ logLevel => $conf->{RsyncLogLevel}, rsyncCmd => sub { + $bpc->verbose(0); $bpc->cmdExecOrEval($rsyncClientCmd, $args); }, rsyncCmdType => "full", rsyncArgs => $rsyncArgs, timeout => $conf->{ClientTimeout}, logHandler => sub { - my($str) = @_; - $str .= "\n"; - $t->{XferLOG}->write(\$str); + my($str) = @_; + $str .= "\n"; + $t->{XferLOG}->write(\$str); }, + pidHandler => sub { + $t->{pidHandler}(@_); + }, fio => BackupPC::Xfer::RsyncFileIO->new({ xfer => $t, bpc => $t->{bpc}, @@ -424,7 +428,7 @@ sub xferPid { my($t) = @_; - return -1; + return (); } sub logMsg diff --git a/lib/BackupPC/Xfer/RsyncFileIO.pm b/lib/BackupPC/Xfer/RsyncFileIO.pm index fdc3625..6c8a7cd 100644 --- a/lib/BackupPC/Xfer/RsyncFileIO.pm +++ b/lib/BackupPC/Xfer/RsyncFileIO.pm @@ -12,7 +12,7 @@ # #======================================================================== # -# Version 2.0.0beta0, released 23 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -135,12 +135,12 @@ sub csumGet return if ( !defined($fio->{fh}) ); if ( $fio->{fh}->read(\$fileData, $blockSize * $num) <= 0 ) { - $fio->log("$fio->{file}{name}: csumGet is at EOF - zero padding\n"); + $fio->log("$fio->{file}{name}: csumGet is at EOF - zero padding"); $fio->{stats}{errorCnt}++; $fileData = pack("c", 0) x ($blockSize * $num); } $fio->{csumDigest}->add($fileData) if ( defined($fio->{csumDigest}) ); - $fio->log(sprintf("%s: getting csum ($num,$csumLen,%d,0x%x)\n", + $fio->log(sprintf("%s: getting csum ($num,$csumLen,%d,0x%x)", $fio->{file}{name}, length($fileData), $fio->{checksumSeed})) @@ -713,13 +713,13 @@ sub fileDeltaRxNext $fio->{stats}{errorCnt}++; return -1; } - if ( $attr->{size} < 10 * 1024 * 1024 ) { + if ( $attr->{size} < 16 * 1024 * 1024 ) { # - # Cache the entire old file if it is less than 10MB + # Cache the entire old file if it is less than 16MB # my $data; $fio->{rxInData} = ""; - while ( $fh->read(\$data, 10 * 1024 * 1024) > 0 ) { + while ( $fh->read(\$data, 30 * 1024 * 1024) > 0 ) { $fio->{rxInData} .= $data; } $fio->log("$attr->{fullPath}: cached all $attr->{size}" @@ -746,7 +746,7 @@ sub fileDeltaRxNext } $fio->{rxInFd} = *F; $fio->{rxInName} = "$fio->{outDirSh}RStmp"; - seek($fio->{rxInFd}, 0, 0); + sysseek($fio->{rxInFd}, 0, 0); $fio->log("$attr->{fullPath}: copied $byteCnt," . "$attr->{size} bytes to $fio->{rxInName}") if ( $fio->{logLevel} >= 9 ); @@ -774,7 +774,8 @@ sub fileDeltaRxNext . "$lastBlk") if ( $fio->{logLevel} >= 9 ); my $seekPosn = $fio->{rxMatchBlk} * $fio->{rxBlkSize}; - if ( defined($fio->{rxInFd}) && !seek($fio->{rxInFd}, $seekPosn, 0) ) { + if ( defined($fio->{rxInFd}) + && !sysseek($fio->{rxInFd}, $seekPosn, 0) ) { $fio->log("Unable to seek $attr->{rxInName} to $seekPosn"); $fio->{stats}{errorCnt}++; return -1; @@ -803,6 +804,7 @@ sub fileDeltaRxNext $fio->{stats}{errorCnt}++; return -1; } + $seekPosn += $len; } $fio->{rxOutFd}->write(\$data); $fio->{rxDigest}->add($data); @@ -847,19 +849,21 @@ sub fileDeltaRxDone $fio->{rxDigest} = File::RsyncP::Digest->new; $fio->{rxDigest}->add(pack("V", $fio->{checksumSeed})); my $attr = $fio->{rxLocalAttr}; - if ( defined($attr) && defined(my $fh = BackupPC::FileZIO->open( + if ( defined($attr) ) { + if ( defined(my $fh = BackupPC::FileZIO->open( $attr->{fullPath}, 0, $attr->{compress})) ) { - my $data; - while ( $fh->read(\$data, 4 * 65536) > 0 ) { - $fio->{rxDigest}->add($data); - $fio->{rxSize} += length($data); + my $data; + while ( $fh->read(\$data, 4 * 65536) > 0 ) { + $fio->{rxDigest}->add($data); + $fio->{rxSize} += length($data); + } + $fh->close; + } else { + $fio->log("Can't open $attr->{fullPath} for MD4 check ($name)"); + $fio->{stats}{errorCnt}++; } - $fh->close; - } else { - $fio->log("cannot open $attr->{fullPath} for MD4 check"); - $fio->{stats}{errorCnt}++; } $fio->log("$name got exact match") if ( $fio->{logLevel} >= 5 ); @@ -873,8 +877,8 @@ sub fileDeltaRxDone $fio->log("$name got digests $md4Str vs $newStr") } if ( $md4 ne $newDigest ) { - $fio->log("$name md4 doesn't match") - if ( $fio->{logLevel} >= 1 ); + $fio->log("$name: fatal error: md4 doesn't match"); + $fio->{stats}{errorCnt}++; if ( defined($fio->{rxOutFd}) ) { $fio->{rxOutFd}->close; unlink($fio->{rxOutFile}); diff --git a/lib/BackupPC/Xfer/Smb.pm b/lib/BackupPC/Xfer/Smb.pm index 8fdbfea..e939094 100644 --- a/lib/BackupPC/Xfer/Smb.pm +++ b/lib/BackupPC/Xfer/Smb.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -322,7 +322,7 @@ sub xferPid { my($t) = @_; - return $t->{xferPid}; + return ($t->{xferPid}); } sub logMsg diff --git a/lib/BackupPC/Xfer/Tar.pm b/lib/BackupPC/Xfer/Tar.pm index 872338c..9d3e819 100644 --- a/lib/BackupPC/Xfer/Tar.pm +++ b/lib/BackupPC/Xfer/Tar.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # @@ -263,7 +263,7 @@ sub xferPid { my($t) = @_; - return $t->{xferPid}; + return ($t->{xferPid}); } sub logMsg diff --git a/lib/BackupPC/Zip/FileMember.pm b/lib/BackupPC/Zip/FileMember.pm index 3c8fc6a..ff4258d 100644 --- a/lib/BackupPC/Zip/FileMember.pm +++ b/lib/BackupPC/Zip/FileMember.pm @@ -33,7 +33,7 @@ # #======================================================================== # -# Version 2.0.0_CVS, released 3 Feb 2003. +# Version 2.0.0beta1, released 30 Mar 2003. # # See http://backuppc.sourceforge.net. # diff --git a/makeDist b/makeDist index 4fe4061..8fd096d 100755 --- a/makeDist +++ b/makeDist @@ -41,8 +41,8 @@ use File::Copy; umask(0022); -my $Version = "2.0.0beta1"; -my $ReleaseDate = "30 Mar 2003"; +my $Version = "2.0.0beta2"; +my $ReleaseDate = "13 Apr 2003"; my $DistDir = "dist/BackupPC-$Version"; my @PerlSrc = qw( @@ -62,9 +62,10 @@ my @PerlSrc = qw( lib/BackupPC/Attrib.pm lib/BackupPC/FileZIO.pm lib/BackupPC/Lib.pm + lib/BackupPC/Lang/de.pm lib/BackupPC/Lang/en.pm - lib/BackupPC/Lang/fr.pm lib/BackupPC/Lang/es.pm + lib/BackupPC/Lang/fr.pm lib/BackupPC/PoolWrite.pm lib/BackupPC/View.pm lib/BackupPC/Xfer/Smb.pm @@ -127,8 +128,11 @@ foreach my $file ( (@PerlSrc, conf/hosts init.d/README init.d/src/debian-backuppc + init.d/src/gentoo-backuppc + init.d/src/gentoo-backuppc.conf init.d/src/linux-backuppc init.d/src/solaris-backuppc + init.d/src/suse-backuppc doc/BackupPC.pod doc/BackupPC.html README -- 2.20.1