From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 25 15:41:55 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68FEB1065670; Fri, 25 Mar 2011 15:41:55 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE468FC1B; Fri, 25 Mar 2011 15:41:54 +0000 (UTC) Received: by iwn33 with SMTP id 33so1467364iwn.13 for ; Fri, 25 Mar 2011 08:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=maBIL6bLjr1N3yYifLa7A0goEC7hUCT/cPEr/FnI6aE=; b=XRt9uG/tmfXtyTpYpCGXsLTfGk7ItIpf8216gAg97RGNY58YIk7OvU1Xs9QVEZeb0L Z8IrOI/IJcOzxkq0b/JRre9ZzDtTGV/uHQgIMcrfAVol+L//iWXxJEFD2CsnEyJSdWsT W+D5atPtd4L7UCGsFUo8E1paQ9k4Cu3ptipME= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=YcfNpelUHG7wgM6mEX6x/gsET4UcOpmu6jZr3CEUGO1s1TKfzs9K5+JCzx4XIHCXRX XZ8bcINeClfHd0fecab9AOvzcD7arhiUQqJPzlez6MmCW2IAQS5H+9q0lAUeiR+IBi1T lUXAap3xCW2dcbdG6pa/8sUUkM21QsFm1kME0= Received: by 10.43.65.72 with SMTP id xl8mr1419264icb.211.1301067714051; Fri, 25 Mar 2011 08:41:54 -0700 (PDT) MIME-Version: 1.0 Sender: baptiste.daroussin@gmail.com Received: by 10.231.182.76 with HTTP; Fri, 25 Mar 2011 08:41:34 -0700 (PDT) In-Reply-To: <20110325153520.GB23861@gahrfit.gahr.ch> References: <20110325101111.GA36840@azathoth.lan> <20110325150653.21132ej6abxmjpgk@webmail.leidinger.net> <20110325153814.20287h1594npcu80@webmail.leidinger.net> <20110325153520.GB23861@gahrfit.gahr.ch> From: Baptiste Daroussin Date: Fri, 25 Mar 2011 16:41:34 +0100 X-Google-Sender-Auth: iPWxLq6kxQEpqppKoZJcsnn-yTs Message-ID: To: gahr@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: ports@freebsd.org, Alexander Leidinger , hackers@freebsd.org, current@freebsd.org, Julien Laffaye Subject: Re: [ECFT] pkgng 0.1-alpha1: a replacement for pkg_install X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 15:41:55 -0000 2011/3/25 Pietro Cerutti : > On 2011-Mar-25, 15:03, Julien Laffaye wrote: >> >>> What about DB corruption/loss? Do you keep the /var/db/pkg//xxx >> >>> files even with pkgng and only use the DB as a way to speed up some work >> >>> (so >> >>> the DB corruption just requires to run pkg2ng), or are you lost of the DB >> >>> is >> >>> lost? >> >>> >> >> >> >> Nothing is done about DB corruption/loss, I am not sure we need to do >> >> something. >> >> Maybe. >> > >> > I would say "for sure". Info: In Solaris 10 sqlite is used for the service >> > managenemt framework (SMF). It is possible that the DB is corrupt in some >> > bad situations. In this case you have to rebuild the DB (script provided, >> > been there, had to use it). >> >> If sqlite is properly used with transactions, it is very hard to >> corrupt the database. But if hardware lies to us and say that the data >> is on disk whereas it isnt... what can we do? >> Another potential problem is fsync(), but if it is broken on FreeBSD >> we want to fix it! >> >> BTW, the goal is to only have the database and not the flat files. >> If you are paranoid about power outage, use something like zfs snapshots... > > No need to look for strange scenarios, I'm surely going to sudo rm -f the file > more sooner than later, so... maybe just save a copy? > > -- > Pietro Cerutti > The FreeBSD Project > gahr@FreeBSD.org > > PGP Public Key: > http://gahr.ch/pgp > I think we can provide a periodic script activable by users (I let other decide if it has to be activated by default or not) that does a pkg backup /path/to/file/backup and xz it. because copying can be a huge. 40Mo for the database here, corresponding to 70Mo in the old format and to 600 packages. the dump xzed is only 3Mo regards, Bapt