diff options
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index b4ea0aa..24791d3 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -110,6 +110,13 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ "Start a new swarm, as its genesis node, instead of joining one through seeds. Every start with it starts another new swarm: drop it once the swarm exists, and give the node seeds instead. With a --state-file that remembers a swarm, it starts that swarm again instead (empty; nodes of it still running merge with this one).", ), option( + "recover-from", + Kind::Text, + "PATH", + None, + "Start the swarm again from a backup (as GET /admin/document saves it): this node loads it, on the swarm and epoch it names, and is ready at once; other nodes join it. Members of the swarm still running merge with it, or it rejoins them if they moved on to a newer epoch (the backup is then dropped).", + ), + option( "state-file", Kind::Text, "PATH", @@ -230,6 +237,7 @@ pub(crate) struct Settings { #[serde(default)] pub(crate) genesis: bool, pub(crate) state_file: Option<PathBuf>, + pub(crate) recover_from: Option<PathBuf>, pub(crate) swarm_key_file: Option<PathBuf>, pub(crate) alias: Option<String>, #[serde(default = "default_keepalive_secs")] @@ -429,6 +437,8 @@ const CONFLICTS: &[(&[&str], &[&str])] = &[ ), // A new swarm has nobody to join. (&["genesis"], &["seeds"]), + // Recovering starts the swarm too. + (&["recover-from"], &["genesis"]), ]; /// The options `name` can't be combined with. |
