jeinarsson / josync

josync.readthedocs.org
MIT License
0 stars 0 forks source link

Hints for documentation #36

Open rasmuse opened 10 years ago

rasmuse commented 10 years ago

After a little bit of tinkering, I have successfully set up a josync job from my work computer to the company network. A couple of things noted on the way which may help other users:

Escapes

I am backing up to my home folder on the network, which is located at something like \\domain.com\myfolder. Writing a josync-job file with

"target": "\\domain.com\myfolder\sync"

fails with an error message like josync_run [ERROR] Josync job test.josync-job failed with an exception: Invalid \escape: [line/column/char].

Everything works well after escaping the path like

"target": "\\\\domain.com\\myfolder\\sync"

File permissions

The other problem is that I don't have "Full control" permissions on my home folder on the network. I can read/write/modify/execute, but not change NTFS permissions on files. The result was that each file in the backup generated a warning message like

utils [WARNING] rsync: failed to set permissions on "//domain.com/myfolder/sync/myfile.ext": Permission denied (13)

and at the end also

utils [WARNING] rsync error: some files/attrs were not transferred (see previous errors) (code 23) at /usr/src/ports/rsync/rsync-3.0.9-1/src/rsync-3.0.9/main.c(1052) [sender=3.0.9]

and finally, after successfully deleting the shadow copy, josync threw an error

josync_run [ERROR] Josync job test.josync-job failed with an exception: rsync returned with exit code 23.

The backup seemed to work though, all files being copied with reasonable file permissions etc. But the error was annoying me and I eventually found a solution. You can tell cygwin to not modify the file system Access Control Lists (ACLs) as explained in the cygwin documentation. Long story short, problem was solved by adding the noacl option in the the file c:/cygwin64/etc/fstab. My fstab file now says

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

and everything now works like a charm.