Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-29-2013, 12:05 PM
|
#1
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,366
|
Recovering from interrupted update of mirror
I have been using slackkg to follow current since 14.0, but still fairly new to that mindset.
I use Eric's mirror-slackware-current.sh script to update a local mirror, then use slackpkg across my LAN to update and install.
Last night I was syncing my local mirror using...
Code:
SLACKROOTDIR=/path/to/sw-current/tree ./mirror-slackware-current.sh -f -o NONE
... when my internet connection went south. At first it became very slow so I let it continue for about an hour (Sep 25-29 should have been then only updates!). Finally it stopped completely so I killed it.
Later I restarted it and the internet went down again so I killed it and went to bed.
This left my local mirror in an indeterminate state. I am guessing that rsync is smart enough to pick up where it left off, but I am less clear about how the ChangeLog.txt is used to identify the updates in the script.
So I manually edited the local ChangeLog.txt to remove the Sep 25 and 29 sections, then ran the update again. It appeares to have worked normally and completed within a few minutes (typical for my connection).
I am looking for reassurance that my local repo should be fixed by these actions before using it to update a machine.
How do seasoned Slackers recover from interrupted mirror updates? Is there anything else I should do to be sure?
TIA
|
|
|
09-29-2013, 12:14 PM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,878
|
since it's using rsync, no worries about interrupted update. It will tries to sync again
|
|
1 members found this post helpful.
|
09-29-2013, 12:15 PM
|
#3
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,536
|
if I have understood correctly how Eric's script works, after having verified if there's differences between the local and the remote ChangeLog.txt it runs an rsync in either case that will do a sync between the remote and the local folder, so you should have an up-to-date local mirror at the end, no matter if it got interrupted in a previous attempt or not.
EDIT: ups, willy beated me 
|
|
1 members found this post helpful.
|
09-29-2013, 01:02 PM
|
#4
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,366
Original Poster
|
Thanks willysr and ponce.
I thought so but wanted reassurance from my betters before borking a machine.
Until now I have always been paranoid about bulk updates and did everything with installpkg/upgradepkg, one at a time. My experience using slackpkg with local mirror thus far has been flawless I want to keep that up if possible!
|
|
|
09-29-2013, 01:28 PM
|
#5
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by astrogeek
How do seasoned Slackers recover from interrupted mirror updates?
|
The answer for me is pretty easy: I don't use Eric's script, I just use a simple rsync command that does not check for changes in the Changelog.txt. This way it doesn't matter if the mirroring is interrupted, rsync is handling that just fine.
|
|
1 members found this post helpful.
|
09-29-2013, 02:10 PM
|
#6
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
Quote:
Originally Posted by TobiSGD
The answer for me is pretty easy: I don't use Eric's script, I just use a simple rsync command that does not check for changes in the Changelog.txt. This way it doesn't matter if the mirroring is interrupted, rsync is handling that just fine.
|
There is a reason why I check on changes in the ChangeLog.txt file. When you want to maintain your own local mirror and schedule a daily check for updates, it is much friendlier to the remote Internet server if you check a single file, than to blindly run rsync on the complete directory tree.
It's not just you who is downloading this stuff, you know.
Users of my mirror-slackware-current.sh script should realize that it has a help function explaining the possible parameters to the script:
Code:
$ mirror-slackware-current.sh -h
...
-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.
...
Eric
|
|
1 members found this post helpful.
|
09-29-2013, 02:40 PM
|
#7
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by Alien Bob
There is a reason why I check on changes in the ChangeLog.txt file. When you want to maintain your own local mirror and schedule a daily check for updates, it is much friendlier to the remote Internet server if you check a single file, than to blindly run rsync on the complete directory tree.
It's not just you who is downloading this stuff, you know.
|
Code:
>>> time rsync_current.sh
rsync_current.sh 0.10s user 0.12s system 16% cpu 1.376 total
I am pretty sure that the 1.376 seconds load I cause once a day isn't disturbing the mirror that much. Seeing that the mirror I use also hosts Debian, grml, Knoppix, CPAN, CentOS, Gentoo, CCC, Ubuntu, Mozilla, openSuse, XFCE, VLC and kernel mirrors I doubt that the load I generate is even noticed.
By the way, everyone who wants can use my mirror (slackeee.de::slackware) for syncing their own local mirrors, I don't mind that.
Last edited by TobiSGD; 09-29-2013 at 02:44 PM.
|
|
|
09-29-2013, 02:50 PM
|
#8
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,366
Original Poster
|
Quote:
Originally Posted by Alien Bob
There is a reason why I check on changes in the ChangeLog.txt file. When you want to maintain your own local mirror and schedule a daily check for updates, it is much friendlier to the remote Internet server if you check a single file, than to blindly run rsync on the complete directory tree.
It's not just you who is downloading this stuff, you know.
Users of my mirror-slackware-current.sh script should realize that it has a help function explaining the possible parameters to the script:
Code:
$ mirror-slackware-current.sh -h
...
-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.
...
Eric
|
Thanks Eric.
Yes, the excellent help function is what got me going in the first place!
I always run manually so that I know that it all worked, but would not have immediately thought of the consequences of using -f in a scheduled script. Always good to hear the reasons why things work the way they do from the designer himself!
And thanks for the mirror script!
|
|
|
All times are GMT -5. The time now is 04:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|