I’ve been using Rdiff-backup to take an incremental backup every 15 minutes of the directory I store code in. Logic being that I occasionally decide to do some refactoring that I probably shouldn’t have, and if I’m not disciplined with using git then I don’t have a save point. I suspect I don’t really need this, but it’s been running.
Recently it started giving an error along the lines of :Exception ‘[Errno 22] Invalid argument: ‘/home/backups/development-apps/apps/tmp/rdiff-backup.tmp.479” raised of class ‘<type ‘exceptions.OSError’>’
This error was also distinguished by the fact that the line of code that python is trying to run is os.chown(self.path, uid, gid).
After some time poking around I found some extra options for rdiff-backup relating to verbosity – if you use the -v9 option then it writes what it’s doing to screen. This in turn then told me that the file it was attempting to process was .projects, which has group ownership of rvm.
I’m backing up to an NFS server, and the machine the NFS server is on doesn’t recognise the rvm group, as I don’t do any coding there. In short, if you’re using NFS then you really need all users and groups to be identical at both ends (both the name of the group and the guid), at least to the extent that any files are being created that you want to store on that file system. And whilst I run NIS+ across many of my servers, I’m not across this particular combination.
For now, workaround is to change the group on that file to something else that is common to both servers – in my case the “users” group. That seems to work just fine. Longer term, I need to sort out NIS+ on these machines, or potentially go to something more powerful like an LDAP or Kerberos.