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

Traceback when attempting to delete a corrupted .checkpoint archive #1975

Closed
TheVillux opened this issue Dec 22, 2016 · 5 comments
Closed

Traceback when attempting to delete a corrupted .checkpoint archive #1975

TheVillux opened this issue Dec 22, 2016 · 5 comments
Assignees
Milestone

Comments

@TheVillux
Copy link

TheVillux commented Dec 22, 2016

After upgrading to 1.0.9, I noticed the daily backup on one of the machines failed. I'm not sure 1.0.9 is the culprit here however, it may have just let me know about the corrupted archive since it looks like it rebuilt the indexes.

When attempting the delete the corrupted archive, I receive the following traceback, even when using --force. Any ideas?

Error: Did not get expected metadata dict - archive corrupted!
Local Exception.
Traceback (most recent call last):
  File "borg/archiver.py", line 2052, in main
  File "borg/archiver.py", line 1997, in run
  File "borg/archiver.py", line 90, in wrapper
  File "borg/archiver.py", line 498, in do_delete
  File "borg/cache.py", line 97, in __init__
  File "borg/cache.py", line 391, in sync
  File "borg/cache.py", line 358, in create_master_idx
  File "borg/cache.py", line 315, in fetch_and_build_idx
  File "msgpack/_unpacker.pyx", line 469, in msgpack._unpacker.Unpacker.__next__ (msgpack/_unpacker.cpp:5459)
  File "msgpack/_unpacker.pyx", line 400, in msgpack._unpacker.Unpacker._unpack (msgpack/_unpacker.cpp:4483)
TypeError: unhashable type: 'dict'

Platform: Linux machinename 2.6.32-642.11.1.el6.i686 #1 SMP Fri Nov 18 18:48:28 UTC 2016 i686 i686
Linux: CentOS 6.8 Final
Borg: 1.0.9  Python: CPython 3.5.2
PID: 15290  CWD: /usr/local/bin
sys.argv: ['/usr/local/bin/borg', 'delete', 'user@machine:/location::machine_2016-07-18-23:45:02.checkpoint']
SSH_ORIGINAL_COMMAND: None

💰 there is a bounty for this

@enkore
Copy link
Contributor

enkore commented Dec 22, 2016

Yes, looks like an outdated cache together with a corrupted archive can make --force useless, because the cache sync tries to access the archives, among them the corrupted one, before --force does it's magic.

@TheVillux
Copy link
Author

TheVillux commented Dec 22, 2016

Any idea how to manually clean this up, besides wiping the repo and starting over?

@enkore enkore added this to the 1.0.10rc1 milestone Dec 22, 2016
@enkore
Copy link
Contributor

enkore commented Dec 22, 2016

This script should do the trick.

@TheVillux
Copy link
Author

Nice, thanks. I'm using the binary client, so I'll guess I'll need to pip install Borg on the impacted machine for this will work, but this is much appreciated.

@ThomasWaldmann ThomasWaldmann modified the milestones: 1.0.11rc1, 1.0.10rc1 Jan 19, 2017
@ThomasWaldmann
Copy link
Member

Keep in 1.0, due to "being able to fix a corrupted repo".

@ThomasWaldmann ThomasWaldmann modified the milestones: 1.1.0b4, 1.0.11rc1 Feb 19, 2017
@ThomasWaldmann ThomasWaldmann self-assigned this Feb 19, 2017
ThomasWaldmann added a commit that referenced this issue Feb 26, 2017
borg delete --force --force to delete severely corrupted archives, fixes #1975
enkore pushed a commit to enkore/borg that referenced this issue Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants