Agent command reference
Run these on the server. Most need sudo.
| Command | What it does |
|---|---|
flashbackup-agent status | Shows the configuration, whether FlashBackup can be reached, and which backup tools are installed. |
flashbackup-agent scan | Lists every database the agent can find, and any sign-in problems. |
flashbackup-agent show-key | Prints this server's encryption key. |
flashbackup-agent decrypt FILE [OUTPUT] [--key KEY] [--keep-gzip] | Decrypts a downloaded .fbk backup and unzips it. |
flashbackup-agent register --token TOKEN [--server URL] [--force] | Connects the server to an account. The install script does this for you. With --force it re-registers but keeps the encryption key. |
flashbackup-agent run | Runs the agent in the foreground. Normally systemd runs it. |
flashbackup-agent version | Prints the agent version. |
Service commands
sudo systemctl status flashbackup-agent # is it running?
sudo systemctl restart flashbackup-agent # restart after config changes
sudo journalctl -u flashbackup-agent -n 200 # last 200 log lines
sudo journalctl -u flashbackup-agent -f # follow the log live
Configuration file
/etc/flashbackup/agent.json (permissions 600, owned by root):
| Key | Meaning |
|---|---|
server | FlashBackup address. |
agentId, agentSecret | This server's identity. Don't share them. |
encryptionKey | The key backups are encrypted with. Never change it, or older backups can't be decrypted with the new one. |
tmpDir | Folder for temporary files such as SQLite snapshots (default /var/tmp/flashbackup). |
mysql, postgres, mongodb, sqlite | Database settings. See Database credentials. |
Backup file format
Each .fbk file is: the text FBACKUP1, a 16-byte salt, a 12-byte IV, the AES-256-GCM encrypted gzip data, then a 16-byte authentication tag. The key is derived from encryptionKey with scrypt.
| Type | Content after decryption |
|---|---|
| MySQL | .sql: plain SQL from mysqldump |
| PostgreSQL | .pgdump: pg_dump custom format, for pg_restore |
| MongoDB | .archive: mongodump archive, for mongorestore |
| SQLite | .sqlite: a complete database file |
| Folder | .tar: a tar archive |