Skip to main content

How to resolve the Borg cache error in remote backups.

If you see the following error related to Borg cache when listing, restoring, or taking manual backups for your Borg remote backups.
Local Exception
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 5089, in main
    exit_code = archiver.run(args)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 174, in wrapper
    assert_secure(repository, kwargs['manifest'], self.lock_wait)
  File "/usr/lib/python3/dist-packages/borg/cache.py", line 209, in assert_secure
    sm.assert_secure(manifest, manifest.key, lock_wait=lock_wait)
  File "/usr/lib/python3/dist-packages/borg/cache.py", line 174, in assert_secure
    with cache_config:
  File "/usr/lib/python3/dist-packages/borg/cache.py", line 334, in _check_upgrade
    raise Exception('%s does not look like a Borg cache.' % config_path) from None
Exception: /root/.cache/borg/f80e55dff9886465adf97645/config does not look like a Borg cache.
You may simply solve it by following the instructions below:
  • You can connect with the VM terminal and run the below command.
borg delete --cache-only BorgRepoName

By using the command, you can determine your BorgRepoName

cd /opt/borg;
cat backupInfo.sh;
#It will return output like these:
BORG_PASSPHRASE=xxxxxxxxxxxxxxxxx borg info ssh://xxxxxxxxxxxx.repo.borgbase.com/./repo;

The ssh://xxxxxxxxxxxx.repo.borgbase.com/./repo; is your borg repo name. You can use that in the command above.

Example:  borg delete --cache-only ssh://xxxxxxxxxxxx.repo.borgbase.com/./repo;