Backup restore silently overwrites backup location if below data directory, then fails

(I hope this is the right category for this)

I have done a stupid. Hopefully, someone reads this and is spared from repeating my brainfart.

I set out to migrate my Nextcloud AIO install from my home server to a Cloud server prior to moving to a different city, so it would be safe if something happend to the moving van.

I created a backup with the integrated utility (Borg).
I uploaded the backup to the cloud server into the directory /datadisk/backup.
I installed the AIO docker image on the cloud server.
I did the setup of the AIO installation and chose the data directory /datadisk.
I started the backup restoration as part of the setup.

Attentive readers might have spotted the problem already: The backup directory is within the data directory. So the backup started restoring, found a directory called backup that shouldn’t be there, deleted it and promptly failed because the backup from which it was restoring went missing.

I’d be happy to create a feature request for a sanity check to prevent that, if someone points me to the right place (does this belong into the “server” or the “aio” github-repo?).

all-in-one is where that would need to go.

The backup solution referenced is provided by AIO.

Sorry to hear about your troubles.

Won’t help you this time around, but also sounds like a good opportunity to evaluate your backup approach to make sure you always have at least two backups around.

Will you be able to recover either from a backup of your cloud host or your original server at least?