> The README talks about *mirroring* the backup repository on a remote
> server using rsync or gsutil, but I don't have enough space to keep
> local copies of the bundles.
Rsync allows you to transfer files instead of mirroring them, by using
the --remove-source-files flag. This is how I do it:
rsync --archive --ignore-existing --remove-source-files "$LOCAL_REPO"/bundles "$REMOTE_REPO"
rsync --archive --ignore-existing --exclude "bundles" "$LOCAL_REPO"/* "$REMOTE_REPO"
> 1) Filesystem: the "bundles" directory can be a mount of a remote
> filesystem (nfs, sshfs, s3fs,...). That may already work today.
This does work, but I think the rsync strategy is better in cases where
you don't always have a connection to the remote host (eg. you have a
sketchy internet connection, the host is a NAS which you can only access
at home, etc.). Using a mount, bundles created while offline will just
sit on your local disk forever, rendering all subsequent bundles
potentially useless. Using rsync, the bundles remain local just as long
as you remain offline. As soon as you do a backup with a connection, the
backlog get transferred.
Transferring the bundles before synching the rest of the repo helps to
maintain the consistency of the remote repo in case the connection dies
mid-way. The rsync approach also has the added benefit of another
immutability guarantee for the remote repo, thanks to the
--ignore-existing flag.
The downside to using rsync vs. an NFS mount is that it serialises
backup creation and transfer. I can live with this though.
> 2) Commands: zbackup could invoke some configurable scripts/commands to do
> bundle operations, e.g.:
> write-bundle <id> <file> (exit code indicates success)
> read-bundle <id> (writes to stdout, exit code indicates success)
> delete-bundle <id> (exit code indicates success)
Or write a wrapper around zbackup and invoke that?
> 3) Native: support for specific remote storage could be built into zbackup
> directly, e.g. using libssh or libs3.
I would be against this idea. For me, zbackup's single-mindedness is its
key selling point.
All the best,
Alex