[GNC] New to XML; recreating some unsaved work

John Ralls jralls at ceridwen.us
Fri May 16 11:45:36 EDT 2025



> On May 16, 2025, at 05:52, Eric H. Bowen via gnucash-user <gnucash-user at gnucash.org> wrote:
> 
> When I first started using Gnucash I set up my data file with sqlite. Lately, though, every time I've tried to open it the database has been corrupted. I eventually went back to an earlier saved version and reconstructed my data, then started saving it in .XML format, with autosave turned on.
> 
> However, that doesn't apparently save to the data file. I was working on my books last night, but the computer restarted due to an update and the master file was not saved. So now I have the master file time-stamped at 7 am yesterday morning, and about 25 xml text files from the automatic saves as I worked. How do I roll those into the master file and update it without having to re-create the complex invoice I was working on?


There is no “master” file. On every save GnuCash renames the existing file to one with the same name and the current timestamp appended, then writes a new file with the original name.

Consequently each of the timestamped files is complete. If you somehow got back the data file from yesterday morning (are you using a file sync service like Dropbox?) the file with the earliest timestamp from yesterday should be identical to it and the file with the latest timestamp will be the file from the next-to-last save.

Unfortunately for your complex invoice work that you are actively editing isn’t written to disk, only committed changes are. If there’s no trace of it in that latest-timestamp file then you’ll have to start over.

Regards,
John Ralls



More information about the gnucash-user mailing list