I've been looking for a way to sync a local directory with an FTP location. I'm trying to replicate the way Dreamweaver can edit files locally, and then sync them later with an FTP server.
After much searching, I thought I'd found a method - use curlftpfs to mount the FTP site as if it was a local folder, then use Unison to sync them. All went well in the setup, until I tried syncing from the REAL local folder to the mounted FTP folder.
For the sake of clarity, here is a mock up of my setup:
Real directory: /home/user/websites/mysite.com
Mounted FTP dir: /home/user/ftpmount/mysite.com
I can create/edit/delete files in both directories directly.
If I edit a file, or delete one, in the mounted FTP dir, then run Unison, it will sync those files back to the local dir. Great. If I change a file in the FTP dir, then sync, it errors, with something like the following:
Code:
test.txt
Error in copying locally:
No such file or directory [open(/home/user/ftpmount/mysite.com/.unison.test.txt.840c8ac9c84ef4c6286a10b13833dcf4.unison.tmp)]
Anyone see any obvious errors in what I've done, or have I been caught out by thinking I could get around Unison not supporting FTP by using curlftpfs?
Thanks,