mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-02-26 21:57:33 +03:00
push: check that source namespace exists
else, combined with remove_vanished everything on the target side would be removed. Suggested-by: Christian Ebner <c.ebner@proxmox.com> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
0679c25ebb
commit
5990728ec9
@ -99,11 +99,16 @@ impl PushParameters {
|
||||
remote_ns.check_max_depth(max_depth)?;
|
||||
};
|
||||
let remove_vanished = remove_vanished.unwrap_or(false);
|
||||
let store = DataStore::lookup_datastore(store, Some(Operation::Read))?;
|
||||
|
||||
let source = Arc::new(LocalSource {
|
||||
store: DataStore::lookup_datastore(store, Some(Operation::Read))?,
|
||||
ns,
|
||||
});
|
||||
if !store.namespace_exists(&ns) {
|
||||
bail!(
|
||||
"Source namespace '{ns}' doesn't exist in datastore '{store}'!",
|
||||
store = store.name()
|
||||
);
|
||||
}
|
||||
|
||||
let source = Arc::new(LocalSource { store, ns });
|
||||
|
||||
let (remote_config, _digest) = pbs_config::remote::config()?;
|
||||
let remote: Remote = remote_config.lookup("remote", remote_id)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user