"pre-upgrade-hook2" already exists!

I tried to upgrade and it failed at 1/2 while starting up. (Tried stopping and starting.)
After that I tried to downgrade (rollback).
Then in the log I am told that NextCloud cannot start because the data is newer than the current version. And rollback is not supported.
Okay, So I tried to upgrade again and I am told that “pre-upgrade-hook2” already exists.

“[EFAULT] Failed to upgrade App: Error: UPGRADE FAILED: pre-upgrade hooks failed: warning: Hook pre-upgrade nextcloud/templates/backup-postgres-hook.yaml failed: 1 error occurred: * jobs.batch “pre-upgrade-hook2” already exists”

I have seen many posts that suggest running some code in the shell. I am not sure where to even start with that process.

Thanks for any help in advance.

POD Logs

Container Name:nextcloud-postgres

2024-02-23 06:41:42.136437-05:002024-02-23T06:41:42.136437722-05:00

2024-02-23 06:41:42.136504-05:00PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-02-23 06:41:42.136514-05:002024-02-23T06:41:42.136514262-05:00

2024-02-23 06:41:42.165288-05:002024-02-23 11:41:42.165 UTC [1] LOG: starting PostgreSQL 13.1 (Debian 13.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit

2024-02-23 06:41:42.165386-05:002024-02-23 11:41:42.165 UTC [1] LOG: listening on IPv4 address “0.0.0.0”, port 5432

2024-02-23 06:41:42.165415-05:002024-02-23 11:41:42.165 UTC [1] LOG: listening on IPv6 address “::”, port 5432

2024-02-23 06:41:42.167067-05:002024-02-23 11:41:42.166 UTC [1] LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”

2024-02-23 06:41:42.170918-05:002024-02-23 11:41:42.170 UTC [26] LOG: database system was shut down at 2024-02-23 11:39:43 UTC

2024-02-23 06:41:42.176378-05:002024-02-23 11:41:42.176 UTC [1] LOG: database system is ready to accept connections

Container Name:nextcloud

2024-02-23 06:42:04.980031-05:00Conf remoteip disabled.

2024-02-23 06:42:04.980079-05:00To activate the new configuration, you need to run:

2024-02-23 06:42:04.980089-05:00service apache2 reload

2024-02-23 06:42:05.060564-05:00=> Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting

2024-02-23 06:42:05.138218-05:00AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.16.0.82. Set the ‘ServerName’ directive globally to suppress this message

2024-02-23 06:42:05.160224-05:00AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.16.0.82. Set the ‘ServerName’ directive globally to suppress this message

2024-02-23 06:42:05.191284-05:00[Fri Feb 23 11:42:05.191139 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.16 configured – resuming normal operations

2024-02-23 06:42:05.191335-05:00[Fri Feb 23 11:42:05.191179 2024] [core:notice] [pid 1] AH00094: Command line: ‘apache2 -D FOREGROUND’

2024-02-23 06:42:55.548810-05:00::1 - - [23/Feb/2024:11:42:55 +0000] “GET /status.php HTTP/1.1” 200 1791 “-” “kube-probe/1.26”

2024-02-23 06:42:55.592303-05:00127.0.0.1 - - [23/Feb/2024:11:42:55 +0000] “GET /status.php HTTP/1.1” 200 1791 “-” “kube-probe/1.26”

2024-02-23 06:42:56.320658-05:00::1 - - [23/Feb/2024:11:42:56 +0000] “GET /status.php HTTP/1.1” 200 1793 “-” “kube-probe/1.26”

2024-02-23 06:43:00.262806-05:00::1 - - [23/Feb/2024:11:43:00 +0000] “GET /status.php HTTP/1.1” 200 1783 “-” “kube-probe/1.26”

2024-02-23 06:43:00.274807-05:00127.0.0.1 - - [23/Feb/2024:11:43:00 +0000] “GET /status.php HTTP/1.1” 200 1787 “-” “kube-probe/1.26”

2024-02-23 06:43:10.261527-05:00127.0.0.1 - - [23/Feb/2024:11:43:10 +0000] “GET /status.php HTTP/1.1” 200 1793 “-” “kube-probe/1.26”

2024-02-23 06:43:10.263772-05:00::1 - - [23/Feb/2024:11:43:10 +0000] “GET /status.php HTTP/1.1” 200 1793 “-” “kube-probe/1.26”

Container Name:nginx

2024-02-23 06:42:02.949303-05:00/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration

2024-02-23 06:42:02.949346-05:00/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/

2024-02-23 06:42:02.951793-05:00/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh

2024-02-23 06:42:03.257922-05:0010-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf

2024-02-23 06:42:03.265769-05:0010-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf

2024-02-23 06:42:03.266099-05:00/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh

2024-02-23 06:42:03.270818-05:00/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh

2024-02-23 06:42:03.272918-05:00/docker-entrypoint.sh: Configuration complete; ready for start up

2024-02-23 06:42:55.548932-05:00172.16.0.1 - - [23/Feb/2024:11:42:55 +0000] “GET /status.php HTTP/2.0” 200 170 “-” “kube-probe/1.26”

Container Name:init-postgresdb

2024-02-23 06:41:41.038221-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:41.038554-05:00waiting for postgres

2024-02-23 06:41:43.080355-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:43.080654-05:00waiting for postgres

2024-02-23 06:41:45.122511-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:45.122802-05:00waiting for postgres

2024-02-23 06:41:47.165473-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:47.165706-05:00waiting for postgres

2024-02-23 06:41:49.207452-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:49.207798-05:00waiting for postgres

2024-02-23 06:41:51.248597-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:51.249011-05:00waiting for postgres

2024-02-23 06:41:53.289947-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:53.290206-05:00waiting for postgres

2024-02-23 06:41:55.331527-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:55.331761-05:00waiting for postgres

2024-02-23 06:41:57.373257-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:57.373644-05:00waiting for postgres

2024-02-23 06:41:59.413867-05:00nextcloud-postgres:5432 - no response

2024-02-23 06:41:59.414135-05:00waiting for postgres

2024-02-23 06:42:01.457534-05:00nextcloud-postgres:5432 - accepting connections

Solved?..

So I have the app installed on about 20 phones and it automatically uploads every picture they take to a folder structured like this.
Photos\Scott\2024\02\23

As I was just looking at the logs I noticed that a user had requested to send up a file because he was taking pictures in the shop. I then noticed another. I decided to go back to the Apps view and saw that for the first time in over 24 hours the status was running. I took a photo on my phone and a few seconds later it was in the folder on the SMB. I don’t know what had changed but I will take it.