Single post

jump to replies

How to backup a live gotosocial database

rm /gotosocial/backup.db

sqlite3 /gotosocial/sqlite.db "VACUUM INTO '/gotosocial/backup.db'" 

#gotosocial #gts

2 replies

back to top
Tanguy ⧓ Herrmann , @dolanor@hachyderm.io
(open profile)

@adele I would vacuum into a new temp file first, then `mv` the temp file to the previous destination.

Just in case there is some FS too full error while doing the vacuum, or any other failure (the software corrupts the DB in the middle of an operation and corrupt the vacuum as well).
At least you have the vacuum to start from again.