I’ve been using BackupPC for the last year to securely backup servers to a remote location over Rsync and SSH, however I recently stumbled across an issue with backing up the SVN root directory on an SVN server.
The error in the logs was as follows:
2008-11-11 06:04:09 full backup started for directory /var/svn 2008-11-11 06:04:11 Got fatal error during xfer (No files dumped for share /var/svn) 2008-11-11 06:04:16 Backup aborted (No files dumped for share /var/svn)
After much testing and swearing, I switched to the backuppc user (just run su – backuppc as root) and tried to change to /var/svn. “Permission Denied” was the result – so I checked the permissions on the directory and sure enough, the permissions were set as follows:
drwxrwx— 7 root svnusers 4096
I didn’t want to change the permissions as only people that have SVN access should be allowed to view the repository so I added the backuppc user to the svnusers group. I re-ran the backup using the BackupPC web interface and hey-presto…it failed with exactly the same error.
BackupPC runs as a daemon, therefore if you want permissions to take effect, you have to restart it:
I re-ran the backup and this time, it worked without any issues.