borg icon indicating copy to clipboard operation
borg copied to clipboard

Connection closed by remote host. Is borg working on the server? On Synology DS

Open thisfro opened this issue 7 years ago • 3 comments

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

Yes

Is this a BUG / ISSUE report or a QUESTION?

Issue

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

Server 1.1.7 (SynoCommunity) Client: 1.1.9 (apt)

Operating system (distribution) and version.

Server: synology_rtd1296_ds418, Linux 4.4.59+, aarch Client: Ubuntu 16.04, Linux 4.15.0-52-generic, x86_64

Hardware / network configuration, and filesystems used.

Server: ? (standard synology) Client: ext4 Network: Local-LAN

How much data is handled by borg?

Just testing (<1MB)

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

borg init -v --encryption=repokey-blake2 borg-backup@LOCAL_IP:/volume1/backup/test

Describe the problem you're observing.

Remote: Permission denied, please try again.
Connection closed by remote host. Is borg working on the server?

Can you reproduce the problem? If so, describe how. If not, describe troubleshooting

command above

What I've tried

I have ...

  • set proper permissions in /volume1/backup for the user/group borg-backup
ll /volume1/backup
total 0
drwxrwxrwx+ 1 borg-backup borg-backup 12 Jun 30 10:55 .
drwxrwxrwx+ 1 borg-backup borg-backup  8 Jun 30 10:33 @eaDir
  • setup ssh-key with command="/usr/local/bin/borg serve --restrict-to-path /volume1/backup/test" ... (no password promt, so login with key works)
  • tried to use ... ssh://borg-backup@LOCAL_IP/volume1/backup/test
  • also tried to init on server and then create from client (though same result)

thisfro avatar Jun 30 '19 09:06 thisfro

Not sure what's causing this for you, just one hint for better debugging:

The log output prefixed by "remote: " is usually from the remote borg process, but it can be also from the local ssh client process (maybe "ssh: " would be a better prefix, because it's just all what the local ssh client outputs).

ThomasWaldmann avatar Jun 30 '19 12:06 ThomasWaldmann

It seems to be the ssh. I can't login at all, but this is a common problem for Synology's DS.
So I added the borg-backup user to the admin group. This works, but not sure about security though...

thisfro avatar Jun 30 '19 13:06 thisfro

On a Synology server, Borg can be installed via the community package. Then it is installed in: /volume1/@appstore/borgbackup/env/bin/borg --version borg 1.4.1

List archive or repository contents from another server:

borg list --remote-path /volume1/@appstore/borgbackup/env/bin/borg ssh://[email protected]:22/volume1/backups/borgbackup/server1

Extract backup root@server1:~/borg$ borg extract --progress --remote-path /volume1/@appstore/borgbackup/env/bin/borg ssh://[email protected]:22/volume1/backups/borgbackup/server1::raspberry1-backup-2025-10-28-21-11-56 [email protected]:22's password: Enter passphrase for key ssh://[email protected]:22/volume1/backups/borgbackup/server1: 7.1% Extracting: home/pi/IOTstack/volumes/home_assistant/backups/Automatic_backup_2025.6.3_2025-07-27_05.38_09002352.tar

mirino75 avatar Nov 06 '25 20:11 mirino75