views:

25

answers:

1

Given a jailbroken iPhone and iPad, various windows machines, and a possible shared web host environment, how would I setup the iphone/iPad to automatically sync a folder of files, such that modifying the files or adding on the iPad would result in them being updated/added on the iphone within the file system ( assuming wifi/internet connection)?

I have SSH on both devices, and Im not fussed on wether the latest and greatest version of the file needs to be on a local desktop/laptop or remote host, so long as when the iPad and the iPhone come into contact on the wifi network, the two copy over the latest version of the file.

I am aware of tutorials using rsync, but this would require me to manually perform the operation, and I would like to automate this as much as is possible

A: 

You could start with dropping rsync in favor of unison, which is quite good at syncing files "the right way". It doesn't matter on which host you fire it up, it makes sure both have the most recent versions.

It also can use ssh natively. But you would need to get or build a version for the iPhone.

With that in place, set up RSA authentication (copy public key to otherhost:~/.ssh/authorized_keys2), and let the phone fire up unison every once in a while (using cron), or when the wifi fires up. (maybe find the iOS equivalent of post-up on the wifi interface)

mvds