[Borgbackup] exception from prune

Thomas Waldmann tw at waldmann-edv.de
Thu Feb 22 08:58:23 EST 2018


On 21.02.2018 20:30, Ian Holden wrote:
> Hi, I've started getting an exception when pruning. Not cleat what could
> be the cause.

I'ld say corruption - check your hardware (see our docs)

>   File "/usr/lib/python3/dist-packages/borg/archive.py", line 794, in delete
>     item = Item(internal_dict=item)

>   File "src/borg/item.pyx", line 44, in borg.item.PropDict.__init__
> (src/borg/item.c:1463)
>   File "src/borg/item.pyx", line 54, in
> borg.item.PropDict.update_internal (src/borg/item.c:1966)

> AttributeError: 'int' object has no attribute 'items'

It tried to make an Item instance from the low-level item dict data
(internal_dict) it read/unserialized from the repo.

But internal_dict was not a dictionary here, but an int(eger) object,
which is unexpected and crashed the code.

Such stuff can happen, if the serialized data is corrupted and msgpack
creates a wrong data type when unserializing a corrupted data type byte.

Another cause could be that msgpack was somehow out of sync and did not
unserialize from the start of a serialized dict, but from somewhere in
the middle of one. But I guess that just means another type of corruption.

So, first make sure your hardware works correctly, then run borg check
--repair and take the hint/warning it gives about being experimental
seriously.

BTW, what encryption mode (borg init --encryption x) are you using for
that repo?

-- 

GPG ID: 9F88FB52FAF7B393
GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393



More information about the Borgbackup mailing list