AIO backup and mastercontainer not working

I restarted my unRAID server and noticed my NC AIO wasn’t coming up, so I looked at the logs. Borg backup was unexpectedly holding up the other containers with this:

Cannot create a backup now.
Reason is that the database export failed the last time.
Most likely was the database container not correctly shut down via the AIO interface.

You might want to try the database export again manually by running the three commands:
sudo docker start nextcloud-aio-database
sleep 10
sudo docker stop nextcloud-aio-database -t 1800

Afterwards try to create a backup again and it should hopefully work.
If it should still fail, feel free to report this to https://github.com/nextcloud/all-in-one/issues and post the database container logs and the borgbackup container logs into the thread. Thanks!
Borg could not get info from the targeted directory.
This might happen if the targeted directory is located on an external drive and the drive not connected anymore. You should check this.
If you instead want to initialize a new backup repository, 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:
sudo docker exec nextcloud-aio-mastercontainer rm /mnt/docker-aio-config/data/borg.config

It keeps repeating the part about the database not being able to back up. The database’s log says this after having run the commands recommended by the backup container (copying the whole last bit as I don’t know where to cut it off):

2024-11-28 15:05:14.268 UTC [14] LOG:  starting PostgreSQL 16.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
2024-11-28 15:05:14.268 UTC [14] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-11-28 15:05:14.268 UTC [14] LOG:  listening on IPv6 address "::", port 5432
2024-11-28 15:05:14.282 UTC [14] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-11-28 15:05:14.322 UTC [24] LOG:  database system was interrupted; last known up at 2024-11-28 14:59:52 UTC
2024-11-28 15:05:14.373 UTC [24] LOG:  database system was not properly shut down; automatic recovery in progress
2024-11-28 15:05:14.388 UTC [24] LOG:  redo starts at 11/FFABC308
2024-11-28 15:05:14.388 UTC [24] LOG:  invalid record length at 11/FFABC340: expected at least 24, got 0
2024-11-28 15:05:14.388 UTC [24] LOG:  redo done at 11/FFABC308 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2024-11-28 15:05:15.141 UTC [14] LOG:  database system is ready to accept connections
++ rm -f /mnt/data/database-dump.sql.temp
++ touch /mnt/data/export.failed
++ pg_dump --username nextcloud nextcloud_database
++ rm -f /mnt/data/database-dump.sql
++ mv /mnt/data/database-dump.sql.temp /mnt/data/database-dump.sql
++ pg_ctl stop -m fast
2024-11-28 15:06:02.543 UTC [14] LOG:  received fast shutdown request
2024-11-28 15:06:02.549 UTC [14] LOG:  aborting any active transactions
2024-11-28 15:06:02.551 UTC [14] LOG:  background worker "logical replication launcher" (PID 27) exited with exit code 1
2024-11-28 15:06:02.552 UTC [22] LOG:  shutting down
2024-11-28 15:06:02.623 UTC [14] LOG:  database system is shut down
++ rm /mnt/data/export.failed
++ echo 'Database dump successful!'
++ set +x
Setting postgres values...

PostgreSQL Database directory appears to contain a database; Skipping initialization

Setting postgres values...

PostgreSQL Database directory appears to contain a database; Skipping initialization

Setting postgres values...

PostgreSQL Database directory appears to contain a database; Skipping initialization

Setting postgres values...

PostgreSQL Database directory appears to contain a database; Skipping initialization

waiting for server to shut down.... done
server stopped
Database dump successful!

The AIO container logs this on repeat:

sudo: /etc/sudo.conf is world writable
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudoers is world writable
sudo: error initializing audit plugin sudoers_audit
Waiting for database to start...

Following this post I ran sudo docker network inspect nextcloud-aio and saw that internal communication seems to be disabled:

[
    {
        "Name": "nextcloud-aio",
        "Id": "b691a30d150fc94419818e9d2ef50903f311b9cfe8c12c5f9bf76f3c7ea974b3",
        "Created": "2024-06-24T10:17:01.539573465-07:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.19.0.0/16",
                    "Gateway": "172.19.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {},
        "Options": {},
        "Labels": {}
    }
]

My unRAID container uses nextcloud/all-in-one:beta as repository, --security-opt label=disabled --restart=unless-stopped as extra parameters and installs memories as community container.


I’d love to make a backup before potentially resetting the AIO instance because I uploaded a lot of data and a lot of changes have been commited to the database earlier today, after the nightly backup ran.

It seems, reinstalling the app from the unRAID appstore while keeping all configs did the trick. At least mostly. Now the WebUI loads so slowly, it times out most of the times. Already logged in clients are as fast as ever, though. See #211543.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.