NextcloudPi restore from July 2022

Nextcloud version (eg, 20.0.5): Whatever the latest nextcloudpi docker image is
Operating system and version (eg, Ubuntu 20.04): Docker container on Debian 11.5 in a VM on Proxmox
Apache or nginx version (eg, Apache 2.4.25): `Whatever the latest nextcloudpi docker image is
PHP version (eg, 7.4): Whatever the latest nextcloudpi docker has, 8.1.14 I believe.

The issue you are facing:

I’ve been tasked with restoring a nextcloudpi backup image from July 2022. The nextcloudpi instance was running on a Raspberry Pi, and was keeping itself up to date. When the time came to migrate the bullseye release of Raspbian, the upgrade process failed (I forget the exact problem, but it was a common one). I took a full disk image before I made the upgrade attempt. So I did a restore and tried a few tips from the forums from others with the same error message.
Aafter trying 2 or 3 full disk restores with attempted upgrades without success using various tips from the forums, I decided I’d rather do this in a VM and run it in Hyper-V and forego using the Raspberry Pi. This would also made it easier to backup the entire environment, etc. This was July 2022.

Ignored the fact that nextcloud for my buddy wasn’t available until this month.

So I’ve installed Debian 11.6 in a VM on my proxmox cluster (I’ll move it to Hyper-V once I have it working properly). I installed docker and installed the docker container. I then did the ‘initial setup’ of the nextcloud environment and had ncp user passwords and all was going okay.

I then put the nextcloud backup image tar file in the VM and using ncp-config from the command line inside the container I did a restore. All seemed to be fine aside from the odd error:

This version of Nextcloud is not compatible with >PHP 8.0. You are currently running 8.1.14.

All I could do was press a key and see if everything was up and running. Sadly, the container seemed to be stopped. I started it and tried to go see if everything was good to go. Sadly, it wasn’t and I was redirected to the activation page for ncp where I was given a new ncp username and password. At this point it was behaving as though I had just created the docker container and this was a fresh setup. I assumed this was part of the process, so I went ahead and saved the new ncp username and password. However, when I hit the “activate” button all I get is “nextcloudpi not yet initialized, trying again in a few seconds…” and it never goes further. I looked at my VM and there is no disk activity to speak of, so something is obviously wrong. The VM has more than enough RAM, disk space, and CPU power to handle what I’m requesting of it.

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

Steps to replicate it:

If someone can tell me what logs in particular are desired, I can go find them from the CLI.

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

<?php
$CONFIG = array (
  'passwordsalt' => '<redacted>',
  'secret' => '<redacted>',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    11 => '<redacted>',
    1 => '<redacted>',
    20 => '<redacted>',
    21 => '<redacted>',
    3 => 'localhost',
    22 => 'nextcloudpi',
    14 => 'nextcloudpi',
    '' => 'localhost',
  ),
  'datadirectory' => '/media/myCloudDrive/ncdata',
  'dbtype' => 'mysql',
  'version' => '23.0.2.1',
  'overwrite.cli.url' => 'https://localhost/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => '<redacted>',
  'installed' => true,
  'instanceid' => '<redacted>',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '<redacted>',
  ),
  'tempdirectory' => '/media/myCloudDrive/ncdata/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'maintenance' => true,
  'loglevel' => '2',
  'logfile' => '/media/myCloudDrive/ncdata/nextcloud.log',
  'data-fingerprint' => 'dbde0dfdf02a7288247dfff7ee0a7494',
  'log_type' => 'file',
  'theme' => '',
  'trusted_proxies' =>
  array (
    11 => '127.0.0.1',
    12 => '::1',
    13 => 'localhost',
    14 => '127.0.0.1',
  ),
);

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

/var/www is empty. I cannot use the admin acount, so if there are specific logs you’d like, just ask.