LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-29-2013, 12:05 PM   #1
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,366
Blog Entries: 24

Rep: Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297
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
 
Old 09-29-2013, 12:14 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,878

Rep: Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914
since it's using rsync, no worries about interrupted update. It will tries to sync again
 
1 members found this post helpful.
Old 09-29-2013, 12:15 PM   #3
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,536

Rep: Reputation: 4481Reputation: 4481Reputation: 4481Reputation: 4481Reputation: 4481Reputation: 4481Reputation: 4481Reputation: 4481Reputation: 4481Reputation: 4481Reputation: 4481
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.
Old 09-29-2013, 01:02 PM   #4
astrogeek
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
Blog Entries: 24

Rep: Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297
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!
 
Old 09-29-2013, 01:28 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by astrogeek View Post
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.
Old 09-29-2013, 02:10 PM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120
Quote:
Originally Posted by TobiSGD View Post
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.
Old 09-29-2013, 02:40 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Alien Bob View Post
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.
 
Old 09-29-2013, 02:50 PM   #8
astrogeek
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
Blog Entries: 24

Rep: Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297Reputation: 4297
Quote:
Originally Posted by Alien Bob View Post
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Recovering from failed current update vdemuth Slackware 10 07-21-2012 10:38 AM
[SOLVED] start KDE error after update to -current but interrupted by electricity problem ! el_jauzaa Slackware 2 09-13-2010 12:43 AM
Alternate US update mirror? rps63ifid Mandriva 2 02-04-2005 06:48 AM
Recovering Software RAID Mirror rootking Linux - Software 1 11-01-2004 07:32 PM
Changing Update Mirror... bertcakes Mandriva 2 04-05-2004 03:16 AM

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

All times are GMT -5. The time now is 04:31 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