Users and data directory is empty after updating nextcloud using command line updater

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com 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:

example

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

longer
example
here

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, 23): 23
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache2 2.4
PHP version (eg, 7.4): 7.4

The issue you are facing:
I have nextcloud server which has more than 50 users and I wanted to make it a master and backup servers on nextcloud using [How to create real-time backup for Nextcloud - YouTube] (How to create real-time backup for Nextcloud - YouTube) this youtube video which creating replication for the databases and installing third party apps like keepalive and Glusterfs which is I never used before. the server I wanted to make it as master has already more than 50 users and their data. after I did this when install nextcloud 24 successfully and go to the browser nextcloud says update nextcloud using either web updater which my own risk if I did it or use nextcloud updater in the command line which is stable version it does not tells I might lose any data because of that I’ve decided to update it using command line updater and I followed nextcloud docs when I was doing it. when it finished I go back to the browser the error remains the same and I did it again and error fix it when loged in to the dashboard users and fine but the data of the users upload by the time of their were using the app are gone. when I go data directory in nextcloud I found that 4 users and there and their data are fine.

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

The output of your Nextcloud log in Admin > Logging:

{"reqId":"GOuWP0I3OOGJFvAfpPUO","level":0,"time":"2023-05-09T08:51:15+00:00","remoteAddr":"176.16.20.1","user":"amal","app":"workflowengine","method":"PROPFIND","url":"/remote.php/dav/files/amal/2022/08.2022/Codsi%20Baasaboor%20%20Shaqaale%20Dowladeed.docx","message":"No flow configurations is going to run Block access to a file","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36","version":"24.0.12.1","data":{"level":"0","app":"workflowengine"}}
{"reqId":"GOuWP0I3OOGJFvAfpPUO","level":0,"time":"2023-05-09T08:51:16+00:00","remoteAddr":"176.16.20.1","user":"amal","app":"workflowengine","method":"PROPFIND","url":"/remote.php/dav/files/amal/2022/08.2022/Codsi%20Baasaboor%20%20Shaqaale%20Dowladeed.docx","message":"Flow activation: rules were requested for operation Block access to a file","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36","version":"24.0.12.1","data":{"level":"0","app":"workflowengine"}}
{"reqId":"GOuWP0I3OOGJFvAfpPUO","level":0,"time":"2023-05-09T08:51:16+00:00","remoteAddr":"176.16.20.1","user":"amal","app":"workflowengine","method":"PROPFIND","url":"/remote.php/dav/files/amal/2022/08.2022/Codsi%20Baasaboor%20%20Shaqaale%20Dowladeed.docx","message":"No flow configurations is going to run Block access to a file","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36","version":"24.0.12.1","data":{"level":"0","app":"workflowengine"}}
{"reqId":"HiFPVlTz5TvvktYYxqpE","level":1,"time":"2023-05-09T08:51:17+00:00","remoteAddr":"176.16.20.1","user":"amal","app":"richdocuments","method":"GET","url":"/index.php/apps/files/ajax/getstoragestats?dir=%2F2022%2F08.2022","message":"Fetched capabilities endpoint from http://176.16.20.20/apps/richdocumentscode/proxy.php?req=/hosting/capabilities in 0.017 seconds","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36","version":"24.0.12.1","data":{"app":"richdocuments"}}
{"reqId":"HiFPVlTz5TvvktYYxqpE","level":0,"time":"2023-05-09T08:51:17+00:00","remoteAddr":"176.16.20.1","user":"amal","app":"workflowengine","method":"GET","url":"/index.php/apps/files/ajax/getstoragestats?dir=%2F2022%2F08.2022","message":"Flow activation: rules were requested for operation Block access to a file","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36","version":"24.0.12.1","data":{"level":"0","app":"workflowengine"}}
{"reqId":"HiFPVlTz5TvvktYYxqpE","level":0,"time":"2023-05-09T08:51:17+00:00","remoteAddr":"176.16.20.1","user":"amal","app":"workflowengine","method":"GET","url":"/index.php/apps/files/ajax/getstoragestats?dir=%2F2022%2F08.2022","message":"No flow configurations is going to run Block access to a file","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36","version":"24.0.12.1","data":{"level":"0","app":"workflowengine"}}
{"reqId":"IRmIYSsoPflPLmA9HdPM","level":1,"time":"2023-05-09T08:51:20+00:00","remoteAddr":"176.16.20.1","user":"admin","app":"richdocuments","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Fetched capabilities endpoint from http://176.16.20.20/apps/richdocumentscode/proxy.php?req=/hosting/capabilities in 0.045 seconds","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0","version":"24.0.12.1","data":{"app":"richdocuments"}}
{"reqId":"IRmIYSsoPflPLmA9HdPM","level":1,"time":"2023-05-09T08:51:20+00:00","remoteAddr":"176.16.20.1","user":"admin","app":"richdocuments","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Fetched capabilities endpoint from http://176.16.20.27/apps/richdocumentscode/proxy.php?req=/hosting/capabilities in 0.004 seconds","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0","version":"24.0.12.1","data":{"app":"richdocuments"}}
{"reqId":"NK31DoUynWZ8OAhVrgVy","level":1,"time":"2023-05-09T08:51:30+00:00","remoteAddr":"176.16.20.53","user":"Dr.mohamed","app":"richdocuments","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Fetched capabilities endpoint from http://176.16.20.27/apps/richdocumentscode/proxy.php?req=/hosting/capabilities in 0.039 seconds","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36","version":"24.0.12.1","data":{"app":"richdocuments"}}
{"reqId":"NK31DoUynWZ8OAhVrgVy","level":1,"time":"2023-05-09T08:51:30+00:00","remoteAddr":"176.16.20.53","user":"Dr.mohamed","app":"richdocuments","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Fetched capabilities endpoint from http://176.16.20.20/apps/richdocumentscode/proxy.php?req=/hosting/capabilities in 0.004 seconds","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36","version":"24.0.12.1","data":{"app":"richdocuments"}}```

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

GNU nano 4.8 config.php /var/www/nextcloud/data/nextcloud.log<?php
$CONFIG = array (
‘instanceid’ => ‘ocr2xw5w65xl’,
‘passwordsalt’ => ‘IEfJhwAID2sJmkUo924qzCuUX7mjPc’,
‘secret’ => ‘WsvCUYh8/NUrvTt+0sZHX5sHLdFCVHyLs6MysVe1UZ9P6Tm4’,
‘trusted_domains’ =>
array (
0 => ‘192.168.1.X’,
1 => ‘FQDN’,
),
‘datadirectory’ => ‘/var/www/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘24.0.4.1’,
‘overwrite.cli.url’ => ‘xxxxxx’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘snu’,
‘dbpassword’ => ‘xxxx’,
‘installed’ => true,
‘app_install_overwrite’ =>
array (
0 => ‘hancomoffice’,
1 => ‘documentserver_community’,
),
‘maintenance’ => false,
‘onlyoffice’=>array(
‘verify_peer_off’=>true
)
);


The output of your Apache system log in `/var/log/apache2/nextcloud.error`:

[Mon May 08 15:23:36.514530 2023] [php7:notice] [pid 24377] [client 176.16.20.27:41576] richdocumentscode (proxy.php) error exit, PID: 24377, Message: No >[Mon May 08 15:34:44.906602 2023] [php7:notice] [pid 26229] [client 176.16.20.27:39930] richdocumentscode (proxy.php) error exit, PID: 26229, Message: No >[Mon May 08 15:34:45.114578 2023] [php7:notice] [pid 20033] [client 176.16.20.27:39962] richdocumentscode (proxy.php) error exit, PID: 20033, Message: No >[Mon May 08 15:34:46.370568 2023] [php7:notice] [pid 28349] [client 176.16.20.27:40020] richdocumentscode (proxy.php) error exit, PID: 28349, Message: No >[Mon May 08 15:34:46.374501 2023] [php7:notice] [pid 28338] [client 176.16.20.27:40022] richdocumentscode (proxy.php) error exit, PID: 28338, Message: No >[Mon May 08 15:34:46.750587 2023] [php7:notice] [pid 28346] [client 176.16.20.27:40030] richdocumentscode (proxy.php) error exit, PID: 28346, Message: No >[Mon May 08 15:34:46.874523 2023] [php7:notice] [pid 28348] [client 176.16.20.27:40042] richdocumentscode (proxy.php) error exit, PID: 28348, Message: No >[Mon May 08 15:35:11.776135 2023] [php7:notice] [pid 24764] [client 176.16.20.27:56300] richdocumentscode (proxy.php) error exit, PID: 24764, Message: No >[Mon May 08 15:35:12.098542 2023] [php7:notice] [pid 28672] [client 176.16.20.27:56328] richdocumentscode (proxy.php) error exit, PID: 28672, Message: No >[Mon May 08 15:35:12.226575 2023] [php7:notice] [pid 28673] [client 176.16.20.27:56330] richdocumentscode (proxy.php) error exit, PID: 28673, Message: No >[Mon May 08 15:35:12.270533 2023] [php7:notice] [pid 28671] [client 176.16.20.27:56334] richdocumentscode (proxy.php) error exit, PID: 28671, Message: No >[Mon May 08 15:58:46.127752 2023] [php7:warn] [pid 37108] [client 176.16.20.27:53588] PHP Warning: POST Content-Length of 12706424 bytes exceeds the limi>[Mon May 08 15:59:07.226979 2023] [php7:warn] [pid 37093] [client 176.16.20.27:36996] PHP Warning: POST Content-Length of 12706424 bytes exceeds the limi>[Mon May 08 17:20:28.408572 2023] [php7:notice] [pid 11210] [client 176.16.20.27:56436] richdocumentscode (proxy.php) error exit, PID: 11210, Message: No >[Tue May 09 10:25:28.820563 2023] [php7:notice] [pid 25185] [client 176.16.20.20:58124] richdocumentscode (proxy.php) error exit, PID: 25185, Message: No >[Tue May 09 10:25:28.824557 2023] [php7:notice] [pid 25184] [client 176.16.20.20:58128] richdocumentscode (proxy.php) error exit, PID: 25184, Message: No >[Tue May 09 10:25:28.824567 2023] [php7:notice] [pid 25182] [client 176.16.20.20:58136] richdocumentscode (proxy.php) error exit, PID: 25182, Message: No >[Tue May 09 10:25:28.824845 2023] [php7:notice] [pid 25262] [client 176.16.20.20:58112] richdocumentscode (proxy.php) error exit, PID: 25262, Message: No >[Tue May 09 10:25:28.904576 2023] [php7:notice] [pid 32061] [client 176.16.20.20:58142] richdocumentscode (proxy.php) error exit, PID: 32061, Message: No >[Tue May 09 10:25:29.204617 2023] [php7:notice] [pid 32065] [client 176.16.20.20:58154] richdocumentscode (proxy.php) error exit, PID: 32065, Message: No >[Tue May 09 10:25:55.640591 2023] [php7:notice] [pid 32070] [client 176.16.20.20:53976] richdocumentscode (proxy.php) error exit, PID: 32070, Message: No >[Tue May 09 10:26:02.908574 2023] [php7:notice] [pid 32067] [client 176.16.20.20:54166] richdocumentscode (proxy.php) error exit, PID: 32067, Message: No >[Tue May 09 10:26:02.984593 2023] [php7:notice] [pid 32068] [client 176.16.20.20:54176] richdocumentscode (proxy.php) error exit, PID: 32068, Message: No >[Tue May 09 10:26:23.776579 2023] [php7:notice] [pid 32071] [client 176.16.20.20:53096] richdocumentscode (proxy.php) error exit, PID: 32071, Message: No >[Tue May 09 10:26:23.776949 2023] [php7:notice] [pid 32088] [client 176.16.20.20:53104] richdocumentscode (proxy.php) error exit, PID: 32088, Message: No >[Tue May 09 10:26:24.341061 2023] [php7:notice] [pid 32078] [client 176.16.20.20:53114] richdocumentscode (proxy.php) error exit, PID: 32078, Message: No >[Tue May 09 10:26:24.384594 2023] [php7:notice] [pid 32079] [client 176.16.20.20:53128] richdocumentscode (proxy.php) error exit, PID: 32079, Message: No >[Tue May 09 10:26:29.856581 2023] [php7:notice] [pid 32063] [client 176.16.20.20:46716] richdocumentscode (proxy.php) error exit, PID: 32063, Message: No >[Tue May 09 10:26:41.036594 2023] [php7:notice] [pid 32080] [client 176.16.20.20:47666] richdocumentscode (proxy.php) error exit, PID: 32080, Message: No >[Tue May 09 10:26:50.328648 2023] [php7:notice] [pid 32061] [client 176.16.20.20:37174] richdocumentscode (proxy.php) error exit, PID: 32061, Message: No >[Tue May 09 10:26:50.401902 2023] [php7:notice] [pid 25183] [client 176.16.20.20:37188] richdocumentscode (proxy.php) error exit, PID: 25183, Message: No >[Tue May 09 10:26:50.460668 2023] [php7:notice] [pid 25185] [client 176.16.20.20:37200] richdocumentscode (proxy.php) error exit, PID: 25185, Message: No >[Tue May 09 10:26:50.888597 2023] [php7:notice] [pid 25182] [client 176.16.20.20:37220] richdocumentscode (proxy.php) error exit, PID: 25182, Message: No >[Tue May 09 10:26:57.068554 2023] [php7:notice] [pid 32057] [client 176.16.20.20:33658] richdocumentscode (proxy.php) error exit, PID: 32057, Message: No >[Tue May 09 10:27:11.280578 2023] [php7:notice] [pid 25184] [client 176.16.20.20:45206] richdocumentscode (proxy.php) error exit, PID: 25184, Message: No >[Tue May 09 10:27:58.929986 2023] [php7:warn] [pid 32146] [client 176.16.20.27:44676] PHP Warning: POST Content-Length of 12706424 bytes exceeds the limi>[Tue May 09 10:28:40.424609 2023] [php7:notice] [pid 25183] [client 176.16.20.20:51642] richdocumentscode (proxy.php) error exit, PID: 25183, Message: No >[Tue May 09 10:28:40.568637 2023] [php7:notice] [pid 25182] [client 176.16.20.20:51650] richdocumentscode (proxy.php) error exit, PID: 25182, Message: No >[Tue May 09 10:28:40.572597 2023] [php7:notice] [pid 32057] [client 176.16.20.20:51662] richdocumentscode (proxy.php) error exit, PID: 32057, Message: No >[Tue May 09 10:28:40.744640 2023] [php7:notice] [pid 32071] [client 176.16.20.20:51666] richdocumentscode (proxy.php) error exit, PID: 32071, Message: No >[Tue May 09 10:28:41.072592 2023] [php7:notice] [pid 32130] [client 176.16.20.20:51676] richdocumentscode (proxy.php) error exit, PID: 32130, Message: No >[Tue May 09 11:28:23.294100 2023] [access_compat:error] [pid 32884] [client 176.16.20.1:58250] AH01797: client denied by server configuration: /var/www/ne>[Tue May 09 11:29:49.943717 2023] [access_compat:error] [pid 32948] [client 176.16.20.1:58370] AH01797: client denied by server configuration: /var/www/ne>[Tue May 09 11:30:18.838305 2023] [access_compat:error] [pid 32832] [client 176.16.20.1:58409] AH01797: client denied by server configuration: /var/www/ne>

Sorry i am not an expert with master/backup and Glusterfs. Use this information on your own risk.

You wrote:

Only for 4 users or can you check all users? There is an occ-function to re-read the file structure back in your database e.g. to MariaDB. Do you have a backup? Use it on your own risk. Also you can use it for only one user.

occ files:scan