For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > Simplistic Hosting Management

Simplistic Hosting Management

Created by dave. Last edited by dave, 12 years and 304 days ago. Viewed 1,863 times. #3
[diff] [history] [edit] [rdf]
labels
attachments

Problem

  • I have a large website, generated by perl scripts on my local system, which must be then uploaded to the host system.
  • Since the vast majority of the web site (in terms of large files) is made up of image files that don't change, I would like to avoid re-copying files every time which don't change.
  • My web host does not provide a mechanism to do this.

Available Assets

  • I run Linux on my local system.
  • I have shell access to the limited environment on my host system.
  • My web host runs Linux on my host system.
  • rsync source code.

Solution

  • build rsync as a staticly-linked binary (as a hint, see Building Static Programs). The only binary I had to upload to my webhost was the rsync binary itself.
  • rsync your current layout down to your local system. Edit this script to fit your particular layout:
#!/bin/bash

for i in html blog wiki ; do rsync -avW --size-only --rsync-path=/home/xdroop/bin/rsync -e ssh user@www:/var/www/$i/* ~/webhostingbase/$i done

  • make your changes locally
  • rsync your website back up (you might want the --delete flag on the upload if you clean up your website any -- check your man pages)
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt