Skip to content
Commit 788f9eca authored by Ivan Čukić's avatar Ivan Čukić 👁
Browse files

Resources database backups

More and more things depend on KAMD's resources database.
Recent documents, favourites, KRunner, to name a few.

Now, SQLite is fairly stable with the write-ahead-log that
has been enabled in KAMD for ages, but corruptions can
still happen. Sometimes in SQLite, sometimes in the underlying
file system.

This patch introduces a two-step backup system for the
resources database. On each start, the current database
files are copied to `test-backup` directory.

If no error appeared during the previous KAMD run, the
`test-backup` files are promoted to `working-backup`.

This means that in order for a specific version of the
database to be considered as 'working' (promoted to a
working backup), it needs to have been a beginning of
an error-free KAMD session.
parent 9b2d5e4e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment