Files not copied when backup directory is on smbfs

Mount a samba share using smbmount and then configure Back In Time to save snapshots into this share. Taking a snapshot don’t work, only some directories are created.

After some investigation: using a windows share it works, using a samba is doesn’t work.

Samba provide some extensions to the protocol to support uid/gid and permissions.
I mounted the share using smbmount (‘sudo smbmount’) and I create a directory: the user/group of the new directory are root/root and the permissions are user:rwx and group/other:rx only. Then creating a sub-directory will fail since I don(t have the rights.

To void problems the only solution I found is to mount the share using “-o nosuids,noperms” arguments (not uid/gid and no permissions). This way the application seems to works. The only problem is that snapshots are no longer read-only. Starting from version 0.9.24, user/group and permissions are stored in a special file so restoring them should be OK.

7 Responses to “Files not copied when backup directory is on smbfs”

  1. JW_00000  on September 7th, 2009

    I had the same problem when my snapshot folder was owned by root. (I don’t know whether the fact that this was on a USB disk has anything to do with it.) I had to recreate the folder with me as owner and now everything works correctly.

  2. mtb-cliff  on May 4th, 2010

    I am running Back in Time 0.9.26 (Karmic) and I still have this issue. It is/was driving me crazy as to why the folders were getting created, but none of the files. Is this the same issue? I am backing up to an Ext2 NAS that is shared with Samba. As it is a NAS, it has several users on it and I really would like to keep the permissions in place.

    Thanks, Cliff.

  3. Teambob  on November 15th, 2010

    I got backintime version 0.9.26 to work with a Windows server by changing a line in the /usr/share/backintime/common/snapshots.py file.
    FROM:
    rsync_prefix = ‘rsync -aEAX ‘
    TO:
    rsync_prefix = ‘rsync -rt ‘

  4. paulatz  on November 27th, 2010

    It took me quite some time to work out the origin of this issue. In my case it was happening with a samba share mounted from a wd MyBook World hard disk.

    It is caused by a bug in the samba/cifs server of the disks that causes rsync to fail to set the correct time of files. A symptom is that you can still change the times with the “touch -d ” command.

    The solution I found here http://community.wdc.com/t5/My-Book-World-Edition/CIFS-problem/td-p/15421 worked for me: add the nodfs to the mount options of the samba share.

    After that backintime works correctly: no errors are issued and backups are incremental.

  5. paulatz  on November 27th, 2010

    Sorry for the double post, but I have to add one more little issue: times on some filesystems (namely vfat, maybe ntfs) are rounded up to the neares even second (0,2,4,6,..,60). Thus, it is necessary to add the –modify-window=X option to rsync command line wit ha value of X of at least 2 (but I use 10 for good measure) to avoid copying the same data ovre and over.

    Merci beaucoup! backintime, c’est bien le meilleur soft pour backup sur linux et le seul avec une interface pour kde4.

  6. Benki  on May 3rd, 2011

    Teambobs’ solution works fine for me! You saved my day! Thanks a lot.

  7. mabunix  on July 29th, 2012

    Still have the problem in version 1.0.8-3 running on Archlinux. BIT destination is a share on Apple Timecapsule.

    The mount options (autofs) are:
    user=username,password=topsecret,rw,hard,nosetuids,noperm

    The result is no backup, only some empty directory on the share after running BIT.

    Example log entry:
    [E] Error: rsync: symlink “/media/TimeCapsule/backintime/ares/mabunix/1/new_snapshot/backup/etc/ssl/certs/thawte_Primary_Root_CA_-_G3.pem” -> “/usr/share/ca-certificates/mozilla/thawte_Primary_Root_CA_-_G3.crt” failed: Operation not supported (95)

    Are there some more options I missed to set in BIT?

    Thanks for help.

    Mabunix


Leave a Reply