Borg backup fails, not sure how to fix

Hi! i’m using a home server that i initially started on windows using docker. i’m using two external drives formatted with NTFS, one for data and one for backup. I now switched to ubuntu to improve performance and restored the borg backup (worked flawlessly). i didn’t move the backup to another folder before restoring and i think now borg is confused because a folder with backup already exists.
from borg log: 'Cannot initialize a new repository as that was already done at least one time.
If you still want to do so, you may delete the ‘borg.config’ file that is stored in the mastercontainer volume manually, which will allow you to initialize a new borg repository in the chosen directory.’
i don’t know how to access the mastercontainer volume to delete it, and i don’t know if it would be a good idea to do so.
I think i could solve by moving the backup to another folder and restore it again, but it’s better to ask you first :slight_smile:
thank you

this does not strictly seem a nextcloud-problem… :wink:
What’s the exact borg-command you are trying to run?
borg init cannot be run on an exisiting repo.
run borg -v info on your repo.
If you (want to) run borg from a script i suggest you first try to run its commands one-by-one manually without a log but output to console to debug.
sometimes it helps to delete .cache/borg of the user that runs borg (will be rebuilt by the next borg-run).
GOOD LUCK!

So did you move the backup to another folder after restoring?

Tried and didn’t work, also tried deleting it (after making a copy) but same error

Im just trying to make the automatic backup work from the aio interface. After restoring the backup it didn’t ask where I wanted the automatic backups to be placed like it did on the first install

Indeed, it will not ask again as the original place will be used again.

1 Like

How should I fix this? :see_no_evil:

Possible solution: how to change backup directory path once submitted? · Discussion #596 · nextcloud/all-in-one · GitHub


A different one would be editing the configuration.json directly and changing the path in there. It is stored by default in /var/lib/docker/volumes/nextcloud_aio_mastercontainer/_data/data/configuration.json
However this is usually not recommended as you might break your instance when doing so.

1 Like

I’ll try and report back
Thank you :blush:

Forgot to reply, I was able to fix this
Thanks to your replies I found the Borg config file and deleting it allowed me to choose the backup location again c:

All right! Please mark one post as the solution then!

1 Like