I discovered a bug with BackupPC’s error reporting. This has hit me more than once (evidenced by the deja vu i experienced when debugging the problem), but i mustn’t have written down the solution previously. A quick Google (by which i mean “skimming the first two screens of hits”) doesn’t show any obvious signs of people having the same issue, so i thought i’d document it here for search engine posterity.
The basic issue is that backups to certain systems fail, and the diagnostics shown in the web interface look like this:
- Last status is state “idle” (no ping) as of 11/2 14:00.
- Last error is “no ping response”.
- Pings to laptop1 have failed 39 consecutive times.
However, no ping response is not the problem. If i login as the backuppc user on my backup server, it is able to both ping and ssh to the host in question just fine.
Digging deeper in the logs, i found this in /var/lib/backupppc/log/LOG:
2012-11-02 14:52:05 laptop1: mkdir /var/lib/backuppc/trash: Permission denied at /usr/share/backuppc/lib/BackupPC/Lib.pm line 629
I fixed this by chowning /var/lib/backuppc to the backuppc user, and the backup proceeded as normal. So it seems that backuppc will not do the right thing without a trash directory in place, and if it doesn’t have permissions to create it, it gives a misleading error message.
In my case, this happened because my removable drive for backups died and i replaced it with a new one without fully recreating the directory structure as required by backuppc. So i guess it’s my fault, but a more helpful error message would have been good.