ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@osdn.org.ua>
To: sisyphus@altlinux.ru
Subject: [sisyphus] Re: Зеркало
Date: Tue, 20 May 2003 18:59:16 +0300
Message-ID: <20030520155915.GJ17823@osdn.org.ua> (raw)
In-Reply-To: <20030515113240.GB13734@new.solutions.lv>


[-- Attachment #1.1: Type: text/plain, Size: 364 bytes --]

On Thu, May 15, 2003 at 02:32:40PM +0300, Dmitry Ivanov wrote:
> 2) Где прочитать про технологию синхронизации?

У меня это делает скрипт, помещенный в аттач.

Тупой, но работает.  Синхронизирует покомпонентно, выставляя
файл-флажок (__SYNCING__) на время процесса.

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/

[-- Attachment #1.2: rsync-all.sh --]
[-- Type: text/plain, Size: 1198 bytes --]

#!/bin/sh
RSYNC_RSH=rsh
MAXATTEMPTS=5
TMOUT1=500
TMOUT2=15
SRCROOT=rsync://rsync.altlinux.ru/ALTLinux	# 2003-04-15
#SRCROOT=rsync://ibiblio.org/Linux/distributions/altlinux	# 2002-12-07
#SRCROOT=rsync://ftp.leo.org/ALTLinux	# 2002-12-09
DESTROOT=~ftp/pub/Linux/ALT
#LIST="updates Sisyphus OpenOffice Mozilla"
LIST="updates Sisyphus OpenOffice Mozilla"
#LIST="updates"
RSYNC=/usr/bin/rsync
RSYNCARGS="-rltgoDu --partial --timeout=$TMOUT1 --delete --delete-after"
RSHOME=~/rsync
MAINTAINER=mike@osdn.org.ua

for mirror in $LIST; do
	OK=
	attempt=1
	LOG=$RSHOME/rsync-$mirror.log
	LOCK=$RSHOME/lock.$mirror
	FLAG=$DESTROOT/$mirror/__SYNCING__
	date >> $LOG
	[ -f $LOCK ] && {
		ps auxww | grep rsync | mail -s "OSDN: $mirror: lockfile exists" $MAINTAINER
		echo "Lockfile for $mirror exists, quitting" >> $LOG
		continue
	}
	trap "rm -f $LOCK; exit 1" INT
	touch $LOCK $FLAG
	while [ -z "$OK" -a $attempt -lt $MAXATTEMPTS ]; do 
		$RSYNC $RSYNCARGS $* $SRCROOT/$mirror/ $DESTROOT/$mirror \
			>> $LOG 2>&1 && OK=1
		sleep $TMOUT2
		attempt=$(($attempt+1))
	done
	[ -z "$OK" ] && {
		tail $LOG | mail -s "OSDN: $mirror trouble" $MAINTAINER
rm -f $LOCK
	} || {
		rm -f $LOCK $FLAG
	}
	date >> $LOG
done

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2003-05-20 15:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-15 11:32 [sisyphus] Зеркало Dmitry Ivanov
2003-05-15 11:45 ` Sergey S. Skulachenko
2003-05-15 11:52   ` [sisyphus] Зеркало Vitaly Ostanin
2003-05-15 15:10 ` [sisyphus] Зеркало Maxim Tyurin
2003-05-16  9:24 ` "Андрей В. Кулешов"
2003-05-20 15:59 ` Michael Shigorin [this message]
2003-05-20 20:24   ` [sisyphus] Зеркало Dmitry Ivanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030520155915.GJ17823@osdn.org.ua \
    --to=mike@osdn.org.ua \
    --cc=sisyphus@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git