Object with key ... not found in repository #600

Closed
opened 2022-10-16 20:12:59 +00:00 by modem7 · 5 comments

What I'm trying to do and why

Create local backup. Remote backup seems to work fine (in the same config file).

Steps to reproduce (if a bug)

docker exec Borgmatic sh -c "cd && borgmatic --stats -v 1 --files 2>&1"

Actual behavior (if a bug)

Ensuring legacy configuration is upgraded
borg --version --debug --show-rc
/etc/borgmatic.d/config.yml: Calling healthchecks hook function initialize_monitor
/etc/borgmatic.d/config.yml: Calling healthchecks hook function ping_monitor
/etc/borgmatic.d/config.yml: Pinging Healthchecks start
/etc/borgmatic.d/config.yml: Using Healthchecks ping URL https://hc-ping.com/id/start
/etc/borgmatic.d/config.yml: No commands to run for pre-actions hook
/etc/borgmatic.d/config.yml: No commands to run for pre-check hook
/mnt/borg-repository: Running consistency checks
borg info --json /mnt/borg-repository
Object with key d300371ef50b97ee32356e93a6a5fe7c9e7a7a603a41856ac12a7e7b39f67e35 not found in repository /mnt/borg-repository.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 5159, in main
    exit_code = archiver.run(args)
  File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 5090, in run
    return set_ec(func(args))
  File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 181, in wrapper
    return method(self, args, repository=repository, cache=cache_, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 1439, in do_info
    return self._info_repository(args, repository, manifest, key, cache)
  File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 1496, in _info_repository
    json_print(info)
  File "/usr/local/lib/python3.10/site-packages/borg/helpers/parseformat.py", line 1014, in json_print
    print(json_dump(obj))
  File "/usr/local/lib/python3.10/site-packages/borg/helpers/parseformat.py", line 1010, in json_dump
    return json.dumps(obj, sort_keys=True, indent=4, cls=BorgJsonEncoder)
  File "/usr/local/lib/python3.10/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/local/lib/python3.10/json/encoder.py", line 201, in encode
    chunks = list(chunks)
  File "/usr/local/lib/python3.10/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/local/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/usr/local/lib/python3.10/json/encoder.py", line 438, in _iterencode
    o = _default(o)
  File "/usr/local/lib/python3.10/site-packages/borg/helpers/parseformat.py", line 980, in default
    'stats': o.stats(),
  File "/usr/local/lib/python3.10/site-packages/borg/cache.py", line 435, in stats
    archive = Archive(self.repository, self.key, self.manifest, archive_name,
  File "/usr/local/lib/python3.10/site-packages/borg/archive.py", line 486, in __init__
    self.load(info.id)
  File "/usr/local/lib/python3.10/site-packages/borg/archive.py", line 497, in load
    self.metadata = self._load_meta(self.id)
  File "/usr/local/lib/python3.10/site-packages/borg/archive.py", line 489, in _load_meta
    data = self.key.decrypt(id, self.repository.get(id))
  File "/usr/local/lib/python3.10/site-packages/borg/repository.py", line 1205, in get
    raise self.ObjectNotFound(id, self.path) from None
borg.repository.Repository.ObjectNotFound: Object with key d300371ef50b97ee32356e93a6a5fe7c9e7a7a603a41856ac12a7e7b39f67e35 not found in repository /mnt/borg-repository.

Platform: Linux e23dff7112c4 5.15.0-50-generic #56-Ubuntu SMP Tue Sep 20 13:23:26 UTC 2022 x86_64
Linux: Unknown Linux
Borg: 1.2.2  Python: CPython 3.10.8 msgpack: 1.0.4 fuse: llfuse 1.4.2 [pyfuse3,llfuse]
PID: 15341  CWD: /root
sys.argv: ['/usr/local/bin/borg', 'info', '--json', '/mnt/borg-repository']
SSH_ORIGINAL_COMMAND: None

/mnt/borg-repository: Error running actions for repository
Command '('borg', 'info', '--json', '/mnt/borg-repository')' returned non-zero exit status 2.
/etc/borgmatic.d/config.yml: No commands to run for pre-actions hook
/etc/borgmatic.d/config.yml: No commands to run for post-actions hook
/etc/borgmatic.d/config.yml: Running 2 commands for on-error hook
echo "Error while creating a backup."
Error while creating a backup.

Environment

docker 20.10.18
borgmatic 1.7.4
borg 1.2.2
apprise 1.1.0
Python 3.10.8
Applying custom cron
Cron job set as:
0 5 * * * borgmatic --stats -v 0 2>&1

Not quite sure what "Object with key d300371ef50b97ee32356e93a6a5fe7c9e7a7a603a41856ac12a7e7b39f67e35 not found in repository /mnt/borg-repository." is, but as far as I know, the repo data should be good.

If it's beyond saving, it's not a big issue, I'll just recreate it, but it'd be good to understand the why/what and maybe potentially think of a more suitable error message for users (working on the assumption of zero knowledge by said user).

#### What I'm trying to do and why Create local backup. Remote backup seems to work fine (in the same config file). #### Steps to reproduce (if a bug) docker exec Borgmatic sh -c "cd && borgmatic --stats -v 1 --files 2>&1" #### Actual behavior (if a bug) ``` Ensuring legacy configuration is upgraded borg --version --debug --show-rc /etc/borgmatic.d/config.yml: Calling healthchecks hook function initialize_monitor /etc/borgmatic.d/config.yml: Calling healthchecks hook function ping_monitor /etc/borgmatic.d/config.yml: Pinging Healthchecks start /etc/borgmatic.d/config.yml: Using Healthchecks ping URL https://hc-ping.com/id/start /etc/borgmatic.d/config.yml: No commands to run for pre-actions hook /etc/borgmatic.d/config.yml: No commands to run for pre-check hook /mnt/borg-repository: Running consistency checks borg info --json /mnt/borg-repository Object with key d300371ef50b97ee32356e93a6a5fe7c9e7a7a603a41856ac12a7e7b39f67e35 not found in repository /mnt/borg-repository. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 5159, in main exit_code = archiver.run(args) File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 5090, in run return set_ec(func(args)) File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 181, in wrapper return method(self, args, repository=repository, cache=cache_, **kwargs) File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 1439, in do_info return self._info_repository(args, repository, manifest, key, cache) File "/usr/local/lib/python3.10/site-packages/borg/archiver.py", line 1496, in _info_repository json_print(info) File "/usr/local/lib/python3.10/site-packages/borg/helpers/parseformat.py", line 1014, in json_print print(json_dump(obj)) File "/usr/local/lib/python3.10/site-packages/borg/helpers/parseformat.py", line 1010, in json_dump return json.dumps(obj, sort_keys=True, indent=4, cls=BorgJsonEncoder) File "/usr/local/lib/python3.10/json/__init__.py", line 238, in dumps **kw).encode(obj) File "/usr/local/lib/python3.10/json/encoder.py", line 201, in encode chunks = list(chunks) File "/usr/local/lib/python3.10/json/encoder.py", line 431, in _iterencode yield from _iterencode_dict(o, _current_indent_level) File "/usr/local/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict yield from chunks File "/usr/local/lib/python3.10/json/encoder.py", line 438, in _iterencode o = _default(o) File "/usr/local/lib/python3.10/site-packages/borg/helpers/parseformat.py", line 980, in default 'stats': o.stats(), File "/usr/local/lib/python3.10/site-packages/borg/cache.py", line 435, in stats archive = Archive(self.repository, self.key, self.manifest, archive_name, File "/usr/local/lib/python3.10/site-packages/borg/archive.py", line 486, in __init__ self.load(info.id) File "/usr/local/lib/python3.10/site-packages/borg/archive.py", line 497, in load self.metadata = self._load_meta(self.id) File "/usr/local/lib/python3.10/site-packages/borg/archive.py", line 489, in _load_meta data = self.key.decrypt(id, self.repository.get(id)) File "/usr/local/lib/python3.10/site-packages/borg/repository.py", line 1205, in get raise self.ObjectNotFound(id, self.path) from None borg.repository.Repository.ObjectNotFound: Object with key d300371ef50b97ee32356e93a6a5fe7c9e7a7a603a41856ac12a7e7b39f67e35 not found in repository /mnt/borg-repository. Platform: Linux e23dff7112c4 5.15.0-50-generic #56-Ubuntu SMP Tue Sep 20 13:23:26 UTC 2022 x86_64 Linux: Unknown Linux Borg: 1.2.2 Python: CPython 3.10.8 msgpack: 1.0.4 fuse: llfuse 1.4.2 [pyfuse3,llfuse] PID: 15341 CWD: /root sys.argv: ['/usr/local/bin/borg', 'info', '--json', '/mnt/borg-repository'] SSH_ORIGINAL_COMMAND: None /mnt/borg-repository: Error running actions for repository Command '('borg', 'info', '--json', '/mnt/borg-repository')' returned non-zero exit status 2. /etc/borgmatic.d/config.yml: No commands to run for pre-actions hook /etc/borgmatic.d/config.yml: No commands to run for post-actions hook /etc/borgmatic.d/config.yml: Running 2 commands for on-error hook echo "Error while creating a backup." Error while creating a backup. ``` #### Environment docker 20.10.18 borgmatic 1.7.4 borg 1.2.2 apprise 1.1.0 Python 3.10.8 Applying custom cron Cron job set as: 0 5 * * * borgmatic --stats -v 0 2>&1 Not quite sure what "Object with key d300371ef50b97ee32356e93a6a5fe7c9e7a7a603a41856ac12a7e7b39f67e35 not found in repository /mnt/borg-repository." is, but as far as I know, the repo data should be good. If it's beyond saving, it's not a big issue, I'll just recreate it, but it'd be good to understand the why/what and maybe potentially think of a more suitable error message for users (working on the assumption of zero knowledge by said user).
Owner

Interesting.. This looks like another Borg repository consistency issue. Have you tried check --repair? Have there been any hardware failures or other problems with this repository that might explain this occurring?

Interesting.. This looks like another Borg repository consistency issue. Have you tried `check --repair`? Have there been any hardware failures or other problems with this repository that might explain this occurring?
witten added the
question / support
label 2022-10-16 20:17:57 +00:00
Owner

Also, the response in this ticket may be helpful: https://github.com/borgbackup/borg/issues/2414

Also, the response in this ticket may be helpful: https://github.com/borgbackup/borg/issues/2414
Author

Heya,

The message comes up immediately, even if I run:

docker exec Borgmatic sh -c "cd && borgmatic check --only data --only extract --verbosity 1 --monitoring-verbosity 1"

Or

borgmatic check --progress --repair

It's almost as if it's unable to find one of the files that define the repo as stated in the other ticket.

Zero hardware issues, ram is ECC (with nothing on memtest), and hdd's are all showing good with smart.

Certainly an unusual one!

I'll give "borg delete --cache-only repo" a bit later and see what happens!

Worst case, I'll recreate the repo as it's quite an old one, so it might be a good shout.

Thanks!

Heya, The message comes up immediately, even if I run: docker exec Borgmatic sh -c "cd && borgmatic check --only data --only extract --verbosity 1 --monitoring-verbosity 1" Or borgmatic check --progress --repair It's almost as if it's unable to find one of the files that define the repo as stated in the other ticket. Zero hardware issues, ram is ECC (with nothing on memtest), and hdd's are all showing good with smart. Certainly an unusual one! I'll give "borg delete --cache-only repo" a bit later and see what happens! Worst case, I'll recreate the repo as it's quite an old one, so it might be a good shout. Thanks!
Author

I recreated the repo, and no issues so far.

Looks like it may have just been a weird issue, but I'll keep an eye.

Thanks!

I recreated the repo, and no issues so far. Looks like it may have just been a weird issue, but I'll keep an eye. Thanks!
Owner

Glad to hear it's at least working for now!

Glad to hear it's at least working for now!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#600
No description provided.