Skip to topic | Skip to bottom
Home
Sysadmin
Sysadmin.AhimsaRsync1Infor1.2 - 09 Apr 2005 - 22:58 - ChrisCtopic end
You are here: Sysadmin > AhimsaRsync1Info

Start of topic | Skip to actions

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

to top

You are here: Sysadmin > AhimsaRsync1Info

to top

Copyright © 1999-2008 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding this tool? Send feedback (in English, Francais, Deutsch or Dutch).