Another pkg feature request or some .sh method

Matthew Seaman matthew at FreeBSD.org
Mon Aug 3 07:15:02 UTC 2015


On 03/08/2015 03:32, Jeffrey Bouquet via freebsd-pkg wrote:
> Since this machine is rarely up during the periodic (overnight) backup
> of local.sqlite, manually copying the file has once or twice due to shell
> history inadvertently  overwritten the recent version with one a few
> days old. 
> 
> Could pkg store a 2nd copy somewhere automatically somehow, or does
> someone know the most convenient foolproof .login or something to ensure
> that an accidental erasure means not an hour or two of restores VS just
> copying a 2nd copy from somewhere.    [ I'd like to emphasize
> convenient, and foolproof, something to eventually put into base or into
> most/some of the pkg commands... ]
> 
> As an aside, if I'm not mistaken, it could be backported if possible to
> dragonflyBSD (etc)...

You can just run /usr/local/etc/periodic/daily/411.pkg-backup manually
-- that will keep a history of 7 backups by default, or you can tune
that value by setting $daily_backup_pkg_count in periodic.conf

I've found for some machines that shifting the time of day the daily /
monthly / weekly jobs run is the simplest solution.  Just edit
/etc/crontabs.  Some of the periodic jobs are quite IO intensive and may
interfere with normal usage, but on the whole it is pretty painless.

	Cheers,

	Matthew




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 971 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20150803/766795b4/attachment.bin>


More information about the freebsd-pkg mailing list