Trying to upgrade my nextcloud instance from 15.0.05 to latest versions, I face an issue with the upgrade to 16.0.08.
[/details]
Nextcloud version (eg, 12.0.2): internal version 15.0.5.3
Operating system and version (eg, Ubuntu 17.04): Debian 8.11, kernel version 4.14.154
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 7.1): 7.2
Sqlite3
The issue you are facing:
Trying to upgrade my nextcloud instance from 15.0.05 to latest versions, I face an issue with the upgrade to 16.0.08 related to sqlite db. I get the message :
Mise à jour vers 16.0.8
Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing ‘INSERT INTO oc_activity (activity_id, timestamp, priority, type, user, affecteduser, app, subject, subjectparams, message, messageparams, file, link, object_type, object_id) SELECT activity_id, timestamp, priority, type, user, affecteduser, app, subject, subjectparams, message, messageparams, file, link, object_type, object_id FROM __temp__oc_activity’: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: oc_activity.activity_id
Journaux détaillés
Préparation de la mise à jour
Réglage du niveau de journalisation à “déboguage”
Mode de maintenance activé
Étape de réparation : Repair MySQL collation
Informations de réparation : Not a mysql database -> nothing to do
Étape de réparation : Repair SQLite autoincrement
Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing ‘INSERT INTO oc_activity (activity_id, timestamp, priority, type, user, affecteduser, app, subject, subjectparams, message, messageparams, file, link, object_type, object_id) SELECT activity_id, timestamp, priority, type, user, affecteduser, app, subject, subjectparams, message, messageparams, file, link, object_type, object_id FROM __temp__oc_activity’: SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: oc_activity.activity_id
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- relaunch the upgrade using the web interface. As the server is hosted remotely, I cannot run updater.phar.
I did try to fix db issues by running php -f occ maintenance:repair and i got :
- Repair MySQL collation
- Not a mysql database -> nothing to do
- Repair mime types
- Clean tags and favorites
- 0 tags of deleted users have been removed.
- 0 tags for delete files have been removed.
- 0 tag entries for deleted tags have been removed.
- 0 tags with no entries have been removed.
- Repair invalid shares
- Remove shares of a users root folder
- Move .step file of updater to backup location
- Fix potential broken mount points
- No mounts updated
- Repair invalid paths in file cache
- Add log rotate job
- Clear frontend caches
- Image cache cleared
- SCSS cache cleared
- JS cache cleared
- Clear every generated avatar on major updates
- Add preview background cleanup job
- Queue a one-time job to cleanup old backups of the updater
- Repair pending cron jobs
- No need to repair pending cron jobs.
- Extract the vcard uid and store it in the db
- Cleanup invalid photocache files for carddav
- Add background job to cleanup login flow v2 tokens
- Remove potentially over exposing share links
- No need to remove link shares.
- Clear access cache of projects
In AbstractSQLiteDriver.php line 63:
An exception occurred while executing ‘DELETE FROM “oc_collres_accesscache” WHERE “collection_id” <> ?’ with params [0]:
SQLSTATE[HY000]: General error: 1 no such table: oc_collres_accesscache
In PDOConnection.php line 82:
SQLSTATE[HY000]: General error: 1 no such table: oc_collres_accesscache
In PDOConnection.php line 80:
SQLSTATE[HY000]: General error: 1 no such table: oc_collres_accesscache
maintenance:repair [–include-expensive]
I have a v15.0.5 rsync backup.
How should I proceed
1 - fixing sqlite db issues (I am not proficient)
2 - restoring v15.0.05 and restart the upgrade
3 - installing a brand new v18 and importing the necessary files from v15.0.05
The output of your Nextcloud log in Admin > Logging:
PASTE HERE
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'AAAAAA',
'passwordsalt' => 'ZZZZ',
'trusted_domains' =>
array (
0 => 'www.YYYYYYY',
),
'datadirectory' => 'XXXXXX/data',
'dbtype' => 'sqlite3',
'version' => '15.0.5.3',
'overwrite.cli.url' => 'YYYYYY',
'installed' => true,
'maintenance' => false,
'mail_from_address' => 'webmaster',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'YYYYY.org',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'updater.secret' => 'XXXXXXXXX,
'theme' => '',
'loglevel' => 2,
);
The output of your Apache/nginx/system log in /var/log/____
:
PASTE HERE