Hi all,

    Is there a best practice for incrementally backing up /SQLite/
databases, like there is for /MySQL/ databases (by way of the example
/MySQL/ backup scripts that ship with /Bacula/)?  I've been trying to
find a solution for some months now but keep getting side-tracked.

    Specifically, daily incremental backups of desktops, which include
Thunderbird data, are excessively bloated due to these large /SQLite/
databases always having daily modifications (such as
global-messages-db.sqlite or calendar cache.sqlite being several
gigabytes in my desktop).  Thus multiple gigabytes are backed up
everyday that don't need to be.  Also, afaik, it's improper to directly
copy the .sqlite database file anyway (and probably the other related
.sqlite* files) for the same reasons /MySQL/ database files are not
directly copied.  Namely, it could lead to corruption if there are write
operations going on while the data is copied.

    Now that i think about about it, Firefox also uses /SQLite/
databases for history storage, and more than I ever imagined now that
I've scanned the profile directory: over 5,000 /SQLite/ databases in my
system!  It seems they are used for everything from cache storage of
individual visited websites as well as site preferences, 3rd party
cookies, etc.

    I don't know if these Mozilla databases need any special
consideration over other SQLite databases, but thought I should clarify
where I'm coming from, at least.  I've read about numerous backup
methods that /SQLite/ has available, yet none seem to accomplish the
same thing we can do with /MySQL/ for incremental backups, namely: for
full backups get a full dump of the database (in a human-readable, plain
text, SQL format), and then for incrementals dump the changes since the
last dump and backup the output (with binary logging I think?).  For
example, I've read through this:

sqlite.org

SQLite Backup API <https://sqlite.org/backup.html>

🔗 https://sqlite.org/backup.html <https://sqlite.org/backup.html>

 and this: 

oldmoe.blog

Backup strategies for SQLite in production
<https://oldmoe.blog/2024/04/30/backup-strategies-for-sqlite-in-production/>


Introduction If you are relying on SQLite as your production database,
then it makes sense to have some sort of a backup strategy. Those
backups would come handy in a multitude of situations. For e…

🔗
https://oldmoe.blog/2024/04/30/backup-strategies-for-sqlite-in-production/
<https://oldmoe.blog/2024/04/30/backup-strategies-for-sqlite-in-production/>


and it seems like the only method that would work is to use Litestream,
but it only sends the backup data to Amazon S3.

    Although, after checking Litestream's Github page, it does mention
the backup can be sent to another file also, so maybe that is the most
viable option.  Any other thoughts?

Thanks, Best Regards, Happy New Year, etc.



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to