If you are part of the users who normally have a good Internet connection and update directly from the repositories of Arch LinuxThis article is not for you, but for those who have limitations in terms of bandwidth.
As an example I put my case. The Internet connection during working hours is much slower than at night (when everyone sleeps) of course. What I do is go to El Palacio Central de Computing, where there is better bandwidth and several repositories are updated, and I copy Arch's mirror.
In this way, I only have to update the packages that are coming in little by little at night, which is much better than dropping 45GB all at once. but of course, how do I update?
Well, basically there are two very easy ways to do it, both posted on the Wiki de Arch Linux.
Using Rsync
If we have domain of Rsync, we can create our own script that includes or excludes certain packages when copying a mirror of Arch Linux. If you want it easier, you just have to use this script:
#! / bin / bash ########################################### ################################################## ### ### It is generally frowned upon to create a local mirror due to the bandwidth that is required. ### One of the alternatives will likely fulfill your needs. ### REMEMBER: ### * Bandwidth is not free for the mirrors. They must pay for all the data they serve you ### => This still applies although you pay your ISP ### => There are many packages that will be downloaded that you will likely never use ### => Mirror operators will much prefer you to download only the packages you need ### * Really please look at the alternatives on this page: ### https://wiki.archlinux.org/index.php?title=Local_Mirror ### If you are ABSOLUTELY CERTAIN that a local mirror is the only sensible solution, then this ### script will get you on your way to creating it. ################################################## ############################################### # Configuration SOURCE = 'rsync: //mirror.example.com/archlinux' DEST = '/ home / user / archlinux' BW_LIMIT = '500' REPOS = 'core extra' RSYNC_OPTS = "- rtlHq --delete-after --delay-updates --copy-links --safe-links --max-delete = 1000 --bwlimit = $ {BW_LIMIT} --delete-excluded --exclude =. * --log-file = / home / user / archlinux / archlinux .log "LCK_FLE = '/ var / run / repo-sync.lck' # Make sure only 1 instance runs if [-e" $ LCK_FLE "]; then OTHER_PID = `/ bin / cat $ LCK_FLE` echo" Another instance already running: $ OTHER_PID "exit 1 fi echo $$>" $ LCK_FLE "for REPO in $ REPOS; do echo "Syncing $ REPO" / usr / bin / rsync $ RSYNC_OPTS $ {SOURCE} / $ {REPO} $ {DEST} done # Cleanup / bin / rm -f "$ LCK_FLE" exit 0
Here the only thing we have to modify are the variables:
SOURCE = 'rsync: //mirror.example.com/archlinux' DEST = '/ home / user / archlinux'
Well, we have to put from which mirror we want to connect and in which folder it is going to be copied.
Using LFTP
If we can't use Rsync, either because the HP of our ISP Administrator has it blocked, or for another reason, there is always the second option, in this case ftp.
On the Arch Wiki we have this script:
#! / usr / bin / lftp -f lcd / local / path / to / your / mirror open ftp.archlinux.org (or whatever your favorite mirror is) # Use 'cd' to change into the proper directory on the mirror, if necessary. mirror -cve -x '. * i686. *' core & mirror -cve -x '. * i686. *' extra & mirror -cve -x '. * i686. *' community & mirror -cve -x '. * i686. * 'multilib & lcd pool cd pool mirror -cve -x'. * i686. * 'community & mirror -cve -x'. * i686. * 'packages &
Although particularly when I use LFTP, I have another variant. What I do is put the following in a .txt file:
lftp -e "mirror --delete --only-newer / archlinux / extra / os / x86_64 / / home / user / archlinux / extra / os / x86_64 /" http://mirror.us.leaseweb.net/ lftp - e "mirror --delete --only-newer / archlinux / community / os / x86_64 / / home / user / archlinux / community / os / x86_64 /" http://mirror.us.leaseweb.net/ lftp -e " mirror --delete --only-newer / archlinux / multilib-staging / os / x86_64 / / home / user / archlinux / multilib-staging / os / x86_64 / "http://mirror.us.leaseweb.net/ lftp - e "mirror --delete --only-newer / archlinux / core / os / x86_64 / / home / user / archlinux / core / os / x86_64 /" http://mirror.us.leaseweb.net/ lftp -e " mirror --delete --only-newer / archlinux / extra / os / i686 / / home / user / archlinux / extra / os / i686 / "http://mirror.us.leaseweb.net/ lftp -e" mirror - -delete --only-newer / archlinux / community / os / i686 / / home / user / archlinux / community / os / i686 / "http://mirror.us.leaseweb.net/ lftp -e" mirror --delete --only-newer / archlinux / multilib-staging / os / i686 / / home / user / archlinux / multilib-staging / os / i686 / "http: // mirro r.us.leaseweb.net/ lftp -e "mirror --delete --only-newer / archlinux / core / os / i686 / / home / user / archlinux / core / os / i686 /" http: // mirror. us.leaseweb.net/
And I run:
lftp -f /ruta/archivo.txt
And this is how I update my local repositories ...
Very useful and practical.
Very good truth, I have always wondered how this task was done but I never deigned to find out how it was done, I hope you publish how to point the repository updater to the loca disk, thanks.
pacman.conf
[arch]
siglevel = PackageRequired
Server = file: /// mnt / repo / arch
Uff, I knew I had something left.
Some time ago I also found myself in the need to do this because I had to reinstall my entire Archlinux system and I did not want to download all gnome and applications again since I have limited connection. I do not know if you can leave another site here but in case someone is interested http://www.kr105.shekalug.org/2011/10/16/crear-un-repositorio-local-en-archlinux/ : )
How many GB is the entire ArchLinux repository?
something for the 40GB, what I would like to know is we can only copy the packages for 64bits and discard i686
Arch ... (sigh) Someday when I have my own computer I'll try to install it.
I wish there was an LTS version of Arch, and use the AUR as a backport.
Well, I don't know ... maybe in the planerta of the apes it is possible
Since I realized there isn't, then I will dedicate myself to getting the most out of Slackware and learning more about OpenBSD.
Haha that would be the complete opposite of what Arch represents.
In my case, in general, I always find the package I am looking for, either in the official repo, or in the AUR, although when it is not, my personal repo never fails me.
Apparently Elav has caught the Arch + versionitis virus 😛
Wow, so the Steam browser uses WebKit 😮
* Playing Portal from my Arch *
elav since they are posting arto de arch could you make a post to leave beautiful KDE, hopefully and out without AUR packages ...
To make KDE nice you don't need AURs, just kde-look.org and devianart.com to find good themes for Plasma, Aurorae, QtCurve, Icons… and so on. Anyway, I write it down in my ToDo.
Hi. I've been visiting this blog for a month, and this is my first comment.
For Debian and repositories like Ubuntu, etc, there is a package: debmirror. Once installed, you have to configure it, indicating the repositories, architecture, etc. that you want to synchronize. Debmirror is a perl script that uses rsync.
Years ago I was a professor of a computer science module, in which, among other things, I had to teach how to install an operating system. My Debian choice. We used the netinst CD. As all the packages had to be downloaded for each student, there were 20, and the internet connection was bad, that was not going well. At first I used a proxy, but it didn't improve much. So I decided to install a small server where I installed the repositories that I used. In this way the installation went smoothly, even peaks of 100 Mbit / s, which the network gave. The students had to indicate that the repositories were on the classroom server and accessed it by FTP. The Debian Lenny repositories were just over 20 GB in size, and he synced them twice a week, Monday and Thursday at 2:00 AM.
Cheers,
Very good guide. It is true that at first Arch seems too complicated but thanks to guides like these there is nothing impossible.
Thank you
Hi .. my problem is also the internet speed .. but I use ubuntu .. can I do the same but for ubuntu?
Thank you
Thanks Elav, we are also burning with rsync here, thanks for showing us an alternative, salu2 from Santiago