Configure different port for borgbackup in Nextcloud AIO

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Rocky Linux 9.5
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • caddy 2.8
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • today
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

I want to set up AIO borg backup to a remote repo with a different ssh port besides :22

Steps to replicate it (hint: details matter!):

  1. Enter the backup path user@server:port/./borg/nextcloud
  2. Start the backup

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

2024-12-11T16:38:13.579964873Z Your public ssh key for borgbackup is: xxx
2024-12-11T16:40:26.493169201Z Remote: ssh: connect to host server port 22: Network unreachable
2024-12-11T16:40:26.496632982Z Connection closed by remote host. Is borg working on the server?
2024-12-11T16:40:26.525193497Z Initializing repository...
2024-12-11T16:40:26.849397449Z using builtin fallback logging configuration
2024-12-11T16:40:27.035412504Z 33 self tests completed in 0.19 seconds
2024-12-11T16:40:27.036413118Z SSH command line: ['ssh', '-o', 'StrictHostKeyChecking=accept-new', '-i', '/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/id_borg', 'user@server', 'borg', 'serve', '--debug']
2024-12-11T16:42:37.565172507Z Remote: ssh: connect to host server port 22: Network unreachable
2024-12-11T16:42:37.568639589Z Connection closed by remote host. Is borg working on the server?
2024-12-11T16:42:37.568661649Z Traceback (most recent call last):
2024-12-11T16:42:37.568665253Z   File "/usr/lib/python3.12/site-packages/borg/archiver.py", line 5401, in main
2024-12-11T16:42:37.568667658Z     exit_code = archiver.run(args)
2024-12-11T16:42:37.568669699Z                 ^^^^^^^^^^^^^^^^^^
2024-12-11T16:42:37.568671650Z   File "/usr/lib/python3.12/site-packages/borg/archiver.py", line 5321, in run
2024-12-11T16:42:37.568673801Z     return set_ec(func(args))
2024-12-11T16:42:37.568675783Z                   ^^^^^^^^^^
2024-12-11T16:42:37.568677684Z   File "/usr/lib/python3.12/site-packages/borg/archiver.py", line 168, in wrapper
2024-12-11T16:42:37.568679652Z     repository = RemoteRepository(location.omit_archive(), create=create, exclusive=argument(args, exclusive),
2024-12-11T16:42:37.568681666Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-11T16:42:37.568683603Z   File "/usr/lib/python3.12/site-packages/borg/remote.py", line 578, in __init__
2024-12-11T16:42:37.568685546Z     raise ConnectionClosedWithHint('Is borg working on the server?') from None
2024-12-11T16:42:37.568687647Z borg.remote.ConnectionClosedWithHint: Connection closed by remote host. Is borg working on the server?
2024-12-11T16:42:37.568689804Z 
2024-12-11T16:42:37.568691778Z Platform: Linux 150b04da3c97 5.14.0-503.15.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 26 17:24:29 UTC 2024 x86_64
2024-12-11T16:42:37.568693966Z Linux: Unknown Linux  
2024-12-11T16:42:37.568695961Z Borg: 1.2.8  Python: CPython 3.12.7 msgpack: 1.0.8 fuse: llfuse 1.5.0 [pyfuse3,llfuse]
2024-12-11T16:42:37.568697929Z PID: 35  CWD: /
2024-12-11T16:42:37.568699733Z sys.argv: ['/usr/bin/borg', 'init', '--debug', '--encryption=repokey-blake2']
2024-12-11T16:42:37.568701800Z SSH_ORIGINAL_COMMAND: None
2024-12-11T16:42:37.568703739Z 
2024-12-11T16:42:37.596844841Z Could not initialize borg repository.

I upgraded to Nextcloud AIO 10.3.0 which supports this

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.