I can't restore an old owncloud backup

I have to restore an old owncloud installation and I can’t get it to boot.

I have been asked to restore from a backup an old version of owncloud on a new server. The backup corresponds to a version 10.2 but taking advantage of the work, I decided to upgrade everything to the latest version (10.12).

When the error occurred, I tried again to launch versions 10.2, 10.3, 10.11… They all give the same error.

Is there any way to see what “version” the database is in?

Steps to reproduce

  1. Using the official image in docker hub, I launched an occ upgrade from a 10.2 backup
  2. Then, I try to launch 10.2 again but the error is the same
  3. Then, I try to launch 10.3… same
  4. 10.11 … same

Expected behaviour

Upgrade

Actual behaviour

Upgrade fails

Server configuration

Operating system: Ubuntu (Docker)

Web server: Apache

Database: MySQL

PHP version: 7.4.3

ownCloud version: 10.2 => 10.12

Updated from an older ownCloud or fresh install: Upgrade

Where did you install ownCloud from: Docker hub

Signing status (ownCloud 9.0 and above):

The content of config/my.config.php:

$CONFIG["dbtype"] = "mysql";
$CONFIG["dbhost"] = "owncloud-database:3306";
$CONFIG["dbname"] = "owncloud";
$CONFIG["dbuser"] = "owncloud";
$CONFIG["dbpassword"] = "";
$CONFIG["dbtableprefix"] = "oc_";
$CONFIG["passwordsalt"] = "";
$CONFIG["secret"] = "";
$CONFIG["logtimezone"] = "UTC";
$CONFIG["installed"] = true;
$CONFIG["instanceid"] = "";
$CONFIG["loglevel"] = 2;
$CONFIG["maintenance"] = true;

Are you using external storage, if yes which one: local

Are you using encryption: yes

Are you using an external user-backend, if yes which one: No

Logs

Occ upgrade error log

