sync/pull: make namespace aware

Allow pulling all groups from a certain source namespace, and
possibly sub namespaces until max-depth, into a target namespace.

If any sub-namespaces get pulled, they will be mapped relatively from
the source parent namespace to the target parent namespace.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2022-04-29 13:46:14 +02:00
committed by Thomas Lamprecht
parent 31aa38b684
commit c06c1b4bd7
8 changed files with 582 additions and 116 deletions

View File

@ -103,12 +103,14 @@ pub fn sync_job_commands() -> CommandLineInterface {
.completion_cb("id", pbs_config::sync::complete_sync_job_id)
.completion_cb("schedule", pbs_config::datastore::complete_calendar_event)
.completion_cb("store", pbs_config::datastore::complete_datastore_name)
.completion_cb("ns", crate::complete_sync_local_datastore_namespace)
.completion_cb("remote", pbs_config::remote::complete_remote_name)
.completion_cb("remote-store", crate::complete_remote_datastore_name)
.completion_cb(
"group-filter",
crate::complete_remote_datastore_group_filter,
),
)
.completion_cb("remote-ns", crate::complete_remote_datastore_namespace),
)
.insert(
"update",
@ -117,11 +119,13 @@ pub fn sync_job_commands() -> CommandLineInterface {
.completion_cb("id", pbs_config::sync::complete_sync_job_id)
.completion_cb("schedule", pbs_config::datastore::complete_calendar_event)
.completion_cb("store", pbs_config::datastore::complete_datastore_name)
.completion_cb("ns", crate::complete_sync_local_datastore_namespace)
.completion_cb("remote-store", crate::complete_remote_datastore_name)
.completion_cb(
"group-filter",
crate::complete_remote_datastore_group_filter,
),
)
.completion_cb("remote-ns", crate::complete_remote_datastore_namespace),
)
.insert(
"remove",