reference the datastore in BackupGroup/Dir
And drop the base_path parameter on a first bunch of functions (more reordering will follow). Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -44,7 +44,7 @@ pub fn prune_datastore(
|
||||
|
||||
for group in datastore.iter_backup_groups()? {
|
||||
let group = group?;
|
||||
let list = group.list_backups(&datastore.base_path())?;
|
||||
let list = group.list_backups()?;
|
||||
|
||||
if !has_privs && !datastore.owns_backup(group.as_ref(), &auth_id)? {
|
||||
continue;
|
||||
|
@ -663,13 +663,13 @@ pub async fn pull_group(
|
||||
|
||||
if params.remove_vanished {
|
||||
let group = params.store.backup_group(group.clone());
|
||||
let local_list = group.list_backups(¶ms.store.base_path())?;
|
||||
let local_list = group.list_backups()?;
|
||||
for info in local_list {
|
||||
let backup_time = info.backup_dir.backup_time();
|
||||
if remote_snapshots.contains(&backup_time) {
|
||||
continue;
|
||||
}
|
||||
if info.backup_dir.is_protected(params.store.base_path()) {
|
||||
if info.backup_dir.is_protected() {
|
||||
task_log!(
|
||||
worker,
|
||||
"don't delete vanished snapshot {:?} (protected)",
|
||||
|
Reference in New Issue
Block a user