rsync on Windows questions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

rsync on Windows questions

Fabian Cenedese
Hi

I'm using a cygwin compiled rsync on Windows to backup
and restore files from my local Windows computer. I'm trying
several destination types:

- remote with rsync://
- Samba share \\Server\Share
- local drive

I'm having problems with the user rights. The backup works
ok but after restoring some files I can't access them. I've
read that this is because rsync runs as cygwin user and the
*ix rights are completely different than the Windows ACLs.
I've tried various combinations of -o -g -acl -p etc. But none
worked so I could access my files immediately. Some people
had success when adding in their cygwin /etc/fstab a mount
parameter noacl. However I don't have a full cygwin, only the
rsync binary and the necessary cygwin dlls. The only
parameter that helped somehow was

--chmod=a=rwx,Da+x

Is there no other possibility? Can I maybe tell cygwin to use
a custom fstab from my installation directory? How do other
people use rsync on Windows?

And a second question: Do --copy-dest or --link-dest
help on local targets? Or does this create even
more stress on the disk?

Thanks

bye  Fabi



--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

Re: rsync on Windows questions

Simon Hobson-2
Fabian Cenedese <[hidden email]> wrote:

> I'm having problems with the user rights. The backup works
> ok but after restoring some files I can't access them.

That's to be expected.
NTFS has a very rich permissions system and rsync won't be capturing that. While it's a PITA, your best best is resetting permissions after restore. It's probably as 'simple' (for your own documents etc) to select the top level folder they are in, go to permissions, and have Windows re-apply them recursively - but as to the exact steps, I can't remember as Windows is something I avoid as much as I can get away with.

It's actually rather funny, but sad, that NTFS has a security model waaaaaay more capable and nuanced than most Unix systems (even some with ACLs) - yet until relatively recently, Windows didn't take advantage of this.

> And a second question: Do --copy-dest or --link-dest
> help on local targets? Or does this create even
> more stress on the disk?

I don't think NTFS supports hard links, and if it doesn't then link-dest won't work anyway.

Overall, while rsync is a good tool for many things, for backups in the Windows world it's probably not a good fit except for your own documents where it's "easy" to reset file permissions after a restore. Trying to do other than documents (ie the system and applications) is pretty well guaranteed to lead to security permissions screwed up to the point where it's not worth doing the backup in the first place.


--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

Re: rsync on Windows questions

Fabian Cenedese
At 10:12 01.07.2016, Simon Hobson wrote:
>> I'm having problems with the user rights. The backup works
>> ok but after restoring some files I can't access them.
>
>That's to be expected.
>NTFS has a very rich permissions system and rsync won't be capturing that. While it's a PITA, your best best is resetting permissions after restore. It's probably as 'simple' (for your own documents etc) to select the top level folder they are in, go to permissions, and have Windows re-apply them recursively - but as to the exact steps, I can't remember as Windows is something I avoid as much as I can get away with.

I know how to do it (or at least managed to do it manually), but this backup
and restore should also be usable for "normal" users that don't know about
or don't want to fiddle with access rights.

>Overall, while rsync is a good tool for many things, for backups in the Windows world it's probably not a good fit except for your own documents where it's "easy" to reset file permissions after a restore. Trying to do other than documents (ie the system and applications) is pretty well guaranteed to lead to security permissions screwed up to the point where it's not worth doing the backup in the first place.

This is meant to copy local documents so they're not lost in case of a
locky attack. This is not a complete backup, just kind of a Windows poor
man's time-machine where the files on the server are not accessible to
viruses. It'd be perfect if I could just force rsync to run as the local user
instead of some linux/cygwin user. OK, the best thing would be a native
rsync for Windows :)

There are several tools out there that use a cygwin rsync and just offer
a GUI for easier handling. I was wondering if they don't have this problem
or if they compile a special rsync without the user rights stuff.

Thanks

bye  Fabi


--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|

Re: rsync on Windows questions

Fabian Cenedese
At 10:35 01.07.2016, Fabian Cenedese wrote:

>At 10:12 01.07.2016, Simon Hobson wrote:
>>> I'm having problems with the user rights. The backup works
>>> ok but after restoring some files I can't access them.
>>
>>That's to be expected.
>>NTFS has a very rich permissions system and rsync won't be capturing that. While it's a PITA, your best best is resetting permissions after restore. It's probably as 'simple' (for your own documents etc) to select the top level folder they are in, go to permissions, and have Windows re-apply them recursively - but as to the exact steps, I can't remember as Windows is something I avoid as much as I can get away with.
>
>I know how to do it (or at least managed to do it manually), but this backup
>and restore should also be usable for "normal" users that don't know about
>or don't want to fiddle with access rights.

I'm now trying the MinGW/MSYS rsync. That is older (3.0.8) but seems to
work much better concerning user rights.

Thanks

bye  Fabi


--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html