Mapping Windows Drive to Mac and synchronizing contents

I have a mixed Windows and Mac O/S network. All machines have access to a shared area on a server (Windows) that gets regularly backed up. The aim of this exercise is to back the workstations up.

I have created mappings on the Macs to the server and set then up in System Preferences so they connect when the user logs in. This appears as a remote disk on the Desktop.

What I am unable to do is create an Rsync script that copies the selected folders from the Mac to the Server and then not sure how to synchronise then (this doesn't have to be done in real time, but every hour or on logon/logoff).

I have got as far as:
rsync -av --progress "Users/Username/Desktop/FolderToCopy" "RemoteDIskDesktopshortcut"

This would appear to be copying the files but they don't appear at the destination (most odd).

So how do I have to correctly phrase the rsync line and setup the synchronization? And most importantly is this the sanest way to do this?

Many thanks.
LVL 1
edhastedAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

serialbandCommented:
What exactly is your goal?  Is this for backup?  I suggest getting a time machine capable device for simpler management of Macs.  You can also get something like Crashplan or Mozy, or some such cloud system to better handle user system backups.


If you really want to do rsync, you need to specify the correct paths for rsync to work.

When you first open the terminal, you will be in the user's home folder.  If you did not change the folder to the desktop, then your command is actually trying to copy files from /Users/Username/Users/Username/Desktop/FolderToCopy to /Users/Username/RemoteDIskDesktopshortcut  You might want to check the user's home folder for a duplicate of his data, if that rsync pattern you've given is what you ran.

Also, how did you create that desktop shortcut?  Is it a unix link file or is it the Apple Finder shortcut?  The Apple finder shortcut is actually a special file, not a link and you can't copy it like that.

Assuming you mapped the drive properly, it will normally mount on the default /Volumes/ location with the share name.  (e.g. /Volumes/ShareName )

rsync -av /Users/Username/Desktop/FolderToCopy /Volumes/ShareName/RemoteDIskDesktopshortcut/
The leading slash (/) and the trailing slash (/) on the folder path is important.  Leaving them off will cause different behavior.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
edhastedAuthor Commented:
Thanks Serial - it is for backing up. If I had a Mac only environment I would have just time machined it. Thanks for your notes on rsync syntax and had got it working with AppleScript + Automator for the time being.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
rSync

From novice to tech pro — start learning today.