[BackupPC-users] Syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm
Hi all, Running BPC 3.2.1 on CentOS 6.2 x64 and have been getting the below error since a few days back. The backups seem to be running fine, but when I click Host Summary in the web-gui, and then click a host, I get the below. It is only when I click the host-link I see this error. The BPC-logs say everything is fine. Could someone please help me in decoding this error? Ie, I see what the errors are, but what do I do about them? "Explicit package name" smells of some kind of lib problem but which? Thanks in advance for any hints and help. "Software error: syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251, near "-if" Global symbol "$user" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251. Global symbol "$host" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251. syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251, near "}) " Global symbol "$user" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. Global symbol "$user" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. Global symbol "$host" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. Global symbol "$user" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. Global symbol "$host" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. Global symbol "$statusStr" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 255. syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 256, near "}" /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm has too many errors. For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error. Software error: [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251, near "-if" [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: Global symbol "$user" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251. [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: Global symbol "$host" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251. [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251, near "}) " [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: Global symbol "$user" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: Global symbol "$user" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: Global symbol "$host" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: Global symbol "$user" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: Global symbol "$host" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 252. [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: Global symbol "$statusStr" requires explicit package name at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 255. [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 256, near "}" [Fri May 11 08:22:49 2012] BackupPC_Admin.pl: /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm has too many errors. Compilation failed in require at /usr/share/BackupPC/sbin/BackupPC_Admin.pl line 107. For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error." -- BW, Sorin --- # Sorin Srbu[Sysadmin, Systems Engineer] # Dept of Medicinal Chemistry, Phone: +46 (0)18-4714482 >3 signals> GSM # Div of Org Pharm Chem,Mobile: +46 (0)70-4250229 # Box 574, Uppsala University, Fax: +46 (0)18-4714482 # SE-751 23 Uppsala, Sweden Visit: BMC, Husargatan 3, D5:512b # Web: http://www.orgfarm.uu.se --- # () ASCII ribbon campaign - Against html E-mail # /\ # # This message was not sent from an iProduct! # # MotD follows: # Dear [insert deity of your choice here], give me the peace of mind to accept what I cannot change, curage to change what I can, and sense enough to understand the difference. -Me smime.p7s Description: S/MIME cryptographic signature -- Live Security Virtual C
Re: [BackupPC-users] Not getting mail from BackupPC
I've got an archive host defined and this script dies when it hits that host. Does anyone have an updated script that handles the archive host properly? Brad What do you mean "properly"? If you want just skip archive host, see attached script. Or may be you want to add list of archive hosts to report? P.S. Does any one have some considerations about script functionality? -- Alexander Moisseev #!/usr/bin/perl -- -*- quick-hack -*- # # run manually: # su backuppc -c ./BackupPC_daily.pl | mail -s 'BackupPC daily stats' ad...@domain.tld # # or add to crontab: # 0 8 * * * su backuppc -c /*path to script here*/BackupPC_daily.pl | mail -s 'BackupPC daily stats' ad...@domain.tld use lib '/usr/local/lib'; # change to match your installation use BackupPC::Lib; use POSIX; my $bpc = new BackupPC::Lib ('', '', '', 0) or die "Can't create BackupPC object!\n"; my @hosts; # array of hosts my $hostinfo; # pointer to hash of per host information my @backups; # info on all backups of one host my $dt;# output fields for loop iteration: date/time my $size; # ... size my $level; # ... level my $duration; # ... duration in minutes my $xferErrs; my $xferBadShare; my $xferBadFile; my $tarErrs; $hostinfo = $bpc->HostInfoRead (); @hosts = sort keys %$hostinfo; # print 'hosts =>', (join '<, >', @hosts), "<=\n"; print join(' ', POSIX::strftime ('%Y-%m-%d %H:%M',localtime(time))), "\n"; printf "%-6s %-22.22s %-16.16s %6s %5s %8s %1s %4s %5s %4s %3s\n", "", "", "", size, "", duration, "|", xfer, Share, File, tar; printf "%-6s %-22.22s %-16.16s %6s %5s %8s %1s %-4s %-5s %-4s %3s\n", "number", "hostname", "date/time", "(MB)", "level", "(min)", "|", Err, Err, Err, Err; host: foreach my $host (@ARGV ? @ARGV : @hosts) { $bpc->ConfigRead($host); next if ( $bpc->{Conf}{XferMethod} eq "archive" ); @backups = $bpc -> BackupInfoRead ($host) or die "Invalid hostname '$host' or other error!\n"; foreach my $backup (@backups [-1]) { # [-1] <- add that in the line above for only #the most recent backup of each host # exploring the data structure: # print "$host=>", join (',', map { "$_=$backup->{$_}" } sort keys %$backup), "<=\n"; $dt = POSIX::strftime ('%Y-%m-%d %H:%M', localtime $backup -> {startTime}); $size = int ($backup -> {size} / 1024 / 1024 + 0.5); # MB, rounded $level= $backup -> {level}; $duration = int (($backup->{endTime} - $backup->{startTime}) / 60 + 0.5); $xferErrs = $backup -> {xferErrs}; $xferBadShare = $backup -> {xferBadShare}; $xferBadFile = $backup -> {xferBadFile}; $tarErrs = $backup -> {tarErrs}; printf "[%4d] %-22.22s %-16.16s %6d %5d %8d %1s %4d %5d %4d %3d\n", $backup -> {num}, $host, $dt, $size, $level, $duration, "|", $xferErrs, $xferBadShare, $xferBadFile, $tarErrs; if ((time-$backup->{endTime})>86400){ #i.e endIime older than 1d printf "*WARNING* Backup is outdated!\n"; } if (($xferErrs+$xferBadShare+$xferBadFile+$tarErrs)!=0){ printf "*WARNING* Backup with ERRORs!\n"; # XferLOG addition would go here, probably add some \n's above } } $hostcount+=1; } print "\n$hostcount hosts\n"; -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm
On Fri, May 11, 2012 at 1:39 AM, Sorin Srbu wrote: > > "Explicit package name" smells of some kind of lib problem but which? > >> Global symbol "$user" requires explicit package name at > /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251. > Global symbol "$host" requires explicit package name at These are values that are supposed to come from your hosts file and get initialized as globals before you hit this code. Is something wrong with /etc/BackupPC/hosts? If not, try 'rpm -V BackupPC' to see if any of the package files have changed. -- Les Mikesell lesmikes...@gmail.com -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not getting mail from BackupPC
>>I've got an archive host defined and this script dies when it hits that >>host. Does anyone have an updated script that handles the archive host >>properly? >What do you mean "properly"? >If you want just skip archive host, see attached script. >Or may be you want to add list of archive hosts to report? Alexander, What I meant by "properly" is exactly what your modified script does... I think the "or die..." was intended to capture abnormal conditions and the archive host was not "abnormal" so your added test for it was exactly what I had in mind. Regards, Brad -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] Correct rsync parameters for doing incremental transfers of large image-files
Hello Backuppc-users, I stuck while trying to identify the suitable rsync parameters to handle large image file backups with backuppc. Following scenario: I use partimage to do LVM-snapshot based full images of my virtual (windows-) machines (KVM) blockdevices. I want to save theses images from the virtualization server to my backup machine running backuppc. The images are between 40 and 60 Gigs uncompressed each. The time-window for the backup needs to stay outside the working hours and is not large enough to transfer the images over the line every night. I red about rsync's capability to only transfer the changed parts in the file by a clever checksum-algorithm to minimize the network traffic. That's what I want. I tested it by creating a initial backup of one image, created a new one with only a few megs of changed data and triggered a new backup process. But I noticed that the whole file was re-transfered. I waited till the end to get sure about that and decided that it was not the ultimate idea to check this with a compressed 18 GB image file but this was my real woking data image and I expected it to work like expected. Searching for reasons for the complete re-transmission I ended in a discussion-thread where they talked about rsync backups of compressed large files. The explanation made sense to me: The compression algorithm can cause a complete different archive file even if just some megs of data at the beginning of the file hast been altered, because of recursion and back-references. So I decided to store my image uncompressed which is about 46 Gigs now. I found out that I need to add the "-C" parameter to rsync, since data compression is not enabled per default. Anyway: the whole file was re-created in the second backup run instead of just transfering the changed parts, again. My backuppc-option "RsyncClientCmd" is set to "$sshPath -C -q -x -l root $host $rsyncPath $argList+" which is backup-pcs default disregarding the "-C". Honestly, I don't understand the exact reason for this. There are some possibilities that may be guilty: -> partimage does not create a linear backup image file, even if it is uncompressed -> there is just another parameter for rsync I missed which enables differential file-changes-transfers -> rsync exames the file but decides to not use differential updates for this one because of it's size or just because it's created-timestamp is not the same as the prior one Please give me a hint if you've successfully made differential backups of large image files. Thank you very much, Andreas Piening -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] BackupPC Windows Client
Based on some of the work here http://www.goodjobsucking.com/?p=62 and elsewhere, I finally put together a package that allows more-or-less instant installation of a scripted client for Windows machines for BackupPC that handles: - Open files (VSS) - Wake on LAN For the past 3 years or so, this has gone through a number of tweaks, but now I'm comfortable that it's a one-click, seamless installation, once the server side is set up. It includes all the necessary binaries I'm making it available here: http://www.michaelstowe.com/backuppc/ (If there are banner ads, feel free to ignore them, they help pay for bandwidth.) Questions/comments welcome, of course. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm
Den 2012-05-11 08:39, Sorin Srbu skrev: > Hi all, > > Running BPC 3.2.1 on CentOS 6.2 x64 and have been getting the below error > since a few days back. > > The backups seem to be running fine, but when I click Host Summary in the > web-gui, and then click a host, I get the below. It is only when I click the > host-link I see this error. The BPC-logs say everything is fine. > > Could someone please help me in decoding this error? Ie, I see what the errors > are, but what do I do about them? > > "Explicit package name" smells of some kind of lib problem but which? > > Thanks in advance for any hints and help. > > "Software error: > > syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251, > near "-if" > Global symbol "$user" requires explicit package name at > /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251. > Global symbol "$host" requires explicit package name at > /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251. > syntax error at /usr/share/BackupPC/lib/BackupPC/CGI/HostInfo.pm line 251, click "Edit Hosts" in the web-gui, check the "user" and "moreUsers" strings. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Correct rsync parameters for doing incremental transfers of large image-files
On Fri, May 11, 2012 at 4:01 PM, Andreas Piening wrote: > Hello Backuppc-users, > > I stuck while trying to identify the suitable rsync parameters to handle > large image file backups with backuppc. > > Following scenario: I use partimage to do LVM-snapshot based full images of > my virtual (windows-) machines (KVM) blockdevices. I want to save theses > images from the virtualization server to my backup machine running backuppc. > The images are between 40 and 60 Gigs uncompressed each. The time-window for > the backup needs to stay outside the working hours and is not large enough to > transfer the images over the line every night. I red about rsync's capability > to only transfer the changed parts in the file by a clever checksum-algorithm > to minimize the network traffic. That's what I want. > > I tested it by creating a initial backup of one image, created a new one with > only a few megs of changed data and triggered a new backup process. But I > noticed that the whole file was re-transfered. I waited till the end to get > sure about that and decided that it was not the ultimate idea to check this > with a compressed 18 GB image file but this was my real woking data image and > I expected it to work like expected. Searching for reasons for the complete > re-transmission I ended in a discussion-thread where they talked about rsync > backups of compressed large files. The explanation made sense to me: The > compression algorithm can cause a complete different archive file even if > just some megs of data at the beginning of the file hast been altered, > because of recursion and back-references. > So I decided to store my image uncompressed which is about 46 Gigs now. I > found out that I need to add the "-C" parameter to rsync, since data > compression is not enabled per default. Anyway: the whole file was re-created > in the second backup run instead of just transfering the changed parts, again. > > My backuppc-option "RsyncClientCmd" is set to "$sshPath -C -q -x -l root > $host $rsyncPath $argList+" which is backup-pcs default disregarding the "-C". > > Honestly, I don't understand the exact reason for this. There are some > possibilities that may be guilty: > > -> partimage does not create a linear backup image file, even if it is > uncompressed > -> there is just another parameter for rsync I missed which enables > differential file-changes-transfers > -> rsync exames the file but decides to not use differential updates for this > one because of it's size or just because it's created-timestamp is not the > same as the prior one > > Please give me a hint if you've successfully made differential backups of > large image files. I'm not sure there is a good way to handle very large files in backuppc. Even if rysnc identifies and transfers only the changes, the server is going to copy and merge the unchanged parts from the previous file which may take just as long anyway, and it will not be able to pool the copies.Maybe you could split the target into many small files before the backup. Then any chunk that is unchanged between runs would be skipped quickly and the contents could be pooled. -- Les Mikesell lesmikes...@gmail.com -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/