borg icon indicating copy to clipboard operation
borg copied to clipboard

No backups anymore and Repo cannot link existing Repo #1660

Open 21Kingshill opened this issue 3 years ago • 4 comments

As suggested by @real-yfprojects this topic is transferred from general questions:

Have you checked borgbackup docs, FAQ, and open GitHub issues?

Yes

Is this a BUG / ISSUE report or a QUESTION?

Bug / Issue

System information. For client/server mode post info for both machines.

Your borg version (borg -V).

1.2.3

Operating system (distribution) and version.

MacOS 13.3 Ventura

Hardware / network configuration, and filesystems used.

MacBook Pro / Unifi Network

How much data is handled by borg?

around 40 GB

Full borg commandline that lead to the problem (leave away excludes and passwords)

Used via Vorta

Describe the problem you're observing.

Varta Runs scheduled every 6hours. This morning I found the message, that the backup was not created.

2023-03-17 09:03:12,657 - vorta.scheduler - DEBUG - Refreshing all scheduler timers
2023-03-17 09:03:12,666 - vorta.scheduler - DEBUG - Nothing scheduled for profile 1 because of unset repo.
2023-03-17 09:03:12,672 - vorta.scheduler - DEBUG - Nothing scheduled for profile 2 because of timeout until 2023-03-17 09:27:58.
2023-03-17 09:04:21,090 - root - DEBUG - Expected error parsing file in .ssh: known_hosts.old (You can safely ignore this)
Traceback (most recent call last):
  File "utils.py", line 195, in get_private_keys
  File "paramiko/pkey.py", line 232, in from_private_key_file
  File "paramiko/rsakey.py", line 63, in __init__
  File "paramiko/rsakey.py", line 186, in _from_private_key_file
  File "paramiko/pkey.py", line 305, in _read_private_key_file
  File "paramiko/pkey.py", line 323, in _read_private_key

The traceback block is repeated a few times....

To solve that, I tried to unlink and add the existing repo again but this doesn't work either. The following entry can be found in the log:

paramiko.ssh_exception.SSHException: not a valid OPENSSH private key file
2023-03-17 09:04:21,111 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2023-03-17 09:04:21,111 - vorta.keyring.abc - DEBUG - Using VortaDarwinKeyring
2023-03-17 09:04:37,825 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2023-03-17 09:04:37,825 - vorta.keyring.abc - DEBUG - Using VortaDarwinKeyring
2023-03-17 09:04:37,830 - vorta.keyring.darwin - DEBUG - Retrieved password for repo /Users/tom/.CMVolumes/CM_GoogleDrive/Vorta_Eigene
2023-03-17 09:04:42,507 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2023-03-17 09:04:42,507 - vorta.keyring.abc - DEBUG - Using VortaDarwinKeyring
2023-03-17 09:04:42,507 - vorta.borg.borg_job - DEBUG - Using VortaDarwinKeyring keyring to store passwords.
2023-03-17 09:04:42,515 - vorta.keyring.darwin - DEBUG - Retrieved password for repo /Users/tom/.CMVolumes/CM_GoogleDrive/Vorta_Eigene
2023-03-17 09:04:42,519 - vorta.borg.borg_job - INFO - Running command /Applications/Vorta.app/Contents/Resources/borg-dir/borg.exe info --info --json --log-json /Users/tom/.CMVolumes/CM_GoogleDrive/Vorta_Eigene
2023-03-17 09:04:49,832 - vorta.borg.borg_job - ERROR - Data integrity error: Invalid segment entry size 2600563748 - too big [segment 73, offset 123354135]
2023-03-17 09:04:49,838 - vorta.borg.borg_job - ERROR - Traceback (most recent call last):
  File "borg/archiver.py", line 5168, in main
  File "borg/archiver.py", line 5099, in run
  File "borg/archiver.py", line 181, in wrapper
  File "borg/archiver.py", line 1451, in do_info
  File "borg/archiver.py", line 1508, in _info_repository
  File "borg/helpers/parseformat.py", line 1014, in json_print
  File "borg/helpers/parseformat.py", line 1010, in json_dump
  File "json/__init__.py", line 234, in dumps
  File "json/encoder.py", line 201, in encode
  File "json/encoder.py", line 431, in _iterencode
  File "json/encoder.py", line 405, in _iterencode_dict
  File "json/encoder.py", line 438, in _iterencode
  File "borg/helpers/parseformat.py", line 980, in default
  File "borg/cache.py", line 435, in stats
  File "borg/archive.py", line 486, in __init__
  File "borg/archive.py", line 497, in load
  File "borg/archive.py", line 489, in _load_meta
  File "borg/repository.py", line 1204, in get
  File "borg/repository.py", line 1572, in read
  File "borg/repository.py", line 1599, in _read
borg.helpers.errors.IntegrityError: Data integrity error: Invalid segment entry size 2600563748 - too big [segment 73, offset 123354135]

Platform: Darwin Toms-MBP.local 22.4.0 Darwin Kernel Version 22.4.0: Tue Feb 28 22:23:33 PST 2023; root:xnu-8796.100.772.505.2~2/RELEASE_ARM64_T6000 x86_64
Borg: 1.2.3  Python: CPython 3.9.16 msgpack: 1.0.4 fuse: llfuse 1.4.2 [pyfuse3,llfuse]
PID: 9248  CWD: /
sys.argv: ['/Applications/Vorta.app/Contents/Resources/borg-dir/borg.exe', 'info', '--info', '--json', '--log-json', '/Users/tom/.CMVolumes/CM_GoogleDrive/Vorta_Eigene']
SSH_ORIGINAL_COMMAND: None

Until yesterday it was running like a charm. I haven't restarted the Mac since then and there was no strange event either. The only other event was a short network outage yesterday, which also caused some trouble in my network equipment. However, I do not know if there is any correlation at all.

Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.

Yes

Include any warning/errors/backtraces from the system logs

See above

21Kingshill avatar Mar 17 '23 19:03 21Kingshill

For anyone wondering, the paramiko error is not related to this problem.

real-yfprojects avatar Mar 17 '23 21:03 real-yfprojects

https://borgbackup.readthedocs.io/en/stable/faq.html#i-get-an-integrityerror-or-similar-what-now

Repairing a damaged repository borg check provides diagnostics and --repair options for repositories with issues. We recommend to first run without --repair to assess the situation. If the found issues and proposed repairs seem right, re-run “check” with --repair enabled.

infectormp avatar Mar 18 '23 04:03 infectormp

@21Kingshill so, were you able to repair your repo? did you find the root cause?

ThomasWaldmann avatar Mar 29 '23 11:03 ThomasWaldmann

Sorry for not replying earlier: I was not able to repair the repo since I wasn't able to run it on Mac. However, it's seems a miracle happened and when I tried to create another repo I was also able to link the old one again (there was some automatic repair running though).

So that specific issue is closed for me.

Thanks for the support....

21Kingshill avatar Mar 29 '23 11:03 21Kingshill