3 ms·
sudo apt-get install archivemount archivemount mydbimage.tgz /mnt/mydbimage -o big_writes // -o readonly disable write support // -o nosave do not
by Joel_Mckay 4y ago
sudo apt-get install archivemount
archivemount mydbimage.tgz /mnt/mydbimage -o big_writes
// -o readonly disable write support
// -o nosave do not save changes upon unmount.
//open/cache /mnt/mydbimage/mydbimage.db
//flush
fusermount -u /mnt/mydbimage
//No LGPL/Rust/cargo dependency issues...
//as SQLite's best use-case is embedding ;)
- marginalia_nu 4y agoEh, tar is probably not an amazing format for this, since it's designed for tape drives, and has ridiculously slow random access.
- Joel_Mckay 4y agoarchivemount supports numerous formats as it is using libarchive. My point was it doesn't contaminate the parent projects license.
- xyzzy_plugh 4y agoI understand why you suggest this, even though archivemount is LGPL, but I digress. FUSE is cool and all but given it's "userspace" and we're just reading a single file here, I don't find this compelling versus reading from a block device in-process. TFA is compelling because it's compression over specific data sets without being in the hot path for every operation. Putting a sqlite.db in a tarball is... problematic. There is no random access, so if your database doesn't fit in memory/cache, performance will be abysmal.
- Joel_Mckay 4y agoLGPL is not great for porting, and linux block caching is far from the performance bottleneck if you know what you are doing. I think we can agree it depends on the use-case. =)