You are not logged in.

#1 2009-01-04 02:54:40

moose jaw
Member
From: Milwaukee
Registered: 2007-08-20
Posts: 104

cifs mode issues; advice on backup strategy?

I recently acquired a new laptop (running Arch) and a new external hard drive (a 500GB Apple Time Capsule, chosen for ease of use with Macs in the house), and would love to get them to play nicely together for purposes of backing up my files.  I'd been planning to use rsync to make incremental backups (using the -a flag), but have run into the following problem: every time I mount the Time Capsule and run rsync, it wants to re-copy everything, not just those files that have changed since the last backup.  This is obviously a major time waste with tens of GBs of stuff being backed up each time.

I think that the problem may involve file and directory modes.  After the first rsync backup to the Capsule, all directories are 0777 and files are -rwxrwSrwx (whatever that is in octal).  But it's not just rsync that's failing to preserve the modes.  When I mount the Capsule and do a simple mkdir, the newly created directory is 0777 instead of 0755.  I've tried mounting with dir_mode=0755, to no avail.  Same thing with mount.cifs and plain old mount.

Does anyone know how to fix this problem?  Is there some option I can append to mount.cifs (or some config file) that will get the file and directory modes right?  Would that even solve the rsync incremental issue?  Is there some entirely different backup solution that would work better with the Time Capsule?  (I'm open to whatever, just want to backup.)  Maybe the Capsule's samba implementation is just flaky?  Any wisdom greatly appreciated.

Update (1/16/09): I've now found that I can do incremental rsync backups using the --size-only flag, so that rsync ignores discrepancies in permissions and modification times.  Among the various problems I've found in the interaction between rsync and cifs, the cifs mounted volume does not allow rsync to set the modification time (or permissions) on the copied files; everything ends up with a mod time of exactly when it was copied over by rsync.  Using --size-only is not an ideal solution, but it at least it keeps me from having to back up my entire /home every time.

Last edited by moose jaw (2009-01-16 23:51:46)

Offline

Board footer

Powered by FluxBB