Remote backup integrity issues #403

Closed
opened 2021-03-28 18:54:48 +00:00 by lgwapnitsky · 2 comments

I'm tryingt to remotely backup a database using borgmatic. My remote server is running borg, using rclone/s3 as a backend. With just borg, I can back up this client with no issues, but I have a need for database backup, hence borgmatic.

I'm receiving errors when doing integrity checks as such:

SSH_ORIGINAL_COMMAND: None                                                           
borg@borg.wapnet.local.lan:/mnt/serverbackups: Error running actions for repository
Command 'borg check --prefix {hostname}- --info borg@borg.wapnet.local.lan:/mnt/serverbackups' returned non-zero exit status 2.
/etc/borgmatic/config.yaml: Error running configuration file

summary:
/etc/borgmatic/config.yaml: Error running configuration file
borg@borg.wapnet.local.lan:/mnt/serverbackups: Error running actions for repository
...
Remote: Data integrity error: Invalid segment magic [segment 11, offset 0]
Remote: Data integrity error: Invalid segment magic [segment 13, offset 0]
Remote: Data integrity error: Invalid segment magic [segment 14, offset 0]
Remote: Data integrity error: Invalid segment magic [segment 15, offset 0]
Remote: Data integrity error: Invalid segment magic [segment 18, offset 0]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/remote.py", line 247, in serve
    res = f(**args)
  File "/usr/lib/python3/dist-packages/borg/repository.py", line 971, in check
    objects = list(self.io.iter_objects(segment))
  File "/usr/lib/python3/dist-packages/borg/repository.py", line 1415, in iter_objects
    if fd.read(MAGIC_LEN) != MAGIC:
OSError: [Errno 5] Input/output error
Borg server: Platform: Linux borg 5.4.78-2-pve #1 SMP PVE 5.4.78-2 (Thu, 03 Dec 2020 14:26:17 +0100) x86_64
Borg server: Linux: Unknown Linux
Borg server: Borg: 1.1.15  Python: CPython 3.8.5 msgpack: 0.5.6
Borg server: PID: 2759  CWD: /home/borg
Borg server: sys.argv: ['/usr/bin/borg', 'serve', '--umask=077', '--info']
Borg server: SSH_ORIGINAL_COMMAND: None
Platform: Linux bitwarden 5.4.78-2-pve #1 SMP PVE 5.4.78-2 (Thu, 03 Dec 2020 14:26:17 +0100) x86_64
Linux: Unknown Linux
Borg: 1.1.15  Python: CPython 3.8.5 msgpack: 0.5.6
PID: 1199  CWD: /home/borg
sys.argv: ['/usr/bin/borg', 'check', '--prefix', '{hostname}-', '--info', 'borg@borg.wapnet.local.lan:/mnt/serverbackups']
SSH_ORIGINAL_COMMAND: None
Command 'borg check --prefix {hostname}- --info borg@borg.wapnet.local.lan:/mnt/serverbackups' returned non-zero exit status 2.

Need some help? https://torsion.org/borgmatic/#issues

Advice is welcome

I'm tryingt to remotely backup a database using borgmatic. My remote server is running borg, using rclone/s3 as a backend. With just borg, I can back up this client with no issues, but I have a need for database backup, hence borgmatic. I'm receiving errors when doing integrity checks as such: ``` SSH_ORIGINAL_COMMAND: None borg@borg.wapnet.local.lan:/mnt/serverbackups: Error running actions for repository Command 'borg check --prefix {hostname}- --info borg@borg.wapnet.local.lan:/mnt/serverbackups' returned non-zero exit status 2. /etc/borgmatic/config.yaml: Error running configuration file summary: /etc/borgmatic/config.yaml: Error running configuration file borg@borg.wapnet.local.lan:/mnt/serverbackups: Error running actions for repository ... Remote: Data integrity error: Invalid segment magic [segment 11, offset 0] Remote: Data integrity error: Invalid segment magic [segment 13, offset 0] Remote: Data integrity error: Invalid segment magic [segment 14, offset 0] Remote: Data integrity error: Invalid segment magic [segment 15, offset 0] Remote: Data integrity error: Invalid segment magic [segment 18, offset 0] Traceback (most recent call last): File "/usr/lib/python3/dist-packages/borg/remote.py", line 247, in serve res = f(**args) File "/usr/lib/python3/dist-packages/borg/repository.py", line 971, in check objects = list(self.io.iter_objects(segment)) File "/usr/lib/python3/dist-packages/borg/repository.py", line 1415, in iter_objects if fd.read(MAGIC_LEN) != MAGIC: OSError: [Errno 5] Input/output error Borg server: Platform: Linux borg 5.4.78-2-pve #1 SMP PVE 5.4.78-2 (Thu, 03 Dec 2020 14:26:17 +0100) x86_64 Borg server: Linux: Unknown Linux Borg server: Borg: 1.1.15 Python: CPython 3.8.5 msgpack: 0.5.6 Borg server: PID: 2759 CWD: /home/borg Borg server: sys.argv: ['/usr/bin/borg', 'serve', '--umask=077', '--info'] Borg server: SSH_ORIGINAL_COMMAND: None Platform: Linux bitwarden 5.4.78-2-pve #1 SMP PVE 5.4.78-2 (Thu, 03 Dec 2020 14:26:17 +0100) x86_64 Linux: Unknown Linux Borg: 1.1.15 Python: CPython 3.8.5 msgpack: 0.5.6 PID: 1199 CWD: /home/borg sys.argv: ['/usr/bin/borg', 'check', '--prefix', '{hostname}-', '--info', 'borg@borg.wapnet.local.lan:/mnt/serverbackups'] SSH_ORIGINAL_COMMAND: None Command 'borg check --prefix {hostname}- --info borg@borg.wapnet.local.lan:/mnt/serverbackups' returned non-zero exit status 2. Need some help? https://torsion.org/borgmatic/#issues ``` Advice is welcome
Owner

I unfortunately don't have a ton of insight here; my guess is there's a problem with the repository and/or the filesystem it's stored on that's causing segment file integrity issues. (I'm going by similar Borg tickets like this one.) When you say that you're using rclone/s3 as a backend, does that mean you're using a traditional filesystem on the server (ext4, etc.) and then running rclone to sync that to s3? Or are you doing something more exotic?

I unfortunately don't have a ton of insight here; my guess is there's a problem with the repository and/or the filesystem it's stored on that's causing segment file integrity issues. (I'm going by similar Borg tickets like [this one](https://github.com/borgbackup/borg/issues/469).) When you say that you're using rclone/s3 as a backend, does that mean you're using a traditional filesystem on the server (ext4, etc.) and then running rclone to sync that to s3? Or are you doing something more exotic?
witten added the
question / support
label 2021-03-28 19:27:13 +00:00
Owner

Closing due to inactivity. But feel free to reopen if you'd like to discuss further!

Closing due to inactivity. But feel free to reopen if you'd like to discuss further!
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#403
No description provided.