This commit is contained in:
2026-06-28 09:42:31 +02:00
parent 05b5c2b528
commit 9c4f8a7cc9
4 changed files with 521 additions and 0 deletions

View File

@@ -30,6 +30,9 @@ func DumpAndCompress(dbPath, outputPath string) (err error) {
}
}()
// Dump all tables but use INSERT OR IGNORE for mergeable imports
// This preserves all data while allowing multiple dumps to be merged
// Users should import with: zstdcat *.sql.zst | sed 's/INSERT INTO/INSERT OR IGNORE INTO/g' | sqlite3 merged.db
dumpCmd := exec.Command("sqlite3", dbPath, ".dump")
zstdCmd := exec.Command("zstdmt", fmt.Sprintf("-%d", zstdCompressionLevel))