Nextcloud AIO mount remote backup using sshfs

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 29.0.5): 29.0.7.1 - Nextcloud AIO v9.6.0
Operating system and version (eg, Ubuntu 24.04): Ubuntu 22.04.4 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 8.3): replace me

The issue you are facing:
Can’t backup

Is this the first time you’ve seen this error? (Y/N):
Yes

Steps to replicate it:

  1. Create folder /mnt/backup on host
  2. Open AIO interface at nc.mydomain.com:8080 and set backup location as /mnt/backup
  3. Create 1st backup
  4. rsync contents of /mnt/backup to remote server
  5. delete contents on /mnt/backup on host
  6. mount remote borg backup folder to /mnt/backup using sshfs:
    sshfs remoteuser@remoteserver.com:/nextcloud-backup /mnt/backup
  7. stop and restart nextcloud-aio-mastercontainer
  8. open AIO interface and try to check integrity of backups

The output of your Nextcloud log in Admin > Logging:

Logs of mastercontainer show this

2024-10-01T23:18:44.402133524Z NOTICE: PHP message: Slim Application Error
2024-10-01T23:18:44.402158804Z Type: Exception
2024-10-01T23:18:44.402162124Z Code: 0
2024-10-01T23:18:44.402188444Z Message: Could not start container nextcloud-aio-borgbackup: Server error: `POST http://127.0.0.1/v1.41/containers/nextcloud-aio-borgbackup/start` resulted in a `500 Internal Server Error` response:
2024-10-01T23:18:44.402191684Z {"message":"error while creating mount source path '/mnt/backup': mkdir /mnt/backup: file exists"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

Hi, it looks like docker has problems bind-mounting the sshfs mount.

You could try to specify a subdir as backup target in the aio interface and check if that works.

Hello Simon, always thankful for your responses. I started tinkering with your suggestion, and what finally worked was installing borg on the host and creating another repo in the same mounted directory.
I had to play with some of the suggestions mentioned in this post to be able to get the AIO interface to allow me to change the backup location to a subdirectory as you suggested: