[users at bb.net] state.sqlite database disk image is malformed

Ryan Schmidt buildbot at ryandesign.com
Sun Feb 28 23:28:12 UTC 2021



On Feb 28, 2021, at 05:30, Dr. Mark Asbach wrote:

>> Is running this command sufficient:
>> 
>> sqlite3 state.sqlite 'vacuum into "file:state.sqlite.bak";'
>> 
>> Does that automatically establish a shared lock on the database before the vacuum and unlock it after? If not, how do I do that?
> 
> Yes, this command is sufficient and the way to go for backing up Buildbot databases (for scenarios with much larger databases, incremental alternatives might be necessary, but this is a very quick operation for the amount of data stored by buildbot).

Ok great, thanks for confirming. I'll add that to the backup process once I'm back up and running.

Though as I mentioned in another thread, the amount of data stored by buildbot eight grows unbounded. The last time the database corrupted, it had reached 800MB in size while I wasn't looking, which is why I am seeking methods of automatically and regularly clearing out old information.


> As often when software is written by developers for developers, there is no one noticing these missing bits of information. I would assume that the buildbot developers are so used to database topics, that they just didn’t think of what could go wrong for anyone not as accustomed to the details.
> 
> This could be a great opportunity to improve the docs by writing that missing chapter and putting up a pull request (https://docs.buildbot.net/current/developer/pull-request.html). Unfortunately, I’m currently in the middle of moving my household and quite busy with putting all my stuff into cardboard boxes (kind of a physical VACUUM INTO :-)).

Yup, I understand the issues of developers not knowing what needs to be documented; we have the same problem in MacPorts. I also understand your response of suggesting that I be the one to write the documentation, but I'm not going to have time to do so.



More information about the users mailing list