Get a cloud storage that comes with Borg installed server-side. For example rsync.net.
Set the env variable BORG_REPO to e.g. ssh://zh1234@zh1234.rsync.net/data1/home/zh1234/borg_backups as specified in Borg's documentation.
Try to perform a backup from Nextcloud AIO.
Expected behavior
Nextcloud should perform the backups and restores using the remote Borg repository without issues because they are natively and seamlessly supported by Borg and don't require additional changes to use them compared to local repositories.
Actual behavior
Nextcloud AIO harcodes $BORG_BACKUP_DIRECTORY (/mnt/borgbackup/borg) in all the Borg commands, which causes Borg to use this local repository and to ignore the remote repository. Nextcloud AIO doesn't provide a way to override the value of BORG_BACKUP_DIRECTORY so we are stuck:
While the remote Borg repository could as a hack be mounted with sshfs or SMB in a Docker volume mounted to the /mnt/borgbackup/borg it's unreliable, slow, and awkward compared to using the standard Borg feature.
Steps to reproduce
BORG_REPO
to e.g.ssh://zh1234@zh1234.rsync.net/data1/home/zh1234/borg_backups
as specified in Borg's documentation.Expected behavior
Nextcloud should perform the backups and restores using the remote Borg repository without issues because they are natively and seamlessly supported by Borg and don't require additional changes to use them compared to local repositories.
Actual behavior
Nextcloud AIO harcodes
$BORG_BACKUP_DIRECTORY
(/mnt/borgbackup/borg
) in all the Borg commands, which causes Borg to use this local repository and to ignore the remote repository. Nextcloud AIO doesn't provide a way to override the value ofBORG_BACKUP_DIRECTORY
so we are stuck:https://github.com/nextcloud/all-in-one/blob/ef1e7c28f6fe002a079de8e92e76f2866e3b2b4f/Containers/borgbackup/start.sh#L4-L5
https://github.com/nextcloud/all-in-one/blob/ef1e7c28f6fe002a079de8e92e76f2866e3b2b4f/Containers/borgbackup/start.sh#L39
Note that remote repositories are natively and seamlessly supported by Borg, and don't require changes compared to local repositories.
Host OS
Ubuntu Server 24.04 LTS aarch64
Nextcloud AIO version
v9.1.0
Current channel
latest
Other valuable info
While the remote Borg repository could as a hack be mounted with sshfs or SMB in a Docker volume mounted to the
/mnt/borgbackup/borg
it's unreliable, slow, and awkward compared to using the standard Borg feature.