SlackwareThis 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.
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.
Hello LQ,
I just installed Slackware Current in my box. I have the problem to update the system cause limited bandwidth. So I extract the slackware-current ISO to create a local repo. my ISO was updated on 24 August. It's first time when I use rsync. whether the option of rsync can meet these needs :
- If the same file not deleted.
- If the same file but the date or size is different then removed and replaced (for downloading files rebuild slackware current).
- If there is a new file then the old file is deleted and replaced.
I want rsync to perform updates only the necessary packages. :?
thanks in advance
Last edited by elexwave; 09-06-2012 at 06:07 PM.
Reason: repair title
I use the same command as ponce for that. Just add the -z option to compress files during the transfer, as you have a limited bandwidth:
rsync -avzP --delete-after
Of course reading the manual to check the meaning of each and every option is a must, as applying blindly a receipt is always risky. This was implicit in previous responses
Last edited by Didier Spaier; 09-06-2012 at 05:34 AM.
rsync uses zlib for compression. Most files in slackware mirrors are already compressed with xz, and zlib can't compress them, it just eats some additional cpu cycles.
rsync uses zlib for compression. Most files in slackware mirrors are already compressed with xz, and zlib can't compress them, it just eats some additional cpu cycles.
Ah yes, another good point! The various text files will compress. Though none of them are that big, so I agree the benefits if any will probably be negligible.
ok, I measured it. I transferred the slackware64-current directory (5.4GB) from an rsync server to another machine. Default configuration in both ends. Without -z the client received 5684687767 bytes and with -z it received 5674708207 bytes. So -z helps but only 0.18 percent.
Without compression the rsyncd server process used 22s cpu time and with compression 184s. That's why compression actually slows down the transfer if the connection has a large bandwidth: I have a 1Gb/s connection and it took 93s real time without compression and 230s with compression.
#!/bin/bash
#
# Check slackware-current
#
# Where to download from
# should script it so that the different sources can be listed and
# selected from the command line
SOURCE="rsync://rsync.osuosl.org/slackware/slackware-current/"
# Change as necessary
OPTIONS="-avzP --delete --delete-after"
EXCLUDE="--exclude=pasture --exclude=kdei \
--exclude=zipslack --exclude=source --exclude=testing/source \
--exclude=extra/source"
DEST="/home/slackware/slackware-current"
case "$1" in
"-c" )
echo "Checking..."
/usr/bin/rsync $OPTIONS $EXCLUDE --dry-run $SOURCE $DEST
;;
"-d" )
echo "Downloading..."
/usr/bin/rsync $OPTIONS $EXCLUDE $SOURCE $DEST
;;
* )
echo "Usage: `basename $0` {-c|-d}"
echo -e "\t-c : Check for updates"
echo -e "\t-d : Download updates"
exit
;;
esac
check-current -c is a dry run
check-current -d downloads the new files and deletes the replaced files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.