You are not logged in.

#1 2012-07-16 01:29:55

earlz
Member
Registered: 2010-07-11
Posts: 39

I have two Arch Linux computers -- Avoid downloading everything twice?

Hello, I have two Arch Linux computers. A media center type computer, and a general work station. They are both x86-64.

Arch Linux is pretty intensive on bandwidth. Even though my two computers don't have exactly the same packages, they have a lot in common. What's the best set up so that I don't download these common packages twice when upgrading the systems?

Note: I've tried setting up a NFS mount for the package cache, but for some reason, both machines will proceed to redownload the packages and not use the ones that are in the package cache.

EDIT: Actually, I forgot to configure pacman.conf to use the NFS cache on one of the machines, so I guess this would work after all. Is there a better way to do it though?

Last edited by earlz (2012-07-16 01:36:01)

Offline

#2 2012-07-16 01:36:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,533
Website

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

There are several threads and wiki pages on this.  It would help to know what you have already done.

If you haven't yet, first see here

Then make sure the local repository is listed before the others in your pacman.conf.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-07-16 02:03:12

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

Trilby wrote:

There are several threads and wiki pages on this.  It would help to know what you have already done.

If you haven't yet, first see here

Then make sure the local repository is listed before the others in your pacman.conf.

Or keep it simple and skip down to pacserve.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2012-07-16 02:39:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,533
Website

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

Pacserve looks cool.  For the record, I don't have experience with shared packages or local repos, so I just went with the results of a quick search.  I do have experience with other tools from Xyne - they all work great, so I'd suspect pacserve would be a good one.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2012-07-16 18:49:51

claudecat
Member
Registered: 2012-02-01
Posts: 21

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

As an idiot, I do things the easiest way possible... I simply copy files from /var/cache/pacman/pkg/ from one machine to the other using a flash drive. You still need to connect to sync the repos, but the updates won't be downloaded on the copied-to machine as they're already in the cache. The basic steps of this method work on virtually any distro (some with more effort than others).


Why not enjoy a delightful Royal Crown cola?

Offline

#6 2012-07-16 21:07:20

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

But there's a simpler way so you don't wear your flash drive out in a flash.
If both machines are the same architecture, just use NFS to export the /var/cache/pacman/pkg directory.  Then go to the other machine, and mount this export.
This will work most of the time, but there are packages that you put on one and not the other, and it will download the differences. 
Start pacman -Syu on the one machine and pacman -Syu --cachedir /var/cache/pacman/pkg --cachedir /other/dir/export

Last edited by nomorewindows (2012-07-16 21:08:30)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#7 2012-07-16 22:02:48

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

@nomorewindows

You didn't even glance at the first post, did you? tongue


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#8 2012-07-16 22:33:27

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

I've not had any problem doing that. I've done it just the way I've described.  If it was Windows, I'd say there has to be a better way, but since this is *nix, it's slim and trim. 
You could setup a virtual directory on a http server pointing to /var/cache/pacman/pkg if you don't like NFS and add it to the pacman.conf as a http repo, but you still have to get the db files from a regular mirror.  Then you'd have to put the db files from /var/lib/pacman/* in there so it would pick them up also.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#9 2012-07-16 23:12:43

progandy
Member
Registered: 2012-05-17
Posts: 5,199

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

alphaniner wrote:

You didn't even glance at the first post, did you? tongue

I've not had any problem doing that. I've done it just the way I've described.  If it was Windows, I'd say there has to be a better way, but since this is *nix, it's slim and trim.

Nobody said you were wrong, you just did not read the he first answer which contains a link. This link points to a section called "Custom local repository", but just a few lines later, there is a paragraph about "Network shared pacman cache"


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#10 2012-07-17 00:32:54

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

I've seen pacserve before, but I have dual architectures, and of that, some of the machines get updated once in a blue moon.  I'm sure that pacserve probably wouldn't be affected by dual architectures.  It's just easier to remember to pull from a NFS share.
Repo-add on the other hand looks like it could be useful.  Probably was an in-house tool.  But still, that's for building your own database.  If you just sync the first machine and have a link to the current database from the repos, it could just be sym-linked, and pulled when the second machine does it's updating.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#11 2012-07-17 18:19:14

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: I have two Arch Linux computers -- Avoid downloading everything twice?

nomorewindows wrote:

I've seen pacserve before, but I have dual architectures, and of that, some of the machines get updated once in a blue moon.  I'm sure that pacserve probably wouldn't be affected by dual architectures.  It's just easier to remember to pull from a NFS share.

I don't really see how that's easier. Pacserve comes with a daemon and the daemon uses multicast by default, so the network configures itself. 

Multiple architectures were a problem before, but Arch started including the architecture in the package name for all packages a while ago. Since then, it's fine to mix and match.

Anyway, I just wanted to clarify. If NFS is easier for you, use that. wink


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB