Migration failed

Hello everyone
my environment is
owncloud application: Host A
Data storage: host B
Database: Host C
Now you need to migrate host A to host D

I refer to the following migration steps Migrating to a Different Server :: ownCloud Documentation
My personal idea is that the database does not need to be operated, so it is probably after the maintenance mode is turned on, that is, the transfer folder (rsync)

When the following command is executed on the source host, it is normal (no error message appears)
sudo -u www-data ./occ maintenance:mode --on

But when running the following command on the destination host after rsycn, an error occurred
sudo -u www-data ./occ maintenance:mode
sudo -u www-data ./occ maintenance:mode --off

Same error log:

root@debian:/var/www/html/owncloud# sudo -u www-data ./occ maintenance:mode
ownCloud is not installed - only a limited number of commands are available

  Command "maintenance: mode" is not defined.

  Do you want to run "maintenance:install" instead? (yes/no) [no]:

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:debian 11

Web server: apache2

Database: postgresql13

**PHP version:**7.4

ownCloud version: 10.10

Updated from an older ownCloud or fresh install:

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

$CONFIG = array (
  'instanceid' => 'ocsyznl6sieu',

Log in to the web-UI with an administrator account and click on
‘admin’ → ‘Generate Config Report’ → ‘Download ownCloud config report’
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.


If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

root@debian:/var/www/html/owncloud# sudo -u www-data php occ config:list system
ownCloud is not installed - only a limited number of commands are available

  There are no commands defined in the "config" namespace.

It worked after restoring the old config.php backup file from the source host

By The Way
1:Why doesn’t have a parameter thet ‘maintenance’= in my config.php file

2:**Why config.php content is missing ? **

1 Like

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