From owner-freebsd-questions@freebsd.org Thu Sep 8 09:17:46 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70993BD040A for ; Thu, 8 Sep 2016 09:17:46 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 074BC124 for ; Thu, 8 Sep 2016 09:17:45 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from zero-gravitas.local (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 5B00E1916 for ; Thu, 8 Sep 2016 09:17:40 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/5B00E1916; dkim=none; dkim-atps=neutral Subject: Re: copying /var/cache/pkg between machines To: freebsd-questions@freebsd.org References: <57D12678.7000903@vlymskerp.net> From: Matthew Seaman Message-ID: <3ca9afc1-a867-51aa-92df-96e6c7f80d24@FreeBSD.org> Date: Thu, 8 Sep 2016 10:17:33 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <57D12678.7000903@vlymskerp.net> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RiqET2UUFrpO2NaQ1TPkq8sWfKUguKDqV" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 09:17:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RiqET2UUFrpO2NaQ1TPkq8sWfKUguKDqV Content-Type: multipart/mixed; boundary="HPMa701wvmPSP007dgqKMnvqFpQxSoB2A"; protected-headers="v1" From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: <3ca9afc1-a867-51aa-92df-96e6c7f80d24@FreeBSD.org> Subject: Re: copying /var/cache/pkg between machines References: <57D12678.7000903@vlymskerp.net> In-Reply-To: <57D12678.7000903@vlymskerp.net> --HPMa701wvmPSP007dgqKMnvqFpQxSoB2A Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 package= s > again anyway. > I tried rsync, tar, made sure the symlinks with checksums are preserved= , > but to no avail. >=20 > 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 --HPMa701wvmPSP007dgqKMnvqFpQxSoB2A-- --RiqET2UUFrpO2NaQ1TPkq8sWfKUguKDqV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQJ8BAEBCgBmBQJX0SyzXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnXgkP/3Ol5nwKDT0wdIAdKmbMcxyq dYQNDj9w7H3xt402WOPp4R0vnkL7UvaRE2iIQRhbI5RSVTzg/QRyPq0WwJWsmNgy gb51QI6NBckv5W1Eq8InC/NbjVN06yCDNDGar6oJtGRVSnabp+QSYloCxGrp4YqR d5LuYoCIt7PZpOnK9NJaAL5EFjFwHGUeBArOhpg0A9RVdBP0FgOa5rhqi/izNdiD kW/ouScWrNwqg0biFCw50idaURxCqwCU5lTdkdK4ELXM2sDC7OzeUwkVx1c+wy6e +4E2yKu0PvTFu8Wjlzf8b7dBjV2TwOmYV0bVu2rJL1XUpZyVt3Q2be3FQRsWXeIl 3f2gcIFfce3FpVzYIMYuoNaDF2OOBl6ClJ/PBmvDClB0s1hY56SwOlEWzcZLS++a TUrvpIiq8HODJt8bwOnQc4/jhHpEXfE2key1Rgiwbifd+XULeM1Y3u8rDAH8DJkH uaiotjGt6zBMcksFm1xk/UlMwk/JanJ9hed35yJQGTje8dY10wjnNe1Gp1yBB/AG RqTS/idCw8QYi/NubBpWbmETowilPeqhAN2R7puogSBatUIscqG+D0DJHrO4AwsX pjdIruKokbt+L6sVkQyc5racXNGPIFnsfv16snqNHSH+nk5LLbSJ7yiEeJ3wOBBT 5G5DD4/WFNvM5sSW5Pky =xnwZ -----END PGP SIGNATURE----- --RiqET2UUFrpO2NaQ1TPkq8sWfKUguKDqV--