ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Ivan Fedorov <ns@altlinux.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@altlinux.ru>
Subject: Re: [sisyphus] Архив ежедневных срезов Сизифа
Date: Mon, 31 Jan 2005 18:29:25 +0800
Message-ID: <41FE0885.8070006@altlinux.ru> (raw)
In-Reply-To: <20050131100941.GD26695@basalt.office.altlinux.org>


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

Dmitry V. Levin пишет:
> On Mon, Jan 31, 2005 at 05:56:37PM +0800, Ivan Fedorov wrote:
> 
>>Denis Smirnov пишет:
>>
>>>On Sat, Jan 29, 2005 at 09:10:49PM +0300, Dmitry V. Levin wrote:
>>>
>>>
>>>>>Гхм. Смотрю внимательно логи -- действительно пришло. Но altlinux-release
>>>>>почему-то не меняется. Хм.
>>>
>>>DVL> А зачем его каждый раз менять?  altlinux-release - это же ручная работа.
>>>DVL> Каждый раз меняется, например, Sisyphus/i586/base/release.
>>>
>>>Понял. Бум править скрипт.
>>>
>>
>>Могу выслать свой...
> 
> 
> Я использую примерно такой скрипт.

Какой-то он непонятный... :)

Вот мой.

[-- Attachment #1.2: update_Sisyphus --]
[-- Type: text/plain, Size: 1861 bytes --]

#!/bin/sh
#
# Copyright 2004 (c) Michael Shigorin <mike@osdn.org.ua>
# Copyright 2004-2005 (c) Ivan Fedorov <ns@altlinux.ru>
# script for snapshotting ALT Linux Sisyphus locally.
#
#

# mirror/site-specific
SRC="rsync.altlinux.ru::ALTLinux/Sisyphus/"
BASEDIR="/var/ftp/pub/distributions/ALTLinux/Sisyphus-daily/"

########################################
###SRC="sisyphus.irkutsk.ru::ALTLinux/Sisyphus/"
###BASEDIR="/var/tmp/SIS/Sisyphus-daily/"
########################################

# retry params
MAXCOUNT=10
TIMEOUT=60

# shouldn't need to be changed
DATE=`date +%Y%m%d`
DATE_P=`date +%Y/%m/%d`
DATE_Y=`date +%Y`
DATE_M=`date +%m`

########################################
###DATE=`date +%Y%m%d -d 1day`
###DATE_P=`date +%Y/%m/%d -d 1day`
########################################

LOGDIR="$BASEDIR/../log/"
LOGFILE="$LOGDIR/Sisyphus_$DATE.log"
DEST="$BASEDIR/.syncing"

RSYNCARGS="-vaz --stats --delete-after"

unset OK

# init env
mkdir -p "$BASEDIR/$DATE_Y/$DATE_M" "$LOGDIR"
cd "$BASEDIR" || exit 1

# create hardlinked copy or init dir; order critical
LAST=`ls -d1 20??/??/?? 2>/dev/null | sort | tail -1`

########################################
###LAST="2005/01/19"
########################################

rm -rf "$DEST"
mkdir -p "$DEST"

[ ! -d "$LAST" ] && {
  echo "Can't create $DEST" >> "$LOGFILE"
  exit 1
}

for attempt in `seq 1 $MAXCOUNT`; do 
	rsync $RSYNCARGS "$SRC" "$DEST" --link-dest "$BASEDIR/$LAST" 2>&1 >> "$LOGFILE" && {
		OK="yes"
		break
	}
	sleep "$TIMEOUT"
done

[ -z "$OK" ] && {
  echo "Syncing problems" | tee -a "$LOGFILE"
  exit 1
}

[ ! -d "$BASEDIR/$DATE_P" ] && {
	mv "$DEST" "$DATE_P"
	# fix symlink
	rm -f $BASEDIR/../Sisyphus
	ln -s Sisyphus-daily/"$DATE_P" $BASEDIR/../Sisyphus
} || {
	echo "$DATE_P already exists" | tee -a "$LOGFILE"
	mv "$DEST" "$DATE_P.new"
	exit 2
}

echo "** $DATE sync OK" >> "$LOGFILE"

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

  reply	other threads:[~2005-01-31 10:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-29 16:06 Денис Смирнов
2005-01-29 16:43 ` Sergey S. Skulachenko
2005-01-29 16:47   ` Denis Smirnov
2005-01-29 18:10     ` Dmitry V. Levin
2005-01-30 13:03       ` [sisyphus] " Michael Shigorin
2005-01-30 14:56         ` Denis Smirnov
2005-01-30 14:53       ` [sisyphus] " Denis Smirnov
2005-01-31  9:56         ` Ivan Fedorov
2005-01-31 10:09           ` Dmitry V. Levin
2005-01-31 10:29             ` Ivan Fedorov [this message]
2005-01-31 10:44               ` [sisyphus] " Michael Shigorin
2005-01-31 12:28               ` [sisyphus] " Dmitry V. Levin

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=41FE0885.8070006@altlinux.ru \
    --to=ns@altlinux.ru \
    --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