Occ: Command "upgrade" is not defined

When I migrated from ownCloud, I read online and it said to delete everything in the folder EXCEPT the data & config folder. The reason why it thinks it is not installed is because it can’t connect to the database as the config file is not setup and only the sample exists. The best thing to do is to copy those two folders into the nextcloud directory replacing the existing ones from the unzipped version.

Then try to run the upgrade.

So, in a nutshell…

cd /var/www/nextcloud
rm -R data; rm -R config
cp -R …/nextcloud-10.0.0/data ./; cp -R …/nextcloud-10.0.0/config ./
sudo -u www-data php occ upgrade

This will basically delete the config and data folders inside the current nextcloud directory, and then copies those two folders from your backup into the nextcloud folder so it’s setup. Running the upgrade command should then work as it will detect a current installation and it should update.