LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Using rsync to make your own Slackware mirror (https://www.linuxquestions.org/questions/slackware-14/using-rsync-to-make-your-own-slackware-mirror-776766/)

Laodiceans 12-18-2009 03:47 PM

Using rsync to make your own Slackware mirror
 
I have more than one machine with Slackware. So it make sense having a mirror of slackware on my machine. I will share the scripts with you. Enjoy!

Code:

#!/bin/sh
# $Id: rsync_current.sh,v 1.4 2005/09/11 14:13:23 root Exp root $
# -----------------------------------------------------------------------------
# Use rsync to mirror a Slackware directory tree.
# The default is to make a mirror of slackware-current, but you can alter that
# by running the script like this:
#
#  VERSION=10.1 rsync_current.sh
#
# ...which will mirror Slackware-10.1 instead.
# Also, all the parameters that you pass this script will be appended to the
# rsync command line, so if you want to do a 'dry-run', i.e. want to look at
# what the rsync would do without actually downloading/deleting anything, add
# the '-n' parameter to the script like this:
#
#  rsync_current.sh -n
#
# -----------------------------------------------------------------------------
# Author: Eric Hameleers <alien at slackware.com> :: 11sep2005
# -----------------------------------------------------------------------------
#
VERSION=${VERSION:-current}
TOPDIR="/home/kerml/backup/slackware/"
RSYNCURL="rsync://darkstar.ist.utl.pt/pub/slackware"

echo "Syncing version '$VERSION' ..."

if [ ! -d ${TOPDIR}/slackware64-$VERSION ]; then
  echo "Target directory ${TOPDIR}/slackware64-$VERSION does not exist!"
  exit 1
fi

cd ${TOPDIR}/slackware64-$VERSION
rsync $1 -vaz --delete  ${RSYNCURL}/slackware64-$VERSION/ .

Code:

#!/bin/sh
# $Id: rsync_current.sh,v 1.4 2005/09/11 14:13:23 root Exp root $
# -----------------------------------------------------------------------------
# Use rsync to mirror a Slackware directory tree.
# The default is to make a mirror of slackware-current, but you can alter that
# by running the script like this:
#
#  VERSION=10.1 rsync_current.sh
#
# ...which will mirror Slackware-10.1 instead.
# Also, all the parameters that you pass this script will be appended to the
# rsync command line, so if you want to do a 'dry-run', i.e. want to look at
# what the rsync would do without actually downloading/deleting anything, add
# the '-n' parameter to the script like this:
#
#  rsync_current.sh -n
#
# -----------------------------------------------------------------------------
# Author: Eric Hameleers <alien at slackware.com> :: 11sep2005
# -----------------------------------------------------------------------------
#
VERSION=${VERSION:-13.0}
TOPDIR="/home/kerml/backup/slackware/"
RSYNCURL="rsync://darkstar.ist.utl.pt/pub/slackware"

echo "Syncing version '$VERSION' ..."

if [ ! -d ${TOPDIR}/slackware64-$VERSION ]; then
  echo "Target directory ${TOPDIR}/slackware64-$VERSION does not exist!"
  exit 1
fi

cd ${TOPDIR}/slackware64-$VERSION
rsync $1 -vaz --delete  ${RSYNCURL}/slackware64-$VERSION/ .

:D

Alien Bob 12-18-2009 03:53 PM

Ermmm.... sharing your scripts? That is my name there in the credits.

The original can be obtained at http://connie.slackware.com/~alien/t...ync_current.sh by the way, but the script I would actually recommend for mirroring Slackware is http://connie.slackware.com/~alien/t...are-current.sh because that one also creates ISO images for you if you want.

Run
Code:

mirror-slackware-current.sh -h
for a listing of all the commandline parameters.

Eric

JokerBoy 12-18-2009 04:07 PM

i rather use:

slackware64-current:
# rsync -r -a -v --delete --progress --stats --exclude 'source' --exclude 'extra' --exclude 'testing' rsync://rsync.slackware.at/slackware/slackware64-current/ ./slackware

slackware-current:
# rsync -r -a -v --delete --progress --stats --exclude 'source' --exclude 'extra' --exclude 'testing' rsync://rsync.slackware.at/slackware/slackware-current/ ./slackware

mRgOBLIN 12-19-2009 02:39 AM

:doh:

wildwizard 12-19-2009 04:03 AM

Well here is my current one :-
Code:

rsync \
  -avP \
  --exclude slackware-7.1/ \
  --exclude slackware-8.1/ \
  --exclude slackware-9.0/ \
  --exclude slackware-9.1/ \
  --exclude slackware-10.0/ \
  --exclude slackware-10.1/ \
  --exclude slackware-10.2/ \
  --exclude slackware-11.0/ \
  --exclude slackware-12.0/ \
  --exclude slackware-12.1/ \
  --exclude slackware-12.2/ \
  --exclude slackware-???-iso/ \
  --exclude slackware-????-iso/ \
  --exclude unsupported/ \
  --delete-after mirror.internode.on.net::slackware/ ./slackware/

I would expect that most people have there own version that they cooked up to enable them to keep up to date with -current and patches for released versions.


All times are GMT -5. The time now is 11:25 PM.