Mapping Windows Drive to Mac and synchronizing contents

edhasted
edhasted used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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.

Author

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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial