Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 09-11-2005, 08:49 AM   #1
Registered: Mar 2002
Distribution: Slackware and OpenBSD
Posts: 739

Rep: Reputation: 190Reputation: 190
how do I rsync & cron to fetch -current weekly?

I'd like to set up my box to download everything in slackware-current say once a week, but I want to exclude certain directories in -current, like zipslack, kde internationalizations, etc. I have not done much bash coding, cron job scripting, or anything like that, but i figure there must be a way to write a bash script and then set a cron job or something to execute the script once a week or so. Or maybe there is an rsync daemon or something that can run in the background? I have no idea.

So, if you have any tips, pointers, scripts etc. to suggest, I would be very grateful.

Old 09-11-2005, 09:30 AM   #2
Registered: Dec 2004
Location: Netherlands
Distribution: Slackware
Posts: 173

Rep: Reputation: 30
The proper way to do it is with rsync. (downloading it over and over again takes to long and is pretty useless)

You could make a script that rsyncs slackware current , and put the script in /etc/cron.weekly
(don't forget to "chmod +x" the script you created, in fact it isn't really a script, just one single-line command)

man rsync (for how to use rsync, --exclude etc is also explained there)

Or try using google and search for "rsync slackware" or something like that.

Last edited by nukey; 09-11-2005 at 09:32 AM.
Old 09-11-2005, 09:44 AM   #3
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8061Reputation: 8061Reputation: 8061Reputation: 8061Reputation: 8061Reputation: 8061Reputation: 8061Reputation: 8061Reputation: 8061Reputation: 8061Reputation: 8061

I have a script called online at my site which does exactly that: make a mirror of the Slackware -current tree using rsync.
You can use it to mirror other Slackware releases as well (read the header message inside the script). The only thing you have to edit in the script before running it, is the value of the TOPDIR variable, to let it point to the directory where you want to have your mirrored directory tree.

You can add a line to your crontab (by running "crontab -e") like this (copy the script to /usr/local/bin):

# Keep the Slackware -current tree in sync:
45 5 * * sun      /usr/local/bin/
And it will re-sync your local mirror every sunday night at 05:45.

If you want to exclude, say, zipslack, you can edit the script (add --exclude "zipslack/*" to the rsync command), or run the unmodified script like this:

Code: --exclude "zipslack/*"
Cheers, Eric
Old 09-11-2005, 10:07 AM   #4
Registered: Mar 2002
Distribution: Slackware and OpenBSD
Posts: 739

Original Poster
Rep: Reputation: 190Reputation: 190
Wow, thanks for all the great responses! Eric, thank you very much for sharing your script. That's awfully nice of you.

Cheers, everyone!


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
Apache crash on cron->logrotate (weekly) pezzer55 Linux - Software 7 09-30-2008 07:58 PM
cron weekly does not run jordanthompson Linux - Software 21 01-16-2005 09:52 AM
using rsync with cron & pub. key kmitz Fedora 0 01-14-2005 08:01 AM
Weekly Cron problem sopiaz57 Linux - General 2 11-15-2004 11:46 AM
rsync and slackware-current nikko Slackware 13 06-07-2004 08:49 AM > Forums > Linux Forums > Linux - Distributions > Slackware

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

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