Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Sep 2016 20:57:47 +0200
From:      Coert <lgroups@vlymskerp.net>
To:        freebsd-questions@freebsd.org
Subject:   SOLVED Re: copying /var/cache/pkg between machines
Message-ID:  <01407ad3-030d-2037-a6e3-4a9d0d81870f@vlymskerp.net>
In-Reply-To: <3ca9afc1-a867-51aa-92df-96e6c7f80d24@FreeBSD.org>
References:  <57D12678.7000903@vlymskerp.net> <3ca9afc1-a867-51aa-92df-96e6c7f80d24@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On 09/08/16 11:17, Matthew Seaman wrote:
> On 2016/09/08 09:51, Coert wrote:
>> I have a few FreeBSD machines running with KDE installed.
>> When I copy /var/cache/pkg to another machine, it downloads all packages
>> again anyway.
>> I tried rsync, tar, made sure the symlinks with checksums are preserved,
>> but to no avail.
>>
>> What is the recommended way to sync /var/cache/pkg between machines?
> Sync'ing /var/cache/pkg like that isn't something that has been
> considered as 'normal' usage of pkg(8), so there's no guarantee that it
> will work.
>
> However, what you can do is create a local package repo from
> /var/cache/pkg by:
>
>     pkg repo /var/cache/pkg
>
> This can be served to your other machine by HTTP or even copied over to
> the other machine by rsync.  eg.
>
>     rsync -avx /var/cache/pkg/ othermachine:/var/myrepo/
>
> and then on othermachine add in /usr/local/etc/pkg/repos/myrepo.conf:
>
>     myrepo: {
>       url: file:///var/myrepo
>       priority: 10
>     }
>
> othermachine will still be able to use the default FreeBSD pkg
> repositories, but it will prefer 'myrepo' as far as possible.
>
> 	Cheers,
>
> 	Matthew
>
>
Thanks Matthew!

So far it's working perfectly.
South Africa internet is not always that epic, so I'm doing the following:

pkg fetch -a -o /my/local/mirr


Regards,
Coert



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01407ad3-030d-2037-a6e3-4a9d0d81870f>