ownCloud or one of the apps require upgrade - only a limited number of commands are available                                                                                                                             
You may use your browser or the occ upgrade command to do the upgrade                                                                                                                                                     
2023-03-20T22:16:29+00:00 Set log level to debug                                                                                                                                                                          
2023-03-20T22:16:29+00:00 Repair step: Upgrade app code from the marketplace                                                                                                                                              
2023-03-20T22:16:31+00:00 Repair info: Enabling market app to assist with update                                                                                                                                          
2023-03-20T22:16:32+00:00 Repair info: Using market to update existing apps                                                                                                                                               
2023-03-20T22:16:32+00:00 Repair info: Attempting to update the following existing compatible apps from market: configreport, dav, encryption, federatedfilesharing, federation, files, files_clipboard, files_external, f
iles_mediaviewer, files_sharing, files_texteditor, files_trashbin, files_versions, firstrunwizard, market, notifications, provisioning_api, systemtags, templateeditor, updatenotification                                
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: configreport                                                                                                                                             
2023-03-20T22:16:32+00:00 Repair info: App (configreport) is not known at the marketplace.                                                                                                                                
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: dav                                                                                                                                                      
2023-03-20T22:16:32+00:00 Repair info: App (dav) is not known at the marketplace.                                                                                                                                         
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: encryption                                                                                                                                               
2023-03-20T22:16:32+00:00 Repair info: App (encryption) is not known at the marketplace.                                                                                                                                  
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: federatedfilesharing                                                                                                                                     
2023-03-20T22:16:32+00:00 Repair info: App (federatedfilesharing) is not known at the marketplace.                                                                                                                        
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: federation                                                                                                                                               
2023-03-20T22:16:32+00:00 Repair info: App (federation) is not known at the marketplace.                                                                                                                                  
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: files                                                                                                                                                    
2023-03-20T22:16:32+00:00 Repair info: App (files) is not known at the marketplace.                                                                                                                                       
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: files_clipboard                                                                                                                                          
2023-03-20T22:16:32+00:00 Repair info:                                                                                                                                                                                    
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: files_external                                                                                                                                           
2023-03-20T22:16:32+00:00 Repair info: App (files_external) is not known at the marketplace.                                                                                                                              
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: files_mediaviewer                                                                                                                                        
2023-03-20T22:16:32+00:00 Repair info:                                                                                                                                                                                    
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: files_sharing                                                                                                                                            
2023-03-20T22:16:32+00:00 Repair info: App (files_sharing) is not known at the marketplace.                                                                                                                               
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: files_texteditor                                                                                                                                         
2023-03-20T22:16:32+00:00 Repair info:                                                                                                                                                                                    
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: files_trashbin                                                                                                                                           
2023-03-20T22:16:32+00:00 Repair info: App (files_trashbin) is not known at the marketplace.                                                                                                                              
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: files_versions                                                                                                                                           
2023-03-20T22:16:32+00:00 Repair info: App (files_versions) is not known at the marketplace.                                                                                                                              
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: firstrunwizard                                                                                                                                           
2023-03-20T22:16:32+00:00 Repair info: App (firstrunwizard) is not known at the marketplace.                                                                                                                              
2023-03-20T22:16:32+00:00 Repair info: Fetching app from market: market                                                                                                                                                   
2023-03-20T22:16:33+00:00 Repair info:                                                                                                                                                                                    
2023-03-20T22:16:33+00:00 Repair info: Fetching app from market: notifications                                                                                                                                            
2023-03-20T22:16:33+00:00 Repair info: App (notifications) is not known at the marketplace.                                                                                                                               
2023-03-20T22:16:33+00:00 Repair info: Fetching app from market: provisioning_api                                                                                                                                         
2023-03-20T22:16:33+00:00 Repair info: App (provisioning_api) is not known at the marketplace.                                                                                                                            
2023-03-20T22:16:33+00:00 Repair info: Fetching app from market: systemtags                                                                                                                                               
2023-03-20T22:16:33+00:00 Repair info: App (systemtags) is not known at the marketplace.                                                                                                                                  
2023-03-20T22:16:33+00:00 Repair info: Fetching app from market: templateeditor                                                                                                                                           
2023-03-20T22:16:33+00:00 Repair info:                                                                                                                                                                                    
2023-03-20T22:16:33+00:00 Repair info: Fetching app from market: updatenotification                                                                                                                                       
2023-03-20T22:16:33+00:00 Repair info: App (updatenotification) is not known at the marketplace.                                                                                                                          
2023-03-20T22:16:33+00:00 Repair info: App was not updated: configreport                                                                                                                                                  
2023-03-20T22:16:33+00:00 Repair info: App was not updated: dav                                                                                                                                                           
2023-03-20T22:16:33+00:00 Repair info: App was not updated: encryption                                                                                                                                                    
2023-03-20T22:16:33+00:00 Repair info: App was not updated: federatedfilesharing                                                                                                                                          
2023-03-20T22:16:33+00:00 Repair info: App was not updated: federation                                                                                                                                                    
2023-03-20T22:16:33+00:00 Repair info: App was not updated: files                                                                                                                                                         
2023-03-20T22:16:33+00:00 Repair info: App was not updated: files_clipboard                                                                                                                                               
2023-03-20T22:16:33+00:00 Repair info: App was not updated: files_external                                                                                                                                                
2023-03-20T22:16:33+00:00 Repair info: App was not updated: files_mediaviewer                                                                                                                                             
2023-03-20T22:16:33+00:00 Repair info: App was not updated: files_sharing                                                                                                                                                 
2023-03-20T22:16:33+00:00 Repair info: App was not updated: files_texteditor                                                                                                                                              
2023-03-20T22:16:33+00:00 Repair info: App was not updated: files_trashbin                                                                                                                                                
2023-03-20T22:16:33+00:00 Repair info: App was not updated: files_versions                                                                                                                                                
2023-03-20T22:16:33+00:00 Repair info: App was not updated: firstrunwizard                                                                                                                                                
2023-03-20T22:16:33+00:00 Repair info: App was not updated: market                                                                                                                                                        
2023-03-20T22:16:33+00:00 Repair info: App was not updated: notifications                                                                                                                                                 
2023-03-20T22:16:33+00:00 Repair info: App was not updated: provisioning_api                                                                                                                                              
2023-03-20T22:16:33+00:00 Repair info: App was not updated: systemtags                                                                                                                                                    
2023-03-20T22:16:33+00:00 Repair info: App was not updated: templateeditor                                                                                                                                                
2023-03-20T22:16:33+00:00 Repair info: App was not updated: updatenotification                                                                                                                                            
2023-03-20T22:16:33+00:00 Exception: Updates between multiple major versions and downgrades are unsupported.                                                                                                              
2023-03-20T22:16:33+00:00 Update failed                                                                                                                                                                                   
2023-03-20T22:16:33+00:00 Maintenance mode is kept active                                                                                                                                                                 
2023-03-20T22:16:33+00:00 Reset log level

