I know this is is an extensively documented subject and despite the pages and pages of information ive found on it online I still cant find a definitive answer to this question so please bear with me.
I have a linux server and im trying to back up said server onto a windows machine through ssh. Im using rsync and running it from the windows box with cygwin. The problem is the permissions and the ownership from the linux server the files are being pulled from is being changed to the window's user pulling the files with cygwin. For example linux test file is owned by user dog. User cat on the windows machine initiates the command with cygwin to rsync the files over. When I look at the test file that got copied over they are not owned by user dog anymore. They are now changed to user cat and the group just says "none". I hope this is all clear enough. The permissions are not copying over correctly either. It's staying 644 on the windows machine no matter what the original permissions were.
Obviously if I need to restore the backup in the future im going to want to be able to copy everything back over and have the same ownership and permissions that were originally there or a lot of things are going to be broken. Ive seen people suggest making scripts that change chmod and chown as the files are being copied but my server has several different users and a lot of different set permissions just as im sure most of us have so im not trying to micromanage the backup process "that" much. The command im typing is
rsync -av -e "ssh -p 44" root@blahblah:/home/dog/backup /backup/
I'll explain this a little. Yes, im running it via root so that I can copy even root's files over. It is through a private key that is command forced or whatever its called to only run specific commands as to mitigate the potential security holes caused by this. (im aware you can run rsync via sudo but i havnt had much luck with it and dont really understand how its any better if you are able to specify the only thing the root user is allowed to do). The "noacl" command that cygwin has in the fstab folder has already been put in per (https://cygwin.com/ml/cygwin/2011-02/msg00116.html). From what I understand that should keep windows from trying to make sense of linux's way of doing user:group/permissions and changing this amok. Unfortunately this has had no affect and I am only 80% sure ive done it correctly. Also the windows machine initiating the backup is the administrator. The only thing I can guess at is ive read a lot about both sides having to be root for everything to copy over correctly. From what ive seen cygwin cant be run as root or even sudo and im guessing being the administrator and running cygwin as administrator would be the equivalent. Maybe not.
I really dont understand what im doing wrong or why it's not working. If rsync just cant copy linux's files without changing things then why is rsync a viable option when it comes to backing your server up onto your desktop? Am I missing something or am I just asking too much from this program? Any help or enlightenment that you guys can give me would be amazing. This is driving me crazy. (Sorry this is so long. Im trying to be as thorough as possible with my question to make it easier for everyone involved)