How to migrate nextcloud v22 to v23 new install after failed upgrade (TrueNAS Core)

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (22.2.3):
Operating system and version (eg, Ubuntu 20.04): FreeBSD v12.3 (TrueNAS Core)
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing:
I run nextcloud as a plugin in a jail on a TrueNAS Core machine. As I’m quite a novice at this I just blindly followed update prompts as they were presented to me. So I pressed the update button on the web gui and the upgrade failed almost immediately with the error that you can’t jump between major upgrades and from that time I could not get into my Nextcloud install via the webgui.

I then followed some advice that said I should delete all the files and folders bar config & data, then extract a copy of 22.2.3 in the installation folder then run a manual upgrade … and here is where everything broke…

Ideally I would like to fix this but I do not know how to run the manual upgrade from the cli.

So I created a fresh install with version 23.0.0 and now I would like to migrate/import my old installation to the new one

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it: N/A

The output of your Nextcloud log in Admin > Logging:

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    1 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => true,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'passwordsalt' => 'ARdPZbEWOmGcgB1reJB4V3kB0hJaNA',
  'secret' => 'Nk4hsM3gw3hxN3OxtNVtrPkVJ58OYGo/qpjhgVV55mBCLd+m',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
    2 => '',
  'datadirectory' => '/usr/local/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_ncadmin',
  'dbpassword' => 'xx',
  'installed' => true,
  'instanceid' => 'ocjpjfwurzu6',
  'mail_from_address' => 'xx',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'xx',
  'mail_smtphost' => 'xx',
  'mail_smtpport' => '25',
  'maintenance' => false,
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xx',
  'mail_smtppassword' => 'xx',
  'updater.secret' => '$xx',

The output of your Apache/nginx/system log in /var/log/____:

Jun 10 21:13:27 truenas nginx: 2021/06/10 21:13:27 [error] 1102#100212: accept4() failed (53: Software caused connection abort)
2021/06/24 14:12:50 [error] 1177#100366: send() failed (54: Connection reset by peer)
2021/06/25 17:57:31 [error] 1184#100209: send() failed (54: Connection reset by peer)
2021/09/04 22:13:43 [error] 1177#100260: send() failed (54: Connection reset by peer)
2021/09/18 11:53:42 [error] 1188#100329: send() failed (54: Connection reset by peer)
2022/01/04 10:21:59 [error] 1177#100902: send() failed (54: Connection reset by peer)
Jan  4 11:07:43 truenas nginx: 2022/01/04 11:07:43 [error] 1188#100217: accept4() failed (53: Software caused connection abort)