Skip to content

Commit

Permalink
Get rid of `unable to open cache: unable to locate cache directory: n…
Browse files Browse the repository at this point in the history
…either $XDG_CACHE_HOME nor $HOME are defined` (#14562)
  • Loading branch information
themylogin committed Sep 23, 2024
1 parent 215623b commit deff8f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewared/middlewared/plugins/cloud_backup/restic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_restic_config(cloud_backup):

url, env = remote.get_restic_config(cloud_backup)

cmd = ["restic", "-r", f"{remote.rclone_type}:{url}/{remote_path}"]
cmd = ["restic", "--no-cache", "-r", f"{remote.rclone_type}:{url}/{remote_path}"]

env["RESTIC_PASSWORD"] = cloud_backup["password"]

Expand Down
1 change: 1 addition & 0 deletions tests/api2/test_cloud_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def test_cloud_backup(cloud_backup_task):
run_task(cloud_backup_task.task)

logs = ssh("cat " + call("cloud_backup.get_instance", cloud_backup_task.task["id"])["job"]["logs_path"])
assert "unable to open cache:" not in logs
assert "Files: 1 new, 0 changed, 0 unmodified" in logs

snapshots = call("cloud_backup.list_snapshots", cloud_backup_task.task["id"])
Expand Down

0 comments on commit deff8f8

Please sign in to comment.