Home > Linux > Rsync to a mounted Linux CIFS share

Rsync to a mounted Linux CIFS share

I was in a position where I wanted to rsync some files from my Linux box to a NAS drive. The drive in question is a Lacie Internet Space (like this but white), which runs Linux. I guess because it’s designed mainly for Windows use, it uses the SMB/CIFS protocol.

In order to rsync files to the NAS, I mounted the drive with fstab. This worked OK, but when I tried to do rsync -va --del, I got a load of permissions errors, whether I ran it as me or root. The errors meant that file metadata wasn’t being transferred, but also that locally deleted files weren’t being deleted on the NAS (making the –del option useless).

I searched and searched for the solution, and everybody seemed to have it, but nothing worked. Then I came across KaZim’s fstab page. The answer which was eluding me was to add the noperm option to the relevant line in fstab. (Apparently it’s a problem with smb shares on Linux servers.) Here’s my working fstab entry:

//HIPSERV/MyBackup/Archie /mnt/backup cifs credentials=/root/.eve,nocase,noperm,file_mode=0777,dir_mode=0777 0 0

[It may be obvious to most people, but to mount everything in fstab do mount -a as root.]

And here’s the working rsync:

rsync  -va --del /home/nick/ /mnt/backup/
Categories: Linux Tags:
  1. July 12th, 2010 at 06:56 | #1

    i face this problem too recently.. it helps me a lot

    thanks

  2. July 3rd, 2013 at 10:35 | #2

    Government restrictions on mosques and Muslim practices have also become a growing source of tension, especially with Uighurs attracted to more conservative forms of Islam. The latest violence occurred less than two weeks before the start of Ramadan, the Muslim holy month. Some local governments in Xinjiang have sought to discourage Uighurs from their usual fasting at that time. Retro Jordans for Cheap http://www.hspa.com/product/NewJordans2013.php

  1. October 15th, 2012 at 15:18 | #1

Comments parsed as Markdown.