Backup API file instead of directory?

As part of the backup API that badgerDB provides it takes an io writer and a version.

I get that taking in an io writer is idiomatic to go - but that leads to the entire database being written out to one file?

Is that the correct/expected usage? To have something like a gzip writer to which the entire database is backed up to? RocksDB takes in a directory and makes a copy of the DB files similar to how they are in the live DB

Also, can the badger-db cli be used while the process is using the DB? The docs say that it is an offline backup utility but not sure if offline here means that the process is offline or if it is offline because it is not through the process

What I am trying to accomplish is: Backup DB, compress it, upload to S3

Seems like you could use that writer to write N bytes using io - The Go Programming Language or similar and write off to multiple files - tossing a gzipper in the middle of that as well.

Note I haven’t tried it myself but that’s probably what I would try.