Nextcloud update failed
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_authtoken CHANGE `password_invalid` password_invalid TINYINT(1) DEFAULT '0'': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes Update failed
do
SET GLOBAL innodb_large_prefix = ON;
SET GLOBAL innodb_file_format = Barracuda;
SET GLOBAL innodb_file_per_table = ON;Erreur :
Faire :
Ne pas oublier d'enlever le mode maintenance
sudo -u www-data php occ maintenance:mode --offRécupérer config et .htaccess et utiliser adminer pour récupérer la base de données
cd /var/www
wget https://download.nextcloud.com/server/releases/nextcloud-16.0.4.tar.bz2
tar -xvf nextcloud-*.tar.bz2
sudo service apache2 stop
mv html html-old
mv nextcloud html
mysqldump -u nextcloud_web -p --databases nextcloud > nextcloud.sql
cp html-old/config/config.php html/config/
copier apps manquantes
sudo chown -R www-data:www-data html
sudo chmod -R g+w html
sudo find html/ -type d -exec chmod 750 {} \;
sudo find html/ -type f -exec chmod 640 {} \;
sudo service apache2 start
cd html
sudo -u www-data php occ upgrade
Mettre à jour .htaccess
Add an exception to the "Check for expected files" operation
https://github.com/nextcloud/updater/blob/master/index.php#L293-L328
Après avoir importé manuellement des fichiers dans Nextcloud (par exemple par ssh ou ftp), il faut forcer Nextcloud à rescanner les fichiers.
Script php à placer dans le répertoire de Nextcloud