From owner-freebsd-questions@FreeBSD.ORG Sun Jan 27 09:46:56 2013 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D70161AC for ; Sun, 27 Jan 2013 09:46:56 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 6E4C388F for ; Sun, 27 Jan 2013 09:46:56 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.6/8.14.6) with ESMTP id r0R9kpwT050595 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 27 Jan 2013 09:46:51 GMT (envelope-from m.seaman@infracaninophile.co.uk) DKIM-Filter: OpenDKIM Filter v2.7.4 smtp.infracaninophile.co.uk r0R9kpwT050595 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1359280012; bh=rBmqzZ8arBK4sS9iBzxkFVLhiHUWMDIBrEggk6rzh9c=; h=Date:From:To:CC:Subject:References:In-Reply-To; z=Date:=20Sun,=2027=20Jan=202013=2009:46:51=20+0000|From:=20Matthew =20Seaman=20|To:=20"W.=20D."=20|CC:=20freebsd-questions@FreeBSD.org|Subject:= 20Re:=20Cronjob=20Cvsup=20->=20What?|References:=20<20130127001805 .97F0119B@hub.freebsd.org>|In-Reply-To:=20<20130127001805.97F0119B @hub.freebsd.org>; b=BkyDpzT8tdzoXUlZbp1KsBfNipF6AuXqzXDc0urXWG0ENe36bLr09NCRS8wL7P0N0 qV+/HuR4sVBBwznRSaKgcYUyAAf2yXseWzNeWSrK7tDHOnTB0nSWnZO1nH+VL4s+JI DF2Zl67N9TCLPExDdVLhoX1O/fbfYkhDNC77wE6w= Message-ID: <5104F78B.8050408@infracaninophile.co.uk> Date: Sun, 27 Jan 2013 09:46:51 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: "W. D." Subject: Re: Cronjob Cvsup -> What? References: <20130127001805.97F0119B@hub.freebsd.org> In-Reply-To: <20130127001805.97F0119B@hub.freebsd.org> X-Enigmail-Version: 1.5 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2WQVKPAXWIPGSTFCLPLWC" X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: freebsd-questions@FreeBSD.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jan 2013 09:46:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2WQVKPAXWIPGSTFCLPLWC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 27/01/2013 00:11, W. D. wrote: > What would be the best Cron command to keep ports updated on a daily > basis? Try this as a crontab entry: 0 3 * * * * /usr/sbin/portsnap cron update Two points to note: 1) The 'cron' verb is important for anyone setting up an automated job like this. It causes portsnap to wait for a random number of seconds (but less than 1 hour) before connecting to the portsnap server. Since the tendency is for people to schedule cron jobs to happen on the hour, this helps to avoid everyone connecting at once and smooths out the server load. 2) This assumes that you have previously run portsnap fetch extract to get yourself a portsnap-ready copy of the ports tree. You only need to do that once, but you should move aside any pre-existing copy of /usr/ports obtained by any means other than portsnap(8) before you do (but keep anything under /usr/ports/distfiles and maybe /usr/ports/packages). Something like: cd /usr mv ports ports.old mkdir ports mv ports.old/distfiles ports/distfiles mv ports.old/packages ports/packages portsnap fetch extract Although this may be complicated if any of /usr/ports, /usr/ports/distfiles or /usr/ports/packages are on a separate partition or ZFS. I say 'move aside' due to the caution imbued by having been a professional sysadmin for more years than I care to remember. If you are still convinced of your own infallibility, then you might find rm(1) an acceptable alternative. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey JID: matthew@infracaninophile.co.uk ------enig2WQVKPAXWIPGSTFCLPLWC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlEE94sACgkQ8Mjk52CukIxr3wCfa41q/s6KlUgCXy0MaSHWI37w xoQAn1zmH5/O7TiRncDM/jb0Z22nApd9 =1pSj -----END PGP SIGNATURE----- ------enig2WQVKPAXWIPGSTFCLPLWC--