Nextcloud version (eg, 29.0.5): 29.0.4
Operating system and version (eg, Ubuntu 24.04): 24.04
Apache or nginx version (eg, Apache 2.4.25): nginx/1.24.0
PHP version (eg, 8.3): 8.3
The issue you are facing:
After migrating from the old server to the new one, a database backup was deployed on the new server, but with a new name. Connection parameters in the file config.php have been changed to new ones (new database name). The problem is that now the following error appears in the log when starting cron:
ERROR Application: cron
Message: Exception
Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at “192.168.1.104”, port 5432 failed: FATAL: database “nc-new” does not exist
nc-new - old database name, new one is nc2404
Is this the first time you’ve seen this error? (Y/N): Yes
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
'dbtype' => 'pgsql',
'dbname' => 'nc2404',
'dbhost' => '192.168.1.104',
'dbport' => '5432',
'dbtableprefix' => 'oc_',
'dbuser' => 'postgres',
'dbpassword' => 'mypassword',