hypercore-protocol / hyperdrive-daemon

Hyperdrive, batteries included.
MIT License
156 stars 23 forks source link

Add a `delete` command #71

Open da2x opened 4 years ago

da2x commented 4 years ago

There is no command for deleting a Hyperdrive. I created a couple to experiment on and now I want them gone. hyperdrive help lists cleanup which seams related but does something different.

andrewosh commented 4 years ago

The story around deletions is indeed very incomplete right now. There's one cleanup command that can be run when the daemon's offline (hyperdrive cleanup:remove-readonly-drives) that will remove all readonly drives. That command's pretty unobjectionable because you can always restore readonly drives from the network.

Adding deletion for writable drives is hairier (can lead to irreparable data loss), so I've been hesitant to go down that road. Think we'll want to have the backup command in place and battle-tested before we introduce that, but it's indeed extremely important to have. Append-only filesystems can get big quickly!