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

Deleting archives does not actually remove them from the cached list of archives #58

Open
jeffwidman opened this issue Jan 12, 2019 · 2 comments

Comments

@jeffwidman
Copy link
Contributor

tarsnapper caches the output of tarsnap --list-archives.

So when tarsnapper expires an archives, it also deletes it from the cache:

self.archives.remove(name)

However, self.archives is actually a property, which concatenates two lists and then returns them:

return self._queried_archives + self._known_archives
archives = property(get_archives)

So the self.archives.remove call is pointless because it only removes the filename from the temporary list created for that specific call to self.archives... it never actually removes the filename from the underlying cache.

@endlessbeing
Copy link

Does this mean tarsnapper doesn't actually remove archives from the remote Tarsnap server? That is my experience so far.
tarsnapper returns a list of items being deleted
but nothing seems to have been deleted when I run tarsnap --list-archives

Does it work correctly for anyone else? Am I missing something?

@miracle2k
Copy link
Owner

@endlessbeing This issue is a bit of a technical peculiarity which should not have any practical effect unless another command is being executed right after "expire" in the same process, which I don't think ever happens.

The deletion should work - I am relying on it myself in production.

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

3 participants