ahimsa-rsync1.indymedia.org info

This box is a dedicated rsync server.

See the MirrorHowTo for some more rsync info.

More stuff will be added to this page soon (hopefully)!

Sample rsync via ssh script

To sync your site to ahimsa-rsync1 you need to have an account and have ssh keys set up, ask about this in #ahimsa on irc.indymedia.org.

Following are a couple of example scripts for runing the sync.

Using a simple lock file

#!/bin/bash

LOCKFILE=/tmp/rsync.mysitename
SYNC_FROM=/path/to/site/on/local/publishing/box/
SYNC_TO=user@remotehost.example.com:/path/on/remote/server/

lockfile -r 1 $LOCKFILE || exit 23

if [ -f $LOCKFILE ]
then
      echo locked!
      exit 77
else
      touch $LOCKFILE
fi

rsync -e 'ssh' --timeout=120 -CLrptzv --bwlimit=200 --exclude=robots.txt $SYNC_FROM $SYNC_TO

rm -f $LOCKFILE

Using flock

#!/bin/bash

LOCKFILE=/tmp/rsync.mysitename
SYNC_FROM=/path/to/site/on/local/publishing/box/
SYNC_TO=user@remotehost.example.com:/path/on/remote/server/

(
  flock -e 200 || exit 23

  rsync -e 'ssh' --timeout=120 -CLrptzv --bwlimit=200 --exclude=robots.txt $SYNC_FROM $SYNC_TO

) 200>$LOCKFILE
Topic revision: r2 - 09 Apr 2005, ChrisC
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback