升级后,borg 备份因连接超时而结束

升级后,borg 备份因连接超时而结束

我已经升级了我的 Debian 服务器(从 bullseye 到 bookworm),托管在 Hetzner。我使用他们的 Storage Box + borg 作为备份手段之一。然而,自从升级以来,我所有的运行尝试都borgConnection timed out.我不知道如何从中恢复。

borg 版本变更:1.1.16-3 -> 1.2.4-1(注意:这是 Debian 版本控制,但应对应于实际的 borg 版本

脚本调用(删节):


BACKUP_DIR=/mnt/backup/mysql
export BORG_REPO=ssh://[email protected]:23/./my-dir
export BORG_PASSPHRASE='mysecurepassphrase'

borg create                         \
--stats                         \
--list                          \
--show-rc                       \
--compression lz4               \
 ::'{hostname}-db-{now}'        \
 $BACKUP_DIR 

运行时提供的输出--debug

Sun Feb 25 07:53:31 PM CET 2024 Starting backup

using builtin fallback logging configuration
33 self tests completed in 0.05 seconds
SSH command line: ['ssh', '-p', '23', '[email protected]', 'borg-1.2', 'serve', '--debug']
Remote: ssh: connect to host XYZ.your-storagebox.de port 23: Connection timed out
Connection closed by remote host. Is borg working on the server?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 5213, in main
    exit_code = archiver.run(args)
                ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 5144, in run
    return set_ec(func(args))
                  ^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 161, in wrapper
    repository = RemoteRepository(location.omit_archive(), create=create, exclusive=argument(args, exclusive),
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/borg/remote.py", line 578, in __init__
    raise ConnectionClosedWithHint('Is borg working on the server?') from None
borg.remote.ConnectionClosedWithHint: Connection closed by remote host. Is borg working on the server?

Platform: Linux ABC 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64
Linux: Unknown Linux
Borg: 1.2.4  Python: CPython 3.11.2 msgpack: 1.0.3 fuse: None [pyfuse3,llfuse]
PID: 42470  CWD: /root
sys.argv: ['/usr/bin/borg', 'create', '--remote-path=borg-1.2', '--debug', '--progress', '--stats', '--list', '--show-rc', '--compression', 'lz4', '::{hostname}-db-{now}', 'my-dir']
SSH_ORIGINAL_COMMAND: None

terminating with error status, rc 2

重要提示:存储盒可用,因为我可以在其上备份另一台机器(通过 borg)

答案1

我发现这个问题borg毕竟无关。显然,在升级过程中,一些防火墙规则丢失,包括允许连接到端口23,因此连接中断。

相关内容