Database

oc_migrations table

"app","version"
"activity","20161122085340"
"activity","20161122092159"
"activity","20170131134507"
"activity","20170724182159"
"activity","20181019151118"
"activity","20181022150134"
"core","20170101010100"
"core","20170101215145"
"core","20170111103310"
"core","20170213215145"
"core","20170214112458"
"core","20170221114437"
"core","20170221121536"
"core","20170315173825"
"core","20170320173955"
"core","20170418154659"
"core","20170516100103"
"core","20170526104128"
"core","20170605143658"
"core","20170711191432"
"core","20170804201253"
"core","20170928120000"
"core","20171026130750"
"core","20180123131835"
"core","20180302155233"
"core","20180319102121"
"core","20180607072706"
"core","20181017105216"
"core","20181017120818"
"core","20181113071753"
"core","20181220085457"
"core","20190125162909"
"core","20200610110817"
"core","20210928123126"
"core","20230105001100"
"core","20230120101715"
"core","20230210073645"
"core","20230210103154"
"dav","20170116150538"
"dav","20170116170538"
"dav","20170202213905"
"dav","20170202220512"
"dav","20170427182800"
"dav","20170519091921"
"dav","20170526100342"
"dav","20170711193427"
"dav","20170927201245"
"dav","20180622095921"
"dav","20181115210344"
"dav","20190823065724"
"dav","20200114181454"
"dav","20200427142541"
"dav","20210714123001"
"encryption","20170913113840"
"federatedfilesharing","20170804201125"
"federatedfilesharing","20170804201253"
"federatedfilesharing","20190410160725"
"files_external","20170814051424"
"files_external","20210511082903"
"files_external","20220329110116"
"files_sharing","20170804201125"
"files_sharing","20170804201253"
"files_sharing","20170830112305"
"files_sharing","20171115154900"
"files_sharing","20171215103657"
"files_sharing","20190426123324"
"files_sharing","20200504211654"
"files_sharing","20200823121322"
"files_trashbin","20170804201125"
"files_trashbin","20170804201253"
"notifications","20170801085340"
"notifications","20170801152524"
"notifications","20180119080933"
"notifications","20180604132522"

What do you mean with boot. I don’t think you mean a VM is not booting?
I guess it’s more like the docker container keeps restarting?

Was the backup from a docker installation as well?
The docker installation has a lot of specifics that you would need to adjust in your backup before you could restore it inside the container.

The log shows the current installation having trouble updating a bunch of apps. The update mechanism is trying to fetch these apps from the marketplace, however these core apps should be shipped with the application itself.

So in a normal docker installation they should usually be inside /var/www/owncloud/apps. However a docker installation also has, by default, a second directory set up for other apps: /mnt/data/apps which is linked to from a symlink in /var/www/owncloud/custom.

Perhaps there are old version duplicates in /mnt/data/apps of the apps in question? If yes, you should be able to resolve the issue by removing them.

1 Like

The log shows the current installation having trouble updating a bunch of apps. The update mechanism is trying to fetch these apps from the marketplace, however these core apps should be shipped with the application itself.

So in a normal docker installation they should usually be inside /var/www/owncloud/apps. However a docker installation also has, by default, a second directory set up for other apps: /mnt/data/apps which is linked to from a symlink in /var/www/owncloud/custom.

Perhaps there are old version duplicates in /mnt/data/apps of the apps in question? If yes, you should be able to resolve the issue by removing them.

Thanks, deleting all contents on /mnt/data/apps seems to have solved all the problems.

As a curious fact, I tried to do it first with version 10.2, thinking that no migration had been done at any time, since I always got the error Exception: Updates between multiple major versions and downgrades are unsupported., but this time it informed me that it was not possible to downgrade from version 10.12 to 10.2… that is, the updates were being done despite the error.

I think the error is unclear and leads to confusion. Maybe they should try to improve the error messages in these cases.

2 Likes

I wholeheartedly agree with you, I have had many discussions about this with the devs since years.

1 Like

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