14 lines
570 B
Bash
Executable File
14 lines
570 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Online SQLite backup using the .backup API (safe while the bot is running).
|
|
# TODO: implement; outline below.
|
|
set -euo pipefail
|
|
|
|
# TODO: read DB_PATH from config or env
|
|
# TODO: BACKUP_DIR default /var/backups/mnemosyne, override via $MNEMOSYNE_BACKUP_DIR
|
|
# TODO: filename: mnemosyne-$(date +%Y%m%d-%H%M%S).db
|
|
# TODO: sqlite3 "$DB_PATH" ".backup '$BACKUP_DIR/$FILENAME'"
|
|
# (uses the SQLite backup API — safe for concurrent access, no locks held)
|
|
# TODO: optionally prune backups older than N days
|
|
|
|
echo "TODO: backup.sh not yet implemented"
|