6 Replies Latest reply: Feb 17, 2015 11:11 AM by Darrell Stall
Matteo_999 Level 1 Level 1 (0 points)

I'm trying to sync two folders, one on my mac and one on another mac.

The path of the folder on my mac is "/Users/Matto/Music/iTunes/iTunes Media/Playlists" and the path of the remote folder is "/Users/UnicoMusic/iTunes/iTunes Media/Playlists".

What is the syntax of the command line?

 

I tried with "rsync -vaE /Users/Matto/Music/iTunes/iTunes Media/Playlists [NAME OF OTHER MAC]@[IP]://Users/Unico/Music/iTunes/iTunes Media/Playlists

but it doesn't work. Where am I wrong?

  • Linc Davis Level 10 Level 10 (154,825 points)

    In order to use rsync over a network, you must either have SSH (remote login) set up on the destination, or an rsyncd server. Do you have either of those?

  • Matteo_999 Level 1 Level 1 (0 points)

    I enabled the remote login in System Preferences>Sharing>Remote login and it says that in order to login through remote, type "ssh Matto@[MY IP]".

    So I tried with "rsync -vaE /Users/Unico/Music/iTunes/iTunes Media/Playlists ssh Matto@[IP]://Users/Matto/Music/iTunes/iTunes Media/Playlists"

    but doesn't even work.

  • Linc Davis Level 10 Level 10 (154,825 points)

    First, back up all data on the destination. Then test the SSH connection. If it works, try this:

     

    rsync -Eav --delete Music/iTunes/iTunes\ Media/Playlists/ Matto@destination-host:Music/iTunes/iTunes\ Media/Playlists
    

     

    Here "destination-host" should be a resolvable name (not an IP address) for the host you're copying to, either a Bonjour name (*.local) or a unicast domain name.

     

    This command will make the remote "Playlists" folder an exact copy of the local one, which means that everything not in the source folder will be deleted. If that's not what you want, omit the "--delete" option.

  • Darrell Stall Level 1 Level 1 (10 points)

    Is there an Apple Support doc or an online tutorial that explains step by step how to sync two Macs using rsync and Automator?
    I just had to buy another Mac due to failure of MBPro 2011, and now I'm faced with keeping both machines current given that MBPro could fail yet again and perhaps again.

    I have exact same system on a Mac Mini that was on the MBPro when it bricked, that I've been using for over a week.
    When I get the MBPro fixed, I want to restore system, then sync to the Mac Mini so that the MBPro system is brought up to date with the Mac Mini.

    Thereafter, I'll be primarily using the MBPro, so I'll want to do the same thing with the Mac Mini which will be relegated to being a media server.

    The volume names are MAC_MINI and MAC_MBP.

    Where can I find step by step instructions for doing this?
    Which folders do I need to sync in order to keep systems on both machines current with each other?

    Will I be able to use rysnc and Automator to sync Applications, Library, System, and User folders on the main hard drives?

    Will syncing Mail v2 folder and Rules prefs be enough to keep Mail in sync?

    Which folders do I need to apply rsync/Automator method to so that Calendar and Contacts synced?

    Can I also apply it to my Documents, Music, Movies, and Pictures folders?

    Can I instruct rsync to delete files that aren't on the source volume?

  • Camelot Level 8 Level 8 (46,270 points)

    In addition to resurrecting/threadjacking an old thread, I think you may be going about this the wrong way.

     

    In general, I'd recommend against trying to sync two machines in this way - it's too prone for error and it's perfectly normal/typical for two different machines to have two slightly different setups, especially as far as things like the System and Library directories are concerned. Trying to manually sync these is asking for trouble, IMHO.

     

    Instead, since it sounds like you want to use the MBPro for daily use, with the Mini as a backup - why not do just that? Use the Mini as a backup destination using Time Machine. That way the Mini has an up-to-date copy of the entire MacBook Pro's setup which can be used to restore to any other machine should the MBP fail again. In this way not only are you running the preferred/recommended way of backing up your system in case of emergency, but you also have a continuous, recurring, point-in-time reference of your MacBook Pro without having to manually craft your own solution with the risks that are inherent in that approach.

  • Darrell Stall Level 1 Level 1 (10 points)

    In order to do what you suggest, Time Machine would have to create a bootable backup on my Mac Mini from my MacBook Pro, which T_M cannot do.
    I might be able to do that with Carbon Copy Cloner which can create bootable backups, but I'll have to fork out $40 after shelling out $800 for a "backup" Mac which I didn't want or need until my crAPPLE MacBook Pro 15", early '11 bricked, which seems to be a bad disease that's reaching epidemic proportions.