Skip to content

Restore procedure error with stale destination contents #7470

@nrauso

Description

@nrauso

The restore procedure for a backed-up module fails if a config file exists in the root path of the backup repository.
When this happens, the restore attempt results in the following error:

Traceback (most recent call last):
  File "/var/lib/nethserver/cluster/actions/read-backup-repositories/50read", line 56, in <module>
    restic_prefix, restic_uuid, _ = oroot["Path"].split("/", 2)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 1)

This typically occurs if the repository was previously used for an NS7 backup with restic.
In such cases, the repository content might look like this:

#$ rclone-wrapper 1 lsf REMOTE_PATH
config
data/
dump.json.gz.gpg
index/
keys/
ldapproxy/
loki/
snapshots/
traefik/

Could be a good idea try to prevent this behavior.

Metadata

Metadata

Assignees

Labels

verifiedAll test cases were verified successfully

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions