Open da2x opened 4 years ago
This one's pretty crucial to have in the near-term, in my opinion, so thanks for opening this. I think it'd be best to start with the simple version of this, that backs up:
~/.hyperdrive/storage/cores
~/.hyperdrive/storage/db
Think it's also important to differentiate between the cases where:
Corestore derives hypercore keys from a single master key and a name file, which is stored inside the hypercore's directory. This means that the backup manifest just needs to be some listing of the form (potentially a JSON file), alongside the database, all bundled together into a tarball:
(master-key)
(core-key1) -> (name1)
(core-key2) -> (name2)
...
Since this command can be implemented through FS operations on the storage directory directly, it should be straightforward to prototype without adding any new API methods.
I'd also suggest the the import
command be restore
, so that we don't have any naming collisions with the existing import
/export
commands.
Folks are gona need tools to back up their drives and especially their keys.
backup [opts] [backup-path.tar.gz]
--public-key=
: only backup this drive (can be specified multiple times, default is everything?)--private-keys-only
: only backup private keys--no-private-keys
: don’t include any private keys--list-files
: just list what will be backed up, one item per line. To be fed into other backup tools.Backup should contain all keys and data; plus a manifest that can be ingested by
hyperdrive import --from-backup=
.