Script works nicely...thanks!
On Sat, Jan 16, 2010 at 11:41 AM, Armin B. Resch <res...@sbcglobal.net>wrote: > Yes, my mirror broke, too. A post from Thomas in December confirmed rsync > and ftp will be turned off. In truth, though, plain rsync without more > sophisticated options won’t gain you much in through-put over HTTP because > the names of the SRPM files are versioned. > > > > Fwiw, here’s the script that I scheduled yesterday to continue mirroring: > > > > ------------------ > > #!/bin/bash > > > > SRCDIR=<absolute_path_to_your_repo_containing_the_index_file> > > LOGDIR=<absolute_path_to_a_log_directory> > > CURL=<absolute_path_to_your_curl_executable> > > > > ts=`date +%Y%m%d` > > log=$LOGDIR/sync_mirror-$ts.log > > > > SITE=http://download.openpkg.org > > TREE=packages/current/source > > IDX=00INDEX.rdf.bz2 > > > > cd $SRCDIR > > > > # Update index > > echo "============== Updating index ===============" \ > > >>$log 2>&1 > > $CURL $SITE/$TREE/$IDX >$IDX > > > > # Update repo > > for node in BASE CORE EVAL PLUS;do > > echo "=============== Processing node $node ===============" \ > > >>$log 2>&1 > > cd $node > > for FILE in \ > > `$CURL $SITE/$TREE/$node/ 2>&1 | grep 'class="file"' | \ > > sed 's/.*td valign//' | sed 's/img .*//' | \ > > sed 's/.*href//' | sed 's/.*"\(.*\)".*/\1/'`;do > > PKG=`echo $FILE | sed 's/-[0-9].*//'` > > oldpkg=`ls $PKG-[0-9]* 2>/dev/null` > > if [ "$oldpkg" = "" ];then > > echo "NEW: $PKG" >>$log 2>&1 > > $CURL $SITE/$TREE/$node/$FILE >$FILE 2>>$log > > else > > if [ "$oldpkg" != "$FILE" ];then > > echo "Updating package $PKG: old: $oldpkg new: $FILE" \ > > >>$log 2>&1 > > rm $oldpkg 2>>$log > > $CURL $SITE/$TREE/$node/$FILE >$FILE 2>>$log > > else > > echo No change to package $PKG >>$log 2>&1 > > fi > > fi > > done > > cd .. > > done > > --------------------- > > > > > ------------------------------ > > *From:* openpkg-users-ow...@openpkg.org [mailto: > openpkg-users-ow...@openpkg.org] *On Behalf Of *Doug Henry > *Sent:* Friday, January 15, 2010 9:36 AM > *To:* openpkg-users@openpkg.org > *Subject:* rsync access > > > > I have been rsync-ing the openpkg current repo for offline use ( > rsync.openpkg.org/openpkg-ftp/current/SRC/). Looks like rsync access went > away for the paths changed, I get the following error now when trying to > rsync: > > > > rsync: failed to connect to rsync.openpkg.org: Connection refused (111) > > > > Is there new information I can get to continue mirroring? > > > > Thanks. >