Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache is newer than repository, refusing to continue #123

Open
TnTBass opened this issue Oct 22, 2014 · 4 comments
Open

Cache is newer than repository, refusing to continue #123

TnTBass opened this issue Oct 22, 2014 · 4 comments

Comments

@TnTBass
Copy link

TnTBass commented Oct 22, 2014

I am running into an error with my repository when I attempt to run a prune command.

attic prune attic-backup@myserver:mybackup-42977.attic -H 0 -d 7 -w 4 -m 12 -y 0 -v

"attic: Error: Cache is newer than repository, refusing to continue"

However, I am stuck. How do I clear up the cache, or more generically, how do I resolve this error?

Running: Attic 0.13 - Deduplicated Backups

@TnTBass
Copy link
Author

TnTBass commented Oct 23, 2014

In an attempt to fix this, I removed the .cache folder located in my home directory. I am hoping this was a safe move.

@jborg
Copy link
Owner

jborg commented Oct 26, 2014

This check is in place to detect when a repository has been replaced with an older copy of itself. This happens naturally is situations like when the repository itself is restored from backups. But it could also mean that an adversary is trying something.
Did you do something special with the repository before this prune command?

Anyway, removing the cache folder is always safe but might be a bit time consuming to rebuild.

@tgharold
Copy link

tgharold commented Dec 9, 2014

Things that might improve the user experience:

  • Report the repository UUID in the error message
  • Report the local time in the cache / vs remote time of the repository

Maybe add an "attic cache" command with various options to do things like refresh / overwrite / force-update a specific UUID. To fix the option in my case I had to:

  1. Find out which UUID related to the repository on the remote system
  2. Remove the contents of that cache directory on the local system (source of the files to be backed up)
    rm ~/.cache/attic/65d3adcd5d7e3e2c9ba7c6333e3f9d154a141f2620c2966cf74ffd64b952e9ee/*
  3. Remove the now empty directory
    rmdir ~/.cache/attic/65d3adcd5d7e3e2c9ba7c6333e3f9d154a141f2620c2966cf74ffd64b952e9ee/

So maybe being able to type the following would be easier:

# attic cache --reset 65d3adcd5d7e3e2c9ba7c6333e3f9d154a141f2620c2966cf74ffd64b952e9ee

Note sure if "--reset" is best wording choice. Alternate options might be "--wipe" or "--delete".

@Fibroblasto
Copy link

I am doing some tests with "borg recreate" and, as it is an experimental feature, before doing so I copied the repository with another name before that. Now I want to use the original repository renaming it to its original name and I get the message:
"Cache, or information obtained from the security directory is newer than repository - this is either an attack or unsafe (multiple repos with same ID)".

Yes, they are newer than the repository, for sure. Is there any way I could use the old repository? Removing the cache of that repository did not help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants