Is it possible to change database connection settings using occ CLI?

When I restore a NextCloud backup I want to change the database connection details in config.php to point to the restored database. I run for example

docker exec --user www-data nextcloud php occ config:system:set dbhost --value=database

This throws an error

An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[08006] [7] could not connect to server: No route to host
Is the server running on host “1.1.1.15” and accepting
TCP/IP connections on port 5432? in /var/www/html/lib/private/DB/Connection.php:64

How can I change the database host? Of course I can edit the config.php file but I am trying to automate this part of configuration and so I want to use the occ CLI if at all possible.

Is it possible?