Expand description
Database backups to S3-compatible storage, and restores from them.
A destination is a bucket (endpoint, region, bucket, prefix, path-style addressing) whose access key pair is kept as org secrets. A backup is a schedule for one database: cron, destination, how many to keep, compression. Each run:
- runs the engine’s native dump inside the database’s own instance
(
pg_dump,mysqldump,mariadb-dump,mongodump, a Redis RDB), - streams its output through gzip or zstd and up to the bucket (one
part buffered at a time, multipart beyond
crate::s3::PART_SIZE; nothing touches the host’s disk, and the database’s org needs no network path to the bucket: the daemon carries the bytes), - checks the object with a
HEAD, then deletes the oldest beyondkeep, and emitsbackup.succeededorbackup.failed.
Objects: <prefix>/<org>/<backup>/<database>-<YYYYMMDDTHHMMSSZ>.<engine>[.gz|.zst].
A restore streams an object back the other way, into the same database or a new one created for it.
Structs§
- Backup
- Backup
File - A backup object as listed.
- Backup
Spec - What a user sets on a backup.
- Backups
- Every org’s destinations and backups.
- Destination
- An S3-compatible bucket backups go to.
- NewDatabase
- Restore
Request - What a restore takes from.
Enums§
Traits§
- Compressor
- A writer that compresses into
W, finished explicitly.
Functions§
- backup_
prefix - The key prefix a backup’s objects live under (ends with
/). - compressor
- Compress into
w. - decompressor
- Decompress what
rreads. - dump_to
- Stream a dump out of
instance, compressed, intokey. Returns the dump’s size and the object’s. - object_
key - An object key for a backup taken at
t. - parse_
key - A key this module wrote: its time, engine and compression.
- restore_
from - Feed
readerto the engine’s restore command ininstance. Returns the bytes fed. - select_
prune - Which objects retention deletes: everything this module wrote under
prefixbeyond the newestkeep. Keys it did not write are never touched.