0

I have two Macs, I would like to use rsync to sync the home folder, preferences (if it's possible) and Applications.

I want rsync to run automatically if any file in these two Macs are changed, I want it to be synced completely and wirelessly.

Is it possible to make a .command file after writing the codes?

I would like to have a full tutorial on this, I've finding a lot of softwares online and also asking it everywhere. I can't get a cheap or free option to sync my 2 Macs easily. Thanks a lot!

  • 2
    don't do it. rsync is good for syncing one file to another host, but not bidirectional. It is indeed possible but it is too dangerous regarding deleted files. but maybe unison gets closer. I don't know how far these are mirrored, but you can get a lot of trouble. – rwenz3l Jun 7 '14 at 19:20
1

Even though I can tell, that this is a bad idea, here is my answer :

If you have a router in between, that should work, if not, you need to setup an Ad-Hoc network.

Set-Up a ssh-keypair :

ssh-keygen -t rsa
ssh-copy-id 'user@otherMac'

And write your rsync for each mac :

rsync -e "ssh" -rc --delete ~/ user@otherMac

(-e "ssh" = use ssh for transfer
-r = recursive
-c = compressed
--delete = delete files that are not on the local device
~/ = Home-Folder
)

U can, of course, adjust those.

If you don't have static IPs on the Macs, I guess you can call them by their DNS-Name, like "Toms-MacBook.local" or you can ping the DNS-Name and output the IP and give it to the rsync command.

And the delete option is the problem. If two macs are working at the same time, files are deleted when you are working. In such cases you would use a server.

In the end, you have to try it out and decide for yourself, if there is nothing to lose, I would also give it a try.

  • Thanks! Thats is really risky, it could delete files while I am working. I'll still use other apps to do this. Thanks! – Jimmy Wong Jun 8 '14 at 6:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .