backup

git.splent.io/splent-io/splent_feature_backup

v0.2.0 service operations

About

Daily encrypted backups of the database and the file volumes, off the host, with retention, a check of the files the database names and a restore drill

Provides

Services
BackupService

Commands

  • $ splent feature:backup list [OPTIONS]

    The complete backups at the destination, newest first.

  • $ splent feature:backup prune

    Delete the backups the retention no longer keeps.

  • $ splent feature:backup restore STAMP [OPTIONS]

    Restore a backup into a scratch database and directory, and check it.

  • $ splent feature:backup run [OPTIONS]

    Back up the database and the files, encrypted, to the destination.

  • $ splent feature:backup verify [OPTIONS]

    Check that every file the database names is on disk, with its size.

Run them in your workspace once the feature is installed in the selected product.

Configuration

Setting Default What it does
BACKUP_DESTINATION Required Where the backups go, off this host: a directory that is the mount of another machine's disk (NFS, SSHFS, an attached volume), or an s3://bucket/prefix address on any S3-compatible store. Has no default, so the product must set a value.
BACKUP_AGE_RECIPIENTS Required The age public keys (age1...) every backup is encrypted to. The matching private keys stay off the server: the server writes backups it cannot read, and so does whoever reaches the destination. Has no default, so the product must set a value.
BACKUP_AGE_IDENTITY empty An age private key (AGE-SECRET-KEY-1...), only for a restore or a drill, and only in the environment of that one command. Never in a file every container reads.
BACKUP_PATHS empty The directories archived next to the database, with the same stamp. Empty means the framework's protected uploads directory. Each one should be the mount target of a named volume.
BACKUP_RETENTION_DAYS 30 Days a backup is kept. The newest BACKUP_KEEP_MIN are kept whatever their age, so a backup that stopped running never deletes the last good ones.
BACKUP_KEEP_MIN 7 No description yet.
BACKUP_STAGING_DIR empty Where a backup is put together before it leaves, and where a drill unpacks what it restores. Empty means the system's temporary directory.
BACKUP_S3_ENDPOINT empty The S3-compatible store of an s3:// destination. Empty endpoint and region mean AWS's defaults.
BACKUP_S3_REGION empty No description yet.
BACKUP_S3_ACCESS_KEY_ID empty No description yet.
BACKUP_S3_SECRET_ACCESS_KEY empty No description yet.
BACKUP_VERIFY_FILES empty The rows that name a file, which verify checks against the disk, as "<Model>.<path attribute or method>[:<size attribute>]", for example "Hubfile.get_full_path:size". Empty checks nothing.

These are the defaults. A product changes them in its own pyproject.toml, under [tool.splent.config], or in .env.deploy in production.

Dependencies

No hard dependencies.

In product lines

Extension points

Services
BackupService
Routes
A refinement can add routes to its blueprint

Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.

Compatibility

Python
>=3.13
SPLENT framework
>=1.30.0
Python packages
pyrage>=1.2.0boto3>=1.34