Restore from borg backup not working

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

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:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • latest-arm64
  • Operating system and version (e.g., Ubuntu 24.04):
    • macOS 26.3- Orbstack 2.0.5
  • Web server and version (e.g, Apache 2.4.25):
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Cloudflare
  • PHP version (e.g, 8.3):
    • N/A
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After attempting to migrate to orbstack
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes, cloudflare

Summary of the issue you are facing:

When I try to restore a local borg backup, the AIO restore process results in no folders found.

This was my attempt:

docker run \

--init \

--sig-proxy=false \

--name nextcloud-aio-mastercontainer \

--restart always \

-p 8081:8080 \

-e SKIP_DOMAIN_VALIDATION=true \

-e AIO_BACKUP_MOUNT=“/mnt/borgbackup” \

-v nextcloud_aio_mastercontainer:/mnt/docker-aio-config \

-v “/Volumes/Media2/NextCloud/data”:/mnt/ncdata \

-v “/Volumes/RAID1_8TB/Media Server/NextCloud Backup/Docker Backup”:/mnt/borgbackup \

-v /var/run/docker.sock:/var/run/docker.sock:ro \

nextcloud/all-in-one:latest-arm64

When I put in the local backup location (/mnt/borgbackup), it throws this:

2026-03-03T16:15:02.197005731Z No ‘borg’ directory in the given backup directory found!
2026-03-03T16:15:02.197020772Z Only the files/folders below have been found in the given directory.
2026-03-03T16:15:02.197098064Z .
2026-03-03T16:15:02.197102856Z ..
2026-03-03T16:15:02.197133272Z Please adjust the directory so that the borg archive is positioned in a folder named ‘borg’ inside the given directory!

Steps to replicate it (hint: details matter!):

  1. run the config, ive tried the above and also this one
docker run \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
-p 8081:8080 \
-e SKIP_DOMAIN_VALIDATION=true \
-e AIO_BACKUP_MOUNT="/mnt/borgbackup" \
-e NEXTCLOUD_DATADIR="/mnt/ncdata" \
-v nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
-v "/Volumes/Media2/NextCloud/data":/mnt/ncdata \
-v "/Volumes/RAID1_8TB/Media Server/NextCloud Backup/Docker Backup":/mnt/borgbackup \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
  1. Go to the 8081 address and log in with the code provided

  2. Paste /mnt/borgbackup into the “local backup location” and password

  3. Check the logs - fails to see any folders. If try to enter folder one up, I get this

    2026-03-03T16:19:01.706800499Z No ‘borg’ directory in the given backup directory found!
    2026-03-03T16:19:01.706811125Z Only the files/folders below have been found in the given directory.
    2026-03-03T16:19:01.706911709Z .
    2026-03-03T16:19:01.706914334Z ..
    2026-03-03T16:19:01.706915376Z borgbackup
    2026-03-03T16:19:01.706916293Z mac
    2026-03-03T16:19:01.706917209Z machines
    2026-03-03T16:19:01.706918168Z ncdata
    2026-03-03T16:19:01.706951085Z Please adjust the directory so that the borg archive is positioned in a folder named ‘borg’ inside the given directory!

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

PASTE HERE

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

n/a

Web server / Reverse Proxy

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

n/a

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

PASTE HERE

Apps

The output of occ app:list (if possible).

I tried this troubleshooting step

docker exec nextcloud-aio-mastercontainer ls -la /mnt/borgbackup
total 12
drwxr-xr-x    1 root     root           128 Jan 29 05:06 .
drwxr-xr-x    1 root     root            66 Mar  3 16:13 ..
-rw-r--r--    1 root     root         10244 Mar  2 16:31 .DS_Store
drwxr-xr-x    1 root     root           512 Mar  1 17:11 borg

So, the container can see the files.. but for some reason on the AIO interface, it can’t.

I appreciate any help!

Hi, can you enter /Volumes/RAID1_8TB/Media Server/NextCloud Backup/Docker Backup as backup path and check if that makes it work?

Thank you! this seems promising. I got this

`2026-03-03T17:27:17.317967856Z Passphrase supplied in BORG_PASSPHRASE, by BORG_PASSCOMMAND, or via BORG_PASSPHRASE_FD is incorrect.
2026-03-03T17:27:17.327577169Z The entered path seems to be valid but could not open the backup archive.
2026-03-03T17:27:17.327608294Z Most likely the entered password was wrong so please adjust it accordingly!
`

I tried looking for my password.. I ran this:

docker exec nextcloud-aio-mastercontainer cat /mnt/docker-aio-config/data/configuration.json

In there, I found the borg restore password. It matches what I’ve been trying, but, it is different than the “secrets” borgbackup_password

{
    "password": "[strings of words redacted]",
    "nextcloud_datadir": "/mnt/ncdata",
    "secrets": {
        "INSTANCE_ID": "7b719b95c136e3f50868e5f9959c3c1df9ba2a2b09d61a8d",
        "NEXTCLOUD_PASSWORD": "[long string redacted]",
        "BORGBACKUP_PASSWORD": "[long string redacted]"
    },
    "borg_backup_host_location": "/Volumes/RAID1_8TB/Media Server/NextCloud Backup/Docker Backup",
    "borg_remote_repo": "",
    "borg_restore_password": "[my backup password redacted]",
    "instance_restore_attempt": false,
    "backup-mode": "test"
} 

But now that I think about this.. this is probably just the same password that Im trying to put into the AIO page.. So, would this mean that my original backup is now lost?

You need to enter the old backup passphrase that was used on your old aio instance tbat you are trying to restore from backu0