Thursday, July 3, 2014

Troubleshooting Backuppc problems

My environment: Ubuntu 12.04 + BackupPC 3.2.1
Xfer Method: Rsync + SSH

Log file location: /var/lib/backuppc/log/LOG
Host per log: TOPDIR/pc/$host/LOG
Mine is: /data/backuppc/pc/$host/LOG


The easiest way to debug backup problems on a specific host is to run BackupPC_dump manually as the BackupPC user. This is the most important thing, run it at first to detect the source of problem
/usr/share/backuppc/bin/BackupPC_dump -v -f remote_host.vn > remote_host.log
http://backuppc.sourceforge.net/faq/

Common Backuppc Problem

Backuppc user in Visudo group of Remote host. But when the Server start sudo script it return this error

sudo: no tty present and no askpass program specified

In remote host:
visudobackuppc ALL=(root) NOPASSWD: /usr/bin/rsync, /bin/tar

In Backuppc Server
add -t option to ssh
DumpPreUserCmd  $sshPath -t -q -x -l backuppc $host /usr/bin/sudo /usr/local/bin/rsync_script.sh

no ping response

backuppc work only if it can ping the remote host, if it can not ping, you have to check your
  • Network connection to remote host
  • Firewall rules / Polices
If you can ping from backuppc console, it mean backppc ping configuration went wrong:
$Conf{Ping6Path} is not set by default in 3.2.1. The solution is easy. Set this in /etc/backuppc/config.pl
$Conf{Ping6Path} = '/bin/ping6';
If ping also not work -> try Echo (Solution from SysadminWorld.com)
In the BackupPC webinterface, click the client host name, Edit Config, go to the Backup Settings and change the setting PingCmd ($pingPath -c 1 $host by default) to/bin/echo

Don’t forget to check override and click the Save button to apply the change.

Use of qw(…) as parentheses is deprecated

Use of qw(...) as parentheses is deprecated at /usr/share/backuppc/lib/BackupPC/Storage/Text.pm line 302.
Use of qw(...) as parentheses is deprecated at /usr/share/backuppc/lib/BackupPC/Lib.pm line 1425.

apply one-liner patch from www.tolaris.com
wget -q http://www.tolaris.com/blog/wp-content/uploads/2012/05/BackupPC-3.2.1-CVE-2011-170886.diff -O- | patch -p0 -N -r - -d /usr/share/backuppc/

BackupPC displays bogus “Last email sent” messages

BackupPC will send error message emails to the administrator or user of a host (backup target) if it cannot reach the host for a set period of time. The user interface always displays this last message, even if it doesn’t exist:
Last email sent to user@example.com was at 2012-05-01 01:23, subject “”.
apply one-liner patch from www.tolaris.com
wget -q http://www.tolaris.com/blog/wp-content/uploads/2012/05/BackupPC-3.2.1-no_blank_email.diff -O- | patch -p0 -N -r - -d /usr/share/backuppc/

Got fatal error during xfer (aborted by signal=PIPE)

This is the most common Backuppc error message. It can be:
Your remote script execution (Xfer script, DumpPreUserCmd, DumpPostUserCmd): it depend on which user running the script, permission to run that script, status of the script, result of the script. Make sure you run the script successfully on the console of that host as backuppc user first , then try run the script remotely on Backuppc Server console for example:
ssh -t -c blowfish -q -x -l backuppc remote_server.vn /usr/bin/sudo /usr/local/bin/rsync_script.sh
Your remote location: Check your RsyncShareName in Host Xfer setting carefully. Make sure the directory you specify are exsits and backuppc have permssion to read it, do not add any extra blank line in RsysncShareName

Timeout: possibly the remote script take long time to return. Here is a work around
Try adding -o ServerAliveInterval=300 into RsyncClientRestoreCmd, RsyncClientCmd, DumpPreUserCmd, DumpPostUserCmd
$sshPath -c blowfish -o ServerAliveInterval=300 -q -x -l backuppc $host $rsyncPath $argList+

Backuppc wrong setting: make sure you don't have any typo mistakes on any fields, select the right xfer method.

Resouces on both host while running backup: RAM, CPU, DISK, Network...Any bottle neck?

Turn on Verbose

XferLogLevel=9, RsyncArgs -vv

Waiting for your comment :D 


0 comments:

Post a Comment