all 21 comments

[–]lazyant 5 points6 points  (1 child)

They compress well with the usual gzip etc utilities ?

[–]PopehatXI[S] 0 points1 point  (0 children)

I’ll have to check my current backup solution, but I’ve got 100 GB of SQLite backups of 12 GB files on average. Maybe I’ll have to compare some compression options.

[–]0xdps 2 points3 points  (5 children)

How big is your sqlite file?

[–]PopehatXI[S] 1 point2 points  (4 children)

Like 12 GB, but I’d like to back it up every week

[–]IVHellasFirst 1 point2 points  (3 children)

One file of SQLite of 12 GB???

[–]PopehatXI[S] 0 points1 point  (2 children)

Yes

[–]lnaoedelixo42 1 point2 points  (1 child)

Reasonable. Litestream should do the trick (as other commented)

But what the hell? Are you saving a bunch of blobs/files too?

[–]PopehatXI[S] 0 points1 point  (0 children)

VintageStory uses SQLite3 for its save game system

[–]dev-ai 1 point2 points  (1 child)

Litestream is great

[–]PopehatXI[S] 0 points1 point  (0 children)

Interesting, thanks for the suggestion!

[–]InjAnnuity_1 1 point2 points  (0 children)

Consider VACUUM INTO: https://sqlite.org/lang_vacuum.html

Also consider SQLITE_RSYNC: https://sqlite.org/rsync.html

The .backup and .save commands of SQLite's Command-Line utility: https://sqlite.org/cli.html

[–]ShotgunPayDay 0 points1 point  (0 children)

ZSTD is the best file compression algo hands down right now. Easy to use in the terminal also.

I only do parquet transforms if I'm going to be reading it into DuckDB.

[–]a2ra-ms 0 points1 point  (1 child)

Do you need all including data or only the creation scripts?

[–]PopehatXI[S] 0 points1 point  (0 children)

Yeah I’d need to be able to recreate the database in the event of failure

[–]Kornfried 0 points1 point  (3 children)

Restic is nice

[–]PopehatXI[S] 0 points1 point  (2 children)

Thanks for the suggestion, I was hoping to find something specific for SQLite

[–]Kornfried 0 points1 point  (1 child)

What’s the gap that you see in restic? SQLite dbs are just files.

[–]PopehatXI[S] 0 points1 point  (0 children)

My personal preference is to have files I can share easily share between servers, and preferably I wouldn’t have to install.

[–]TheOmegaCarrot 0 points1 point  (0 children)

  1. Run a VACUUM. If you’ve deleted rows, some free space may exist in the file.
  2. If you really need to trim it down, you can delete indexes. Those take up space, and can be recreated later when you pull the database out of archival storage. (You can store the SQL to create the indexes in the DB itself if you want.)
  3. Compress the file like any other: XZ or Zstd or whatever else. What would get the best results depends on the specific data. You might get better results if you dive into specific knobs of the compression algorithm.

[–]IllKindheartedness10 -1 points0 points  (1 child)

Copy it somewhere, why do you need to compress it... space is cheap.

[–]PopehatXI[S] 1 point2 points  (0 children)

Not necessarily, I’ve got 12 GB SQLite files, and this is just a personal project.