Ncp-restore failing

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 (eg, 20.0.5): 26.0.1
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 11. 5.15.61-v8+ (aarch64)
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing: I upgraded my router and that led to some connection drop for nextcloudPi on my raspberry Pi every hour until it fully stopped connecting. It became completely inaccessible from my computer or phone. At that time, I tried to install a fresh version of nextcloudPi on my SD card as I have my data in a USB SSD drive and the backup in a USB hard drive. I can’t remember how I setup the backup initially but it seems I went for dateless backup with snapshot. At this time, this is what I am trying to do.
Step 1 - Boot up with the fresh install of nextcloudPi - successful
Step 2 - Enable NC Auto mount via web interafce - successful
Step 3 - Enable SSH via web interface - successful
Step 4 - Grab the backup drive path and the tar file location via SSH - successful
Step 5 - Run nc-restore via web interface after pasting the link to the tar file from the backup drive - failing

This Step 5 has failed multiple times with the below error. Grabbed it from /var/log/ncp.lg

[ nc-restore ] (Sat Jun 3 03:46:32 BST 2023)
check free space…
extracting backup file /media/backupdrive/ncp-backups/nextcloud-bkp_20230530_1685430003.tar…
restore files…
Restoring old ‘/var/www/nextcloud/data’ to ‘/var/www/nextcloud/data’…
restore database…
No datadir found in backup
This version of Nextcloud is not compatible with > PHP 8.0.
You are currently running 8.1.18.Cleanup…

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

Steps to replicate it: Already mentioned above

Output of ncp-report
<–! Paste this in GitHub report →

NextcloudPi diagnostics

NextcloudPi version  v1.52.0
NextcloudPi image    NextCloudPi_RaspberryPi_v1.52.0.img
OS                   Debian GNU/Linux 11. 5.15.61-v8+ (aarch64)
automount            yes
USB devices          sda sdb 
datadir              /media/myCloudDrive/ncdata/data
data in SD           no
data filesystem      btrfs
data disk usage      594G/3.7T
rootfs usage         4.6G/29G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
Public IPv4          ***REMOVED SENSITIVE VALUE***
Public IPv6          ***REMOVED SENSITIVE VALUE***
Port 80              open
Port 443             open
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              ***REMOVED SENSITIVE VALUE***
Interface            eth0
Certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               18:22

Nextcloud configuration

This version of Nextcloud is not compatible with > PHP 8.0.<br/>You are currently running 8.1.18.

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 (
  'passwordsalt' => '<blanked>',
  'secret' => '<blanked>',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    22 => 'nextcloudpi',
    11 => '<blanked>',
    1 => '<blanked>',
    3 => 'mynextcloudpi',
    '' => '<blanked>',
    14 => 'mynextcloudpi',
    18 => '<blanked>',
    12 => '<blanked>',
  'datadirectory' => '/media/myCloudDrive/ncdata/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://mynextcloudpi/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => '<blanked>',
  'installed' => true,
  'instanceid' => 'ocpe8kxr2xem',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '<blanked>',
  'tempdirectory' => '/media/myCloudDrive/ncdata/data/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'loglevel' => '2',
  'maintenance' => true,
  'trusted_proxies' => 
  array (
    11 => '',
    12 => '::1',
    13 => 'mynextcloudpi',
    14 => ';; connection timed out; no servers could be reached',
  'logfile' => '/media/myCloudDrive/ncdata/data/nextcloud.log',
  'log_type' => 'file',
  'theme' => '',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'donotreply',
  'mail_domain' => '<blanked>',
  'data-fingerprint' => '<blanked>',

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



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.


Please let me know what I should do to fix this error. Thanks in advance.

1 Like

Team - I am really in need of some help. I have a lot of family pictures in the drive. If there is a way to just point the data in my existing drive to the new install, I think that should work as my data drive is intact. Please give me some pointers.

Just to clarify:

Your old setup was a NCP with NC 23.0.6. You had a backup of the database and configuration of Nextcloud but not the data itself which are on your external drive.

You reinstalled a new NCP on the SD card and tried to restore the NC setup.

Problem the new NCP version has a php version that is not compatible with your “old” setup (NC 23). I’m not familiar with the details of the NCP system (Staying up to date), but there you could try to upgrade Nextcloud (not the NCP system) to NC 24 which should support your php version.

AH01753: access check of ‘localhost’ to /ncp-output.php failed, reason: unable to get the remote host name

Did you set up a hostname, and reset everything correctly on your router that you can reach the device over the network?

What I would do first:

Check on your data dir


That there is still all the data. Make a full backup, save the config backup and your data somewhere outside the system, that you can always go back to the current situation. Fiddleling around with updates in different orders can be a bit tricky and you don’t want to loose any data due to this.

First of all, thank you for responding to my query. Really appreciate it!
You are right, I had an old version of NCP before and now when I did a fresh install, it got me 26.0.x. In order to resolve the PHP version issue, I tried to find an old image with PHP 7.x. Luckily I was able to find it and install it on my SD card. Just finished the restore from the backup drive. I am able to login with my old user id and also able to see all the photos. Thank you again for looking into it and guiding me in the right direction. I assumed this message to be an error - “No datadir found in backup” and I was going in the wrong direction. Thank you again!

1 Like