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

Upload only changed iWeb files without .Mac Apps
For me, iWeb's biggest shortcoming is that when using it without .Mac, you much republish the entire site after each change. This gets you twice, once when you "publish to folder" from iWeb, and then again when you have to upload that whole folder to your site.

Since every file is rewritten to the folder, modification dates are useless for use with an FTP program that supports syncing.

But if you have a webhost or server that you have shell access to, and the host runs rsync (most unix-based hosts should have rsync installed), then you can use checksums to only send files that are different. All you need to do is use rsync with the -c option. If you are removing files, you may also want to add the --delete option. For example:
rsync -avc Sites/mysite/ username@webhost.com:webroot/
I still have not found a way to convince iWeb to only output the changed files to the folder, but this at least gets you out of numerous unnecessary uploads.
    •    
  • Currently 3.40 / 5
  You rated: 5 / 5 (5 votes cast)
 
[23,084 views]  

Upload only changed iWeb files without .Mac | 14 comments | Create New Account
Click here to return to the 'Upload only changed iWeb files without .Mac' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Upload only changed iWeb files without .Mac
Authored by: tofergregg on May 25, '06 07:56:21AM

Good hint, although I use CaptainFTP with the Synchronize option to do the same thing with a nice GUI interface (although it is shareware).

-Chris



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: ptone on May 26, '06 09:00:35AM

I don't use captainFTP, but I'm almost certain it uses file modification dates for its sync. Since iWeb republishes every single file in your site to a local folder after any change, the FTP program will think every single file has changed and reupload it.

-ptone



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: TheCrunge on May 25, '06 08:04:03AM

Though the sync method is probably faster, you can actually publish directly to a webserver using WebDAV. If you have a WebDAV share mounted, just point to that as the "local folder" to publish to. Of course, using this method, you are pushing the whole site to the server, where publishing to a "real" local folder, then using rsync to upload the changes, is probably faster.



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: sophistry on May 25, '06 08:34:03AM

Have you actually tested using WebDAV? I did when iWeb first came out and it didn't work. I forget what the error was, but it failed to publish to the mounted folder. Tell me I'm wrong, please.

---
soph



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: TheCrunge on May 26, '06 06:15:27AM

Indeed I have. It's the primary way that I publish in iWeb. Initially, the permissions on the realm need tweaking, especially when you are getting into sub-folders, but it does work. Verify you can write to the share (after authenticating based on the permissions you set).



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: tofergregg on May 26, '06 08:39:01PM

Actually, you can set CaptainFTP to ignore file creation dates, and it will make a
comparison of file sizes and transfer only ones that have changed. I've found a
couple of times when this results in a mistake (when the file sizes happen to be
exactly the same), but that is extremely infrequent.

-Chris



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: twijit on May 25, '06 09:14:39AM

What is shell access...could you elaborate further? I use Transmit...could I do this with that program?



[ Reply to This | # ]
shell access
Authored by: escowles on May 25, '06 09:58:11AM

Shell access means being able to connect to the remote system using ssh (or rsh) and execute commands. Many webhosts don't provide this, since it can allow remote users to exploit local security compromises (which are more common than remote compromises).

I recently switched my web hosting to .Mac, and I have to say I don't like the WebDAV based file uploading at all. It is much, much slower than ftp or ssh. And it doesn't work well with rsync. Even when you mount your iDisk and use rsync between the two local paths, it's terribly slow, and the file modification dates are all messed up (upload time is used, not the original creation/modification time). So I'm going to cancel my account and switch to someone who provides shell access.



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: TekkNick on May 25, '06 12:29:10PM

Shell access is pretty uncommon. But you should be able to work around that problem by rsyncing the directory locally like this:

rsync -rlpgovc Sites/mysite/ Sites/mysite_updated

Then you can use an FTP program that supports syncing to upload the files that have changed in mysite_updated to your web server. The only difference between the above rsync command and the original is that it will not update the timestamp on files that have the same checksum.



[ Reply to This | # ]
It will not work for me.
Authored by: uhlhorn2 on May 26, '06 07:44:30AM
I've tried this:
rsync -avc "/Applications/MAMP/htdocs/iWeb_upload/Website/" "user@xxx.xxx.xxx.xxx:AgenturALT/Website/"
(for "user" i use the user name, and for "xxx.xxx.xxx.xxx" I use the real IP)

But it will not work. I got this:

PowerBook-Gerhard-Uhlhorn:~ gerhard$ rsync -avc rssh "/Applications/MAMP/htdocs/iWeb_upload/Website/" "user@xxx.xxx.xxx.xxx:AgenturALT/Website/"
Address xxx.xxx.xxx.xxx maps to kundenserver.de, but this does not map back to the address - POSSIBLE BREAKIN ATTEMPT!
user@xxx.xxx.xxx.xxx's password: 

This account is restricted by rssh.
Allowed commands: sftp 

If you believe this is in error, please contact your system administrator.

rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-24/rsync/io.c(359)
PowerBook-Gerhard-Uhlhorn:~ gerhard$


What is the problem?

Greetings from Hamburg, Germany
Gerhard Uhlhorn

---
www.uhlhorn-agentur.de
www.uhlhorns.de

[ Reply to This | # ]

It will not work for me.
Authored by: ptone on May 26, '06 09:07:20AM

This looks like an issue with the machine your DNS on your computer. The host you are communicating with is checking whether the IP number you are sending from, matches the name it looks up to (and then is backchecking that name). Its a security check to make sure its not an IP spoof. But this could be getting you depending on how your ISP is set up. I'd send a copy to your webhost support with out the IP xxx'd out, and see if they agree - you may then need to go to your ISP and see if you can get a valid hostname assigned to your IP.

-ptone



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: Gabs on Jul 19, '06 03:50:14AM

I like your thinking!



[ Reply to This | # ]
Upload only changed iWeb files without .Mac
Authored by: Gabs on Jul 19, '06 05:25:24AM

[I like your thinking] ... TekkNick



[ Reply to This | # ]
It will not work for me.
Authored by: matx on May 29, '06 01:58:10PM

I would check that you can ssh into that machine... If it gives you the same error,
then delete .ssh/known_hosts... If not then maybe they don't support rsync.
Though if they support ssh, the you can use sftp, and a previous hint to sync local
changes.

---
Mat X -- VFX Mac Tech



[ Reply to This | # ]