nextcloud / updater

:arrows_counterclockwise: The updater app to keep your Nextcloud up-to-date
GNU Affero General Public License v3.0
45 stars 32 forks source link

Roll back upgrade after downgrading not supported-message #29

Closed tflidd closed 4 months ago

tflidd commented 8 years ago

Background: https://help.nextcloud.com/t/using-updater-app-to-get-nc-10-beta-or-daily/1856

I failed to upgrade to NC daily. After the code was replaced successfully by the updater app, I could start the actual upgrade because it shows: Downgrading is not supported and is likely to cause unpredictable issues (from 9.0.53.0 to 9.0.52.0)

So I want to roll back. It would be nice if the updater-app could roll back the upgrade itself and recover the backup. So I put back the code manually from the backup created by the updater-app. Now I get a Internet server error:

{"reqId":"tjnpRTl1+jirbXKPWkOZ","remoteAddr":"2001:","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AutoloadNotAllowedException\",\"Message\":\"Autoload path not allowed: \\\/var\\\/www\\\/nextcloud\\\/apps\\\/theming\\\/lib\\\/template.php\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/autoloader.php(172): OC\\\\Autoloader->isValidPath('\\\/var\\\/www\\\/nextcl...')\\n#1 [internal function]: OC\\\\Autoloader->load('OCA\\\\\\\\Theming\\\\\\\\Tem...')\\n#2 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/server.php(569): spl_autoload_call('OCA\\\\\\\\Theming\\\\\\\\Tem...')\\n#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OC\\\\Server->OC\\\\{closure}(Object(OC\\\\Server))\\n#4 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(102): Pimple\\\\Container->offsetGet('ThemingDefaults')\\n#5 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/servercontainer.php(87): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('ThemingDefaults')\\n#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/server.php(1227): OC\\\\ServerContainer->query('ThemingDefaults')\\n#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/template.php(79): OC\\\\Server->getThemingDefaults()\\n#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(308): OC_Template->__construct('', 'update.user', 'guest')\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(924): OC::checkMaintenanceMode()\\n#10 \\\/var\\\/www\\\/nextcloud\\\/index.php(39): OC::handleRequest()\\n#11 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/lib\\\/autoloader.php\",\"Line\":152}","level":3,"time":"2016-07-24T09:10:23+00:00","method":"GET","url":"\/nextcloud\/","user":"--"}

I tried the occ-command and it told me that I'm in maintenance mode. So I turned it off and voilà it works again. That's great news, however there are a lot of confusing messages and steps on the way.

Long story short:

  1. Install nextcloud 9.0.53
  2. Enable updater app
  3. Switch to upgrade the daily releases
  4. Error with major upgrade (I suppose the version numbers are not correct->see linked topic)
  5. Restore updater-app-backup manually
  6. get Internal Server error
  7. solve by switching maintenance mode off

System: Debian 8.0/Apache/php 7 (dot-deb)/mariadb config.php:

$CONFIG = array (
  'instanceid' => 'ocx7851qw981',
  'passwordsalt' => 'xx',
  'secret' => 'xx',
  'trusted_domains' =>
  array (
    0 => 'myhost',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'https://myhost/nextcloud',
  'dbtype' => 'mysql',
  'version' => '9.0.53.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_user',
  'dbpassword' => 'xx',
  'logtimezone' => 'UTC',
  'installed' => true,
  'user_backends' =>
  array (
    0 =>
    array (
      'class' => 'OC_User_IMAP',
      'arguments' =>
      array (
        0 => '{imap.example.org:993/imap/ssl}',
      ),
    ),
  ),
  'updater.release.channel' => 'daily',
  'loglevel' => 2,
  'maintenance' => false,
  'updater.server.url' => 'https://updates.nextcloud.org/updater_server/',
  'updater.secret' => 'xx',
);
ghost commented 8 years ago

Yes, the versioning seems like a real mess, updater cannot be used, happened to me exactly the same.

pboesch commented 7 years ago

Exactly the same for me:

$ sudo -u nextcloud php occ upgrade without error.

And now on the webui:

Downgrading is not supported and is likely to cause unpredictable issues (from 9.1.2.2 to 9.1.1.5)

MorrisJobke commented 7 years ago

@pboesch Could you post your updater.log (inside the data directory)? And sorry for the late response I was sadly busy with other stuff :(

sushidave commented 7 years ago

A rollback feature for the core and the apps would be useful indeed. Maybe this convenient WordPress plugin helps as a role model: https://wordpress.org/plugins/wp-rollback.

joshtrichards commented 4 months ago

Duplicate of #9