アップグレード後の接続タイムアウトにより、Borg バックアップが終了します。

アップグレード後の接続タイムアウトにより、Borg バックアップが終了します。

私はHetznerでホストされているDebianサーバーをアップグレードしました(ブルスアイから本の虫)。私はバックアップ手段の1つとしてStorage Box + borgを使用します。ただし、アップグレード後に実行しようとするすべての試行はborg失敗しますConnection 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への接続を許可するなど、一部のファイアウォールルールが失われ、接続が失われました。

おすすめ記事