0

I'm having problem using cwrsync to backup my data to an external drive as no data can't be opened on other computers because of permissions cwrsync sets.

This is my backup batch script:

@ECHO OFF
SET RSYNC=D:\Software\Portable\Rsync\bin\rsync.exe
SET ARGS=-rltShv --delete --chmod=ugo=rwX
SET EXCLUDES=--exclude-from="/cygdrive/d/Software/Portable/Rsync/excludes.txt"
for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set date=%%k%%j%%i
SET LOG=--log-file="/cygdrive/d/Software/Portable/Rsync/logs/%date%.log"
SET BACKUP=%RSYNC% %ARGS% %EXCLUDES% %LOG%

%BACKUP% "/cygdrive/d/" "/cygdrive/h/D/"
%BACKUP% "/cygdrive/e/" "/cygdrive/h/E/"
%BACKUP% "/cygdrive/f/" "/cygdrive/h/F/"

My fstab:

none /cygdrive cygdrive binary,posix=0,user,noacl 0 0

These are permissions I get:

enter image description here

All are emtpy for all users hence inability to open them elsewhere.

Can anyone help, please?

This thing is quite annoying and all GUI apps i tried sucked and this is what i want to work with

dzhi
  • 117
  • 1
  • 10
  • You know what, I don't care for rsync any more. It gave me so much trouble on Windows (on Linux works like a charm) so I decided to ditch it for Robocopy. – dzhi Jan 20 '15 at 16:14

2 Answers2

0

One word, Robocopy.

I tried numerous things but none seemed to work so I gave up eventually.

This is default Windows tool and has similar (for this purpose, the same) feature set.

I discovered it last night and ditched rsync completely. It's built for unix-like's so some sort of bummer is expected on Windows.

This got me started:

http://www.sevenforums.com/tutorials/187346-robocopy-create-backup-script.html

Here's the little backup script I made for myself to mirror my partitions to external drive.

Don't look back for rsync on Windows anymore!

dzhi
  • 117
  • 1
  • 10
  • Honestly, i tried several variations of setup and always got the same result so something else must be the problem. I got frustrated and went for other solution i tried and which worked immediately without any weird configuration and 3rd party software. Im done searching for backup software. – dzhi Jan 22 '15 at 00:03
0

This problem was answered at Can't figure out permissions. Shortly, there is no need to use options --chmod=ugo=rwX, and you need to make sure that fstab is located at etc directory - Check a related Itefix FAQ for more information. Anyway, if Robocopy works for you, then no problem actually :-)

itefix
  • 31
  • 2
  • I don't know if you actually tried this solution but it doesn't work. – dzhi Jan 22 '15 at 15:44
  • 1
    Yes, it seems to work. fstab file should have unix line endings and a line feed is required even if the file has only one line. – itefix Jan 24 '15 at 08:03
  • Yes, I've tested this and must say that it works. My fstab didn't have line feed at the end and didn't worked because of that. Such stupid stuff should be documented on that FAQ page as bunch of people are having exactly the same issues. – dzhi Jan 25 '15 at 00:15