Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Automatically upload published-to-folder iWeb sites' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Automatically upload published-to-folder iWeb sites
Authored by: jtratcliff on Aug 21, '06 01:12:20PM
Why not just use a rsync to synchronize the Mac's Sites folderwith the linux box?

No need to delete anything since rsync only syncs stuff that has changed. Plus you get the bonus of being able to do it via ssh, so your passwords are not sent in the clear. And if you set up public/private keys, you won't need a password at all...

Here's a rough outline of the steps to take... the ssh details can be found in any ssh tutorial, and the rsync man page is fairly useful too:

  1. on the Linux box, make sure sshd is running and that the /etc/sshd_config file has "PubkeyAuthentication yes" in it (I think it is, by default)
  2. on the mac run, ssh-keygen as the user who will be transfering files, for instance...

    % ssh-keygen -b 1024 -t dsa

    to create a 1024 bit DSA public/private key pair

  3. copy the public key ( ~/.ssh/id_dsa.pub) from the mac into the ~/.ssh/authorized_keys file on the linux box
  4. make sure it works by ssh-ing or sftp-ing from the mac to the linux box
  5. once it works, test out mac -> linux rsync-ing of files, e.g.:

    rsync -e ssh -az ~/Sites/ UserID@linuxbox.domain:/path/to/webspace/.

  6. one you get that working as you like, wrap it in a cron job, applescript, automator action, or whatever you like....

    [ Reply to This | # ]
10.4: Automatically upload published-to-folder iWeb sites
Authored by: pglock on Aug 22, '06 06:17:09AM

This prompts me to add: Transmit also has the ability to only upload changed files, choose 'Synchronize' rather than 'Mirror' in the Automator action. The downside of this is that any pages or content you remove in iWeb will remain on the web server.

P.S. Even though the 'Site' folder is wiped each time, the iWeb documents remain in your documents folder so you don't lose them as one comment seemed to suggest.

---
Too lazy to think of an original signoff...



[ Reply to This | # ]
10.4: Automatically upload published-to-folder iWeb sites
Authored by: jtratcliff on Aug 22, '06 01:14:39PM

I don't know about Transmit but rsync has a "--delete" option that will remove anything at the destination that doesn't exist on the host...

% rsync -az --delete -e ssh Source User@destination/path/to/desired/location



[ Reply to This | # ]