type: Boolean,
description: "Include all mounted subdirectories.",
optional: true,
+ default: false,
},
keyfile: {
schema: KEYFILE_SCHEMA,
type: Boolean,
description: "Skip lost+found directory.",
optional: true,
+ default: false,
},
"backup-type": {
schema: BACKUP_TYPE_SCHEMA,
type: Boolean,
description: "Verbose output.",
optional: true,
+ default: false,
},
"dry-run": {
type: Boolean,
description: "Just show what backup would do, but do not upload anything.",
optional: true,
+ default: false,
},
}
}
/// Create (host) backup.
async fn create_backup(
param: Value,
+ all_file_systems: bool,
+ skip_lost_and_found: bool,
+ dry_run: bool,
+ verbose: bool,
_info: &ApiMethod,
_rpcenv: &mut dyn RpcEnvironment,
) -> Result<Value, Error> {
let backupspec_list = json::required_array_param(¶m, "backupspec")?;
- let all_file_systems = param["all-file-systems"].as_bool().unwrap_or(false);
-
- let skip_lost_and_found = param["skip-lost-and-found"].as_bool().unwrap_or(false);
-
- let verbose = param["verbose"].as_bool().unwrap_or(false);
-
- let dry_run = param["dry-run"].as_bool().unwrap_or(false);
-
let backup_time_opt = param["backup-time"].as_i64();
let chunk_size_opt = param["chunk-size"].as_u64().map(|v| (v*1024) as usize);