NCP datadir disappeared

Today my Nextcloud android app game me an error message and when i logged in to webui
This was waiting me.

But all the files seem to still exist as nextcloudPi control panel reports. Please help
image

Ive been running NCP on raspberry for 2 years now. couple of months ago moved to an ssd instalation

It would be useful to see /var/log/ncp.log and lsblk -f, and /var/www/nextcloud/config/config.php

Here you go

  checking for updates...
    [ncp-update-nc]
    Current   Nextcloud version 15.0.6.1
    Available Nextcloud version 15.0.8
    Download Nextcloud 15.0.8...
    Back up current instance...
    check free space...
    Maintenance mode enabled
    backup database...
    backup files...
    pigz: abort: write error on <stdout> (No space left on device)
    tar: /var/www//nextcloud-bkp_20190603_1559539667.tar.gz: Wrote only 4096 of 10240 bytes
    tar: Child returned status 28
    tar: Error is not recoverable: exiting now
    error generating backup
    Maintenance mode disabled
    Error backing up
    Clean up...

    [ nc-limits ]
    Using 728297472B for PHP
    Using 4 PHP threads
    Using 388425318 memory for the database


    [ nc-previews-auto ]
    Nextcloud is not installed - only a limited number of commands are available
    [ nc-update-nc-apps-auto ]
    checking for updates...
    Nextcloud is not installed - only a limited number of commands are available
    [ncp-update-nc]
    Nextcloud data directory not found

    [ nc-autoupdate-nc ]
    automatic Nextcloud updates enabled



    NAME   FSTYPE LABEL  UUID                                 MOUNTPOINT
    sda                                                       
    |-sda1 vfat   boot   9304-D9FD                            /boot
    `-sda2 ext4   rootfs 29075e46-f0d4-44e2-a9e7-55ac02d6e6cc /
    zram0                                                     [SWAP]
    zram1                                                     [SWAP]
    zram2                                                     [SWAP]
    zram3                                                     [SWAP]





    <?php
    $CONFIG = array (
      'instanceid' => 'ocykypx5922v',
    );

Trying to understand the output seems something broke in the backup before the update to 15.0.8
Something about not enough space left but i have almost 30GB free. But why did it lose the datadir because update failed?

And how to fix it :sweat_smile:

What btw happens if I have on my phone app calendar and photos that are newer than my nextcloud backup and then restore my something like 2week old backup (yes I know Im living too dangerously) will my newer photos and calendar fields disappear?

I know at least that much that this is wrong. I’m running pure ssd without other storage like sd card.
I’m trying to find out what is the default data directory. It seems no data has been lost (at least judging from the free space size)

no SD card? Output of lsblk -f and ncp-report and ncp.log?

It says there that you ran out of space

<–! Paste this in GitHub report -->

NextCloudPi diagnostics

NextCloudPi version  v1.13.0
NextCloudPi image    NextCloudPi_01-14-19
distribution         Raspbian GNU/Linux 9 \n \l
automount            yes
USB devices          sda 
datadir               (doesn't exist)
rootfs usage         79G/111G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    15.0.6.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               1day

Nextcloud configuration

Nextcloud is not installed - only a limited number of commands are available

                                                            
  There are no commands defined in the "config" namespace.  
                                                            


HTTPd logs

[Wed Jun 05 06:25:02.517139 2019] [ssl:warn] [pid 862:tid 1995448560] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Jun 05 06:25:03.000750 2019] [mpm_event:notice] [pid 862:tid 1995448560] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2r configured -- resuming normal operations
[Wed Jun 05 06:25:03.000841 2019] [core:notice] [pid 862:tid 1995448560] AH00094: Command line: '/usr/sbin/apache2'

Database logs


Nextcloud logs

tail: cannot open '/nextcloud.log' for reading: No such file or directory

Yes I only have an 120GB SSD connected.

lsblk -f

NAME FSTYPE LABEL UUID MOUNTPOINT
sda
|-sda1 vfat boot 9304-D9FD /boot
`-sda2 ext4 rootfs 29075e46-f0d4-44e2-a9e7-XXXXXXXXXXX /
zram0 [SWAP]
zram1 [SWAP]
zram2 [SWAP]
zram3 [SWAP]

But can I return an older backup? Will my newer calendar appointments disappear from phone where they still are visible when I connect it back to nextcloud?

I found the DB and Data directory’s. Everything seems to be still in tact.
/var/www/nextcloud/data/ncp

/var/lib/mysql/

Could I just in the NCP control webpanel set those paths in NC-Datadir and NC-Database?

don’t know what you did to empty the value of datadir, but you can set datadir in /var/www/nextcloud/config/config.php to /var/www/nextcloud/data (or wherever your datadir is)