Fighting with BackupPC
Published 7.18.2008 by ~mattg
I spent the better part of two hours fighting with the BackupPC backup service on my Linux server. The software itself is extremely powerful and a pretty good fit for what I want to do: backup multiple computers to one spot, then create CD archives. The problems I experienced stemed from what I thought were Windows permission issues, but ended up being BackupPC issues with Samba.
Initially, the only way I could get a backup to work for a windows client was to make a share and set said share to allow everyone read access. What I really want to do is use the default shares on the windows machine (or the “money” shares) and create a backup user that can’t login and only has permission to do the backups (a member of the Backup Operators group on my windows machine).
I messed with permissions on my windows box forever, and then I started looking at more detailed XFer logs from BackupPC and it hit me: The samba command is always logging in as anonymous, even if I specify a SmbShareUser and SmbSharePass in the config file.
The end solution was to override the backup/restore commands coming from BackupPC to use the -A option of smbclient, and point to an authorization file that stores the login information. Obviously, storing passwords in plain text isn’t the best thing, but I changed it to be only readable by the owner (and made my BackupPC user the owner), so it’s somewhat safer. Now I’m logging in as a user and backing up the shares that I want, without having to create windows shares on my XP machine.
Filed under Linux