Automatically download copy of site and email .zip?

CLKeenan

Banned
Jun 24, 2006
2,506
14
0
Boston, MA
Is there a way I can develop a cron job of sorts that will download an entire copy of the site (it's pure HTML/images/css -- no database queries/php code/etc) and then automatically email that .zip file as an attachment to a mailing list.

Bonus points if it can be sent out whenever a change is made to any of the files within the site.

Simple solution (which is also ok) is to automatically zip up the file and store it in a publicly accessible place.

Any help would be greatly appreciated!

-Chris

P.S. Just to be clear, I have FTP/root access to the server.
 


If I were to do this in python (it's the same in any other language I think), I'd find all files in the folder using the glob module. I'd then create a hash of each file (or maybe a has of all files concatenated together, but that'll use more memory). I'd then compare this to the last run. If different, I'd make the zip and email it.
 
You could just use rsync if you wanted to make an off site backup.