On Thu, Feb 07, 2008 at 02:01:44PM -0600, Nicolas Williams wrote: > On Thu, Feb 07, 2008 at 10:22:47AM -0700, Steve Peng wrote: > > Nicolas Williams wrote: > > > On Tue, Feb 05, 2008 at 05:21:35PM -0700, Steve Peng wrote: > > > > > >> http://cr.opensolaris.org/~stevep/6351623-2 > > >> > > > > > > Er, the sqlite shell provides a way to copy the database... > > > > > > /lib/svc/bin/sqlite /path/to/src/db .dump | /lib/svc/bin/sqlite > > > /path/to/dst/db > > > > > > A simple system(3C) call can replace backend_do_copy() and a number of > > > lines of code in backend_create_backup_locked(). > > > > Thanks for your information. At this stage of the game, I like to keep > > the code as it is now. If you like, I can file rfe later on to > > keep track of it. > > Well, reducing the amount of code should be a good goal to have. But > since this code pretty much already exists I don't care so much.
Oh, other reasons for using SQLite interfaces for this: a) it's safer, since SQLite will take care of locking, b) it's more portable, since the fact that a SQLite consists of one file (and temporary journal files) is an implementation detail that SMF should avoid hardcoding knowledge of. But still, the code has been there from the get go.