LinuxQuestions.org
Visit Jeremy's Blog.
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 04-03-2021, 10:47 PM   #16
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

Quote:
Originally Posted by chrisretusn View Post
One should study the script, you will get your answers. This is how I figured things out.
Not necessary
Code:
% ./mirror-slackware-current.sh -h
-----------------------------------------------------------------
$Id: mirror-slackware-current.sh,v 1.93 2018/06/16 10:02:33 root Exp root $
-----------------------------------------------------------------
Usage:
  ./mirror-slackware-current.sh [OPTION] ...
or:
  SLACKROOTDIR=/your/repository/dir ./mirror-slackware-current.sh [OPTION] ...

The SLACKROOTDIR is the directory that contains the directories
  slackware-<RELEASE> and slackware-<RELEASE>-iso
Current value of SLACKROOTDIR : /media/piotr/5FB77A1F7EDC9AFB/Slackware-current

You can change the script defaults in a file 'mirror-slackware-current.conf'

The script's parameters are:
  -h            This help.
  -a <arch>     Architecture to mirror (defaults to 'x86',
                can be 'x86_64' or 'arm' too).
  -b <number>   Limit bandwidth usage to <number> KBytes/sec.
  -c            Check for newer version of this script.
  -e            Use 'boot-load-size=32' instead of the value 4.
                 (32 is a more standard value, but a value of 4
                 will let the ISO boot with old 'broken' BIOSes).
  -f            Force sync and the creation of new ISO image(s)
                even if no update of the ChangeLog.txt was found.
                This is how you resume after an aborted attempt.
                Note: this will also create any missing local
                      directories needed for the mirror.
  -i            Only generate ISO images from our local copy;
                do not attempt to contact the remote server.
  -l <localdir> The root directory where you keep your local
                Slackware mirror; this directory contains
                slackware-<RELEASE> and slackware-<RELEASE>-iso
  -m <uri>      The rsync URI that you want to use instead of
                the script default. Example:
                -m mirrors.tuxq.com::slackware/slackware-current
                (no trailing slash!)
  -n            Only show the changes in the ChangeLog.txt
                but don't sync anything and don't generate ISOs.
  -o <iso_type> The type of ISO that you want to generate.
                iso_type can be one of:
                CDROM: produce 4 CDROM images (KDE on CD4)
                MINI : produce a mini CDROM (netinstall) image
                DVD  : produce a single DVD image
                ALL  : produce CDROM and DVD images
                NONE : produce no images at all (just sync).
                The default iso_type is CDROM.
  -p            Remove old ISO's before building the new ones
                (in case you're suffering from low free space).
  -r <release>  The release ('current' by default); use '-r 12.2'
                if you want to mirror and image slackware 12.2
  -q            Non-verbose output (for cron jobs).
  -s            Additional ssh options, in case rsync needs to
                login to the remote server using ssh. Example:
                -s "-l alien -o IdentityFile=/home/alien/.ssh/id_rsa"
  -u            Create a hybrid ISO (can be dd-ed to USB stick).
  -v            Verbose progress indications.
  -w            Write a .conf file containing script defaults.
                It will be created in the script's directory,
                as 'mirror-slackware-current.conf'
  -X <xfile>    File 'xfile' contains a list of exclude patterns
                for directories that you do not want mirrored.
                Note: this will override the default exclusion of
                the 'pasture' directory so if you still want that
                excluded, add it explicitly to the file 'xfile'.
                If your intention is *not* to exclude '/pasture'
                from the mirror, use '-X none'.
 
2 members found this post helpful.
Old 04-03-2021, 10:55 PM   #17
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by babydr View Post
@ALL , Thank you for all of your insights & recommnedations . I've one question before traipsing off & Mirroring that stack of wonderful software using AlienBob's outstanding mirror-slackware-current.sh script .

Can I limit the mirroring to JUST a couple of repositories ?

Not having studied or used his script before .

Tia , JimL
I keep repos of both 14.2 and -current (just the 64bit versions) using Alien Bob's mirror-slackware-current.sh script. I have this as my conf file for the script (to override the defaults in the script itself since Alien Bob prefers people using the conf rather than editing the script directly):

Code:
jbhansen@craven-moorhead:~$ cat /share/gothrough/slackware-mirrors/mirror-slackware-current.conf 
BUILDER="Jeremy Hansen <myemail@mydomain.com>"
SLACKROOTDIR="/share/gothrough/slackware-mirrors"
ARCH="x86_64"
RSYNCURLROOT="mirrors.xmission.com::slackware/"
ISO="NONE"
HYBRID="1"
I created a script that will update both 14.2 and -current and keeping a log for me to review.

Code:
jbhansen@craven-moorhead:~$ cat /share/gothrough/slackware-mirrors/update-mirrors.sh             
#!/bin/bash

cd /share/gothrough/slackware-mirrors/
mv ./update.log ./update.log.old

echo -e "=========Slackware64-14.2==========\n" &> ./update.log

RELEASE="14.2" sh mirror-slackware-current.sh &>> ./update.log

echo -e "\n=========Slackware64-current==========\n" &>> ./update.log

sh mirror-slackware-current.sh &>> ./update.log
I added an entry to my crontab to run the update script at 5AM every day.

Code:
0 5 * * * /share/gothrough/slackware-mirrors/update-mirrors.sh > /dev/null 2>&1
 
Old 04-04-2021, 05:03 AM   #18
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
Quote:
Originally Posted by igadoter View Post
Not necessary
Yeah you're right, not necessary to post the "-h" output.

Quote:
Originally Posted by chrisretusn View Post
One should study the script, you will get your answers. This is how I figured things out.

Running mirror-slackware-current.sh -h will get you started, BUT, you should read the script, at least the top two sections and create and mirror-slackware-current.conf file, read it and modify it to fit your needs.
There is useful information in both the script and configuration file not available with "-h"

Last edited by chrisretusn; 04-04-2021 at 05:06 AM.
 
2 members found this post helpful.
Old 04-05-2021, 08:54 PM   #19
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 226

Original Poster
Rep: Reputation: 45
@bassmadrigal & @chrisretusn , Again Thank you Both , For your time and insights . The one thing missing from the "-h" & the "-w" base conf files notes are a description of the syntax for the "-X" files contents as pertains to , I'll dig around in the guts of the script & see , what it expects as delimiters & for commenting .

Agn , Thank You . JimL
 
Old 04-06-2021, 11:18 AM   #20
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
Quote:
Originally Posted by babydr View Post
@bassmadrigal & @chrisretusn , Again Thank you Both , For your time and insights . The one thing missing from the "-h" & the "-w" base conf files notes are a description of the syntax for the "-X" files contents as pertains to , I'll dig around in the guts of the script & see , what it expects as delimiters & for commenting .

Agn , Thank You . JimL
The exclude file is for rsync. lookup "--exclude-from=FILE", "FILTER RULES" and "INCLUDE/EXCLUDE PATTERN RULES" in the rsync man page. I don't use it for mirror-slackware-current.sh, the default "EXCLUDES="--exclude pasture" in mirror-slackware-current.conf is sufficient for my purposes.

Here are two examples I use "--exclude-from=FILE" with.
First is the exclude file for my daily backups.
Code:
# racermach exclude file
# Note name/" exclude directory
#      name/* excludes all below but keeps the directory
#      name/*/* exclude all below but keeps two levels directories
# Device and virtual directories
- /dev/*
- /proc/*
- /sys/*
# tmp directories
- /tmp/*
- /var/tmp/*
- .local/share/tmp/*
# run directories. 
- /run/*
- /var/run/*/*
- /var/run/*.pid
- /var/run/*.?ock*
- /var/run/utmp
# Manual and removable media mount points. 
- /mnt/*/*
- /media/*
# General home directory excludes, includes /root
- .dbus/
- .gvfs/
- .cache/
- .ccache/
- .local/share/Trash/
- .Trash-*
# Obviously we do not want to back this up.
- /home/backup/*
# This is a lot to back everyday
- /home/chris/VirtualBoxVMs/*/*
# Don't backup torrent downloads. If need be move to another location. 
- /home/chris/Downloads/Torrents/*
# Skip this too. Can be recreated.
- /home/slackware/*/*
# Exclude the slackbuild tmp directories
- /home/non-slack/slackbuilds/*/tmp/
The second the exclude file I use to backup just the slackware64-current local mirror packages before the mirror is updated.
Code:
# slackware64-current exclude file
# Note name/" exclude directory
#      name/* excludes all below but keeps the directory
#      name/*/* exclude all below but keeps two levels directories
+ extra/**.t?z
+ slackware64/**.t?z
+ patches/**.t?z
+ testing/**.t?z
+ */
- *
 
Old 04-08-2021, 05:03 PM   #21
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 226

Original Poster
Rep: Reputation: 45
@chrisretusn , Thank You , Your last post answered quite Well what I needed , And the (blunt) hint that the config files are read by rsync & to goto that manpage , Helped me see the syntax needed .
I'll play around with the filtering and how small I can get the replication down to .
I'm really remiss in grabbing more than is needed to do updates .
marking as as solved .
Tnx , Agn . JimL
 
  


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
Weird slackpkg upgrade message during a slackpkg upgrade-all process. frtorres Slackware 8 02-13-2021 11:36 AM
[SOLVED] Slackpkg upgrade-all returns 'no packages to upgrade' after slackpkg-update has downloaded files san2ban Slackware 8 11-01-2019 05:44 AM
slackpkg upgrade-all config file lists who was upgraded? WiseDraco Slackware 10 09-25-2017 01:52 PM
[SOLVED] Can't boot into -current partition after slackpkg upgrade-all, after kernel upgraded gabytf Slackware 7 08-12-2012 10:42 AM
Need help installing Mandrake (again, again, again...) DicedMalt Mandriva 6 08-26-2003 04:47 PM

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

All times are GMT -5. The time now is 05:54 PM.

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