Triggering backups from an API client

Let’s say I have a system like a database built as an FDB layer, where data is organized into some keyspace. I’d like the layer to have the ability to trigger a FoundationDB backups (full snapshots, as well as continuous backups) to S3 on certain events (either user triggered – e.g. “backup table in database” – or automatic for system/global disaster recovery.)

At the moment, the backup tools are the only way to do this via the command line, but having an API actually exposed for this would be quite handy. Would some APIs to provide this explicitly be within scope and, if done properly, acceptable upstream?

There might be a slightly deeper complication here, of the current backup framework was written with being a continuous ongoing process in mind, rather than a single snapshot of the data. (Unless you’re running on a cloud platform, then @lihtnes implemented a disk snapshot-based backup and restore, that would require some extra tooling.). @SteavedHams would probably know if I’m wrong, or how much effort it would take to turn backup into something that would just do one snapshot again.

@john_brownlee might have some additional opinions about how this would best be done, but I don’t think we’re overall opposed for having management tasks being added to the API and invokable outside fdbcli.