I have an iPhone and iPod touch and recently bought Plants vs Zombies (again, I already finished the game on the PC) on both devices because I use them interchangeably and it’s just that good. A problem did quickly crop up, though, and the problem was “How can I quickly copy the game data from one device to the other?” I don’t want one device to be behind the other.

Initially, I tried to get AppBackup to backup both folders, copy the backup from the iPod to the desktop and then copy it to the iPhone and restore it in AppBackup, but that takes way too long. Then I tried to do it with Unison but I have to install it on both devices, which needs a cross-compiler, and I couldn’t be bothered. Third attempt was with rsync but it can’t do ssh to ssh directly.

In the end, I decided to try a program I wrote a while ago, omnisync. The problem with me is that I always consider my own code too inferior for anything, so I never use anything I wrote. Mozilla uses omnisync, though, so that should count for something, right?

So, I fired it up and did:

omnisync sftp://root@iPod//datafolder sftp://root@iPhone//datafolder

It transferred the files and stopped, I launched the game on the iPhone and everything was there!

So, that’s the way to transfer data between two SSH (or a multitude of other protocols) hosts. Just install omnisync (you can also use pip or easy_install) and copy between the two folders!