Quick database question

John Ralls jralls at ceridwen.us
Mon Dec 27 10:44:56 EST 2010


On Dec 27, 2010, at 3:05 AM, Shane Litherland wrote:

> Hi Ian, et al.,
> 
> so, you've by now figured out that you'll have to backup your SQL from a
> command-line.. I use postgresql for other db stuff, there's pg_dump and
> pg_dumpall (hope I got that right).
> 
> But, on a more general note regarding the idea of a 'backup' option in
> gnucash itself - could it be that the copy or 'dump' commands could be
> integrated in a little 'point and click' option in gnucash?
> 
> e.g. a bit of program that had
> 
> IF database is postgres, THEN send "pg_dump with filename as current
> file+timestamp+the-word-backup" to the postgres db, using user/login
> that the user saved in their preferences or typed in the GUI for this
> task; and save it in the location that user specified in prefs/GUI;
> 
> OR, IF sqlite, then do same steps for it;
> or ...etc
> 
> and have a GUI that the user ticks which db they use, and other optional
> bits as I alluded to above
> 
> Personally, I am fine with a pg_dumpall to make sure I backup all my
> lovely database info :-)
> 
> But if there's others out there that think this might be a neat addition
> to gnucash... be happy to take it up further with you. limited
> programming skills, but if i have some skeleton or example of something
> similar that 'works' then I MIGHT be able to help tweak it etc...

Unfortunately your approach assumes that the postgres/mysql server is running on the same machine as Gnucash and that the Gnucash user has privileges to run the dump routine. Neither is valid.

Postgres and MySql are sophisticated tools and require sophisticated administration. I doubt that many DBAs would take kindly to Gnucash mucking around with their backup strategy, and it's appropriate to assume that anyone who takes the trouble to run a Postgres or MySql server has a backup strategy in place. Neither is really appropriate for users who need a backup menu item.

Regards,
John Ralls



More information about the gnucash-user mailing list