Solution for ownCloud “Downgrading not supported” error

Seems like the rsync method has been obsolete. So I rewrote them according to the Manual upgrade document. The new method may be more compatible… Hopefully.

Error overview

This error usually happens when you are updating ownCloud via command lines(e.g. apt- get command). Sometimes happens even updating with the built-in web updater. The ownCloud web page just show a single notification saying “Downgrading is not supported and is likely to cause unpredictable issues” and there’re no buttons to click.

Cause(just guesses) 

This error occurs due to a mismatch of ownCloud version in the config.php. I noticed that the Source maintains a relatively older oC version, which, in my case, directly lead to the “Downgrading not supported” error.

Solutions

Acknowledged that this error is actually a version mismatch, it’ll be easier to deal with. However, if you have already “updated” ownCloud to a different version, directly editing the config.php won’t help. In my case, I downloaded the latest oC from the Website and synced them to the current oC directory. This will not harm the files uploaded, however, I strongly recommend a backup of your directory or the entire server.

  • Download & unzip the latest oC manually

You don’t have to perform the action in your oC directory. Well, to be honest, you can’t do that.

Download the latest version of oC from the official ownCloud website and extract it with unzip command. The unzip process takes about 10 sec depending on the server performance.

  • Replace the files

Here we’ll do it in the old-fashioned way. Just rename the /owncloud directory in /var/www to any other name you want like owncloud-old. DO NOT DELETE IT UNLESS YOU WANT A FRESH OWNCLOUD SERVER.

Then, we just move the new ownCloud folder we’ve extracted to /var/www. A simplecp command is just enough. Then, go to your old ownCloud folder (hopefully you haven’t deleted it yet), and copy the whole /data directory to the new ownCloud dir.

  • Upgrade ownCloud

Since I’m unable to upgrade from the occfile since… I assume there is something buggy? My command is no different from that in the documentation. Anyway I would perform a dirty hack here . Don’t worry, your previous data are still accessble… Unless you have previously toggled encryption on. THIS OPERATION WILL CAUSE YOU TO LOSE ACCESS TO YOUR ENCRYPTED DATA.

First we’ll drop the database which is in use by owncloud; I don’t know which database you are using, so I cannot give specified commands. Then, create a new database. I have to do this because I cannot register with the same name as Admin, which in the next step it would be requied for.

Then, simply preform a sudo apt-get update && sudo apt-get autoremove owncloud && sudo apt-get install owncloud. This would perform a (relatively) clean install, and you can now access your domain/owncloud page to set it up. Again, ALL ENCRYPTED DATA WOULD BE INACCESSIBLE. I wonder if restorring previous database backup would be useful…?

Anyway, now you have regained access to your Owncloud server. That’s … still great.

*English is not my first language. If you find anything that can caused misunderstanding, please comment and point out. Thanks!

发表评论

有什么想法说出来听听?

This site uses Akismet to reduce spam. Learn how your comment data is processed.