LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-01-2018, 07:48 PM   #1
slackjeff
Member
 
Registered: Sep 2018
Location: Blumenau/SC/Brasil
Distribution: Slackware
Posts: 30

Rep: Reputation: Disabled
Local Stable Mirror Slackware


Hello guys.
I have 3 computers at home with a very bad internet. Update the 3 computers is a torture.
I was thinking of using one of these computers to make a local repository server, so I would use little bandwidth, and it would be less torturous.


I found this link: https://mirrors.slackware.com/guidelines/
to sync a specific repository 'sync://mirrors.kernel.org/slackware/slackware64-14.2/'.
It turned out that I mirrored everything including the sources.
Am I on the right track or is there any more interesting way?
 
Old 11-01-2018, 08:19 PM   #2
BigTig
Member
 
Registered: Aug 2015
Posts: 61

Rep: Reputation: Disabled
I use this script Eric wrote to sync a local current and stable repository:
http://www.slackware.com/~alien/tool...are-current.sh
It's pretty easy to setup.
 
1 members found this post helpful.
Old 11-01-2018, 08:24 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
yep I've used that too, I have not used that script in a while but, you can make it do both just change the name of the file for stable or whatever just a different name, and mod it inside and you're cookin with gas. even have it make an updated ios. you're only going to need about ~5GB per OS current, stable, if I remember correctly.

then go into your mirror files and make the needed adjustments to point to where that is.

Last edited by BW-userx; 11-01-2018 at 08:31 PM.
 
Old 11-02-2018, 12:25 AM   #4
zakame
Member
 
Registered: Apr 2012
Location: Philippines
Distribution: Debian, Ubuntu, Slackware
Posts: 295

Rep: Reputation: 181Reputation: 181
+1 on alienBOBs's script; a short rsync script also works in a pinch, something along the lines of

Code:
#!/bin/sh
set -x
rsync -prltvHSB8192 --timeout 3600 --stats --delete --delete-before --delete-excluded \
      --exclude unsupported \
      --exclude 'slackware-*' \
      --exclude slackware \
      --exclude 'slackware64-13.*' \
      --exclude slackware64-14.0 \
      --exclude slackware64-14.1 \
      --exclude slackware64-current \
      ftp.slackware.com::slackware/ /home/ftp/pub/Linux/slackware/
You can add an extra --exclude slackware64-14.2/source if you don't need the sources and slackbuilds, and replace the origin mirror with something closer to your location.
 
Old 11-02-2018, 03:09 AM   #5
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
I use Alien Bob's excellent mirror-slackware-current.sh script to mirror these repositories.

Code:
# Check for Slackware-current updates
# Slackware64 daily at 1600:
00 16 * * * /bin/sh /home/slackware/mirror-slackware-current.sh -q 
# Slackware-14.2 daily at 2000:
00 20 * * * /bin/sh /home/slackware/mirror-slackware-current.sh -q -r 14.2
# Slackware-current daily at 2200:
00 22 * * * /bin/sh /home/slackware/mirror-slackware-current.sh -q -a x86
This is my mirror-slackware-current.sh
Code:
RSYNC="/usr/bin/rsync"
MKISOFS="/usr/bin/mkisofs"
MD5SUM="/usr/bin/md5sum"
ISOHYBRID="/usr/bin/isohybrid"
BUILDER="redacted"
SLACKROOTDIR="/home/slackware"
ARCH="x86_64"
RELEASE="current"
RSYNCURLROOT="slackware.mirrors.tds.net::slackware/"
RSYNCURL=""
EXTOPTS=""
DEBUG=1
VERBOSE="-v --progress"
ISO="DVD"
ISOONLY="no"
FORCE="no"
ONLYDIFF=0
PREREMOVE=0
HYBRID=0
EXCLUDES="--exclude pasture"
EXCLUDEFILE=""
DVD_EXCLUDES="-x ./testing -x ./source -x ./extra/source -x ./slackware*/kdei -x ./pasture"
BWLIMIT=0
CHECKVER="no"
BOOTLOADSIZE=32

Last edited by chrisretusn; 11-02-2018 at 03:12 AM.
 
Old 11-02-2018, 04:22 AM   #6
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Here's mine. It's for current rather than 14.2, but it should just be a matter of changing all the 'current' references to '14.2' to swap it over.

I exclude kde, kdei, k (the kernel source), and any "source/" directories. I also backup old packages to $BKPDIR just in case I need to revert, though that's more likely when following current rather than a stable release.

Code:
  MIRROR="rsync://slackware.uk/slackware/slackware64-current"
  DESTDIR="/srv/slackware/"
  BKPDIR="/srv/slackware/slackware64-current.bkp"

  rsync --no-motd -avz \
        --delete --delete-excluded \
        --backup --backup-dir="$BKPDIR" \
        --partial --timeout=60 \
        --exclude='/slackware64-current/slackware64/k/' \
        --exclude='/slackware64-current/slackware64/kde/' \
        --exclude='/slackware64-current/slackware64/kdei/' \
        --exclude='source/' \
        "$MIRROR" "$DESTDIR"
rsync is a nuanced tool. It's worth reading the man-page and understanding it properly, otherwise you can have the occasional nasty surprise!

With this configuration my local mirror runs to 1.7G (as reported by du -sh). I periodically clear out $BKPDIR to reclaim space as it tends to grow quite quickly with current.
 
1 members found this post helpful.
Old 11-02-2018, 07:24 AM   #7
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I think more convenient is to use config file for @AlienBob script, than edit the script
Quote:
$ less ./mirror-slackware-current
# Read configuration file if it exists;
# - usually called 'mirror-slackware-current.conf'
CONFFILE=${CONFFILE:-"$(dirname $0)/$(basename $0 .sh).conf"}
[ -f ${CONFFILE} ] && . ${CONFFILE}
Here is my config file
Code:
 
$ cat ./mirror-slackware-current.sh.conf
BUILDER="Piotr Dacko <dackopiotr7@gmail.com>"
ARCH="x86_64"
RSYNCURLROOT="rsync.slackware.pl::slackware/"
VERBOSE="-v"
ISO="NONE"
EXCLUDES="--exclude pasture --exclude source"
I would suggest the first step (if possible) to go to place with fast internet, download DVD iso of Slackware-current and create local mirror from this iso. Once you have it everyday updates wouldn't be so time consuming, except massive updates.

Last edited by igadoter; 11-02-2018 at 07:30 AM.
 
Old 11-02-2018, 11:33 AM   #8
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Maintain a local mirror to reduce bandwidth issues. For at least a decade or so I have been using my own modified version of Eric's rsync scripts.

One caveat is a local mirror has no package history. If you want to revert a package the local mirror will not contain older packatges. Been there done that. I retain copies of older packages through my backup plan.

Eric's script can be modified not to delete existing packages. Basically don't use the rsync --delete parameter.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Mirror Slackware stable + patches? kikinovak Slackware 2 12-11-2015 04:34 PM
cannot make a local mirror of Slackware - urgent help needed! igadoter Slackware 8 09-11-2010 10:14 AM
How to create a local mirror from CD abd_bela Debian 7 04-05-2008 10:23 PM
LXer: How To Create A Local Debian/Ubuntu Mirror With apt-mirror LXer Syndicated Linux News 0 01-04-2007 05:33 PM
Installing KDE3.1.3 on stable system using the "stable" mirror at download.kde.org preben Debian 8 08-28-2003 07:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration