Issues after backup and restore to new server

Nextcloud version: ‘Nextcloud Hub 3 (25.0.2)’
Operating system and version: ‘Ubuntu 22.04.1 LTS’
Apache or nginx version: ‘Apache/2.4.41 (Ubuntu)’
PHP version: ‘PHP 8.1.2-1ubuntu2.9 (cli)’

Hello, I am seeing issues after backup from ubuntu 20.04 and restore to 22.04.

The glaringly obvious issue, is the page doesn’t load straight away. The page spins for a long period of time before getting to the page of the server in the browser.

I thought this could be to do with background jobs. I have been trying to use the cron jobs setting but it has never worked. It has a backlog of 2 months of jobs to run now. I have watched various videos and read the instructions how to set this up to no success. I have selected ajax for now, and now cant change it back.

I have this output repeatedly happening in my apache error log file…

[Mon Jan 16 01:35:58.934656 2023] [access_compat:error] [pid 8055] [client 107.189.12.72:55792] AH01797: client denied by server configuration: /var/www/nextcloud/config/getuser
[Mon Jan 16 07:18:19.374261 2023] [access_compat:error] [pid 14721] [client 109.151.9.126:52201] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Mon Jan 16 07:19:10.816875 2023] [access_compat:error] [pid 14775] [client 109.151.9.126:52217] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Mon Jan 16 07:25:21.604050 2023] [access_compat:error] [pid 1620] [client 109.151.9.126:52276] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Mon Jan 16 07:31:22.963753 2023] [access_compat:error] [pid 2772] [client 109.151.9.126:52320] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Mon Jan 16 07:49:56.482403 2023] [access_compat:error] [pid 4510] [client 109.151.9.126:52440] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Mon Jan 16 08:19:30.775535 2023] [access_compat:error] [pid 6770] [client 109.151.9.126:52711] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata

These are my permissions on nextcloud dir…

drwxr-xr-x 15 www-data www-data  4096 Jan 15 08:20 .
drwxr-xr-x  4 root     root      4096 Jan 13 18:47 ..
drwxr-xr-x 47 www-data www-data  4096 Dec 29 18:02 3rdparty
drwxr-xr-x 65 www-data www-data  4096 Jan 15 18:31 apps
-rw-r--r--  1 www-data www-data 19327 Dec 29 18:02 AUTHORS
drwxr-xr-x  2 www-data www-data  4096 Jan 13 19:26 config
-rw-r--r--  1 www-data www-data  4095 Dec 29 18:02 console.php
-rw-r--r--  1 www-data www-data 34520 Dec 29 18:02 COPYING
drwxr-xr-x 23 www-data www-data  4096 Dec 29 18:02 core
-rw-r--r--  1 www-data www-data  6317 Dec 29 18:02 cron.php
drwxrwx--- 10 www-data www-data  4096 Dec 29 17:59 data
drwxr-xr-x  2 www-data www-data 12288 Dec 29 18:02 dist
-rw-r--r--  1 www-data www-data  3345 Dec 29 18:05 .htaccess
-rw-r--r--  1 www-data www-data   156 Dec 29 18:02 index.html
-rw-r--r--  1 www-data www-data  3456 Dec 29 18:02 index.php
drwxr-xr-x  6 www-data www-data  4096 Dec 29 18:02 lib
-rw-r--r--  1 www-data www-data   283 Dec 29 18:02 occ
drwxr-xr-x  2 www-data www-data  4096 Dec 29 18:02 ocm-provider
drwxr-xr-x  2 www-data www-data  4096 Dec 29 18:02 ocs
drwxr-xr-x  2 www-data www-data  4096 Dec 29 18:02 ocs-provider
-rw-r--r--  1 www-data www-data  3139 Dec 29 18:02 public.php
-rw-r--r--  1 www-data www-data  5549 Dec 29 18:02 remote.php
drwxr-xr-x  4 www-data www-data  4096 Dec 29 18:02 resources
-rw-r--r--  1 www-data www-data    26 Dec 29 18:02 robots.txt
-rw-r--r--  1 www-data www-data  2452 Dec 29 18:02 status.php
drwxr-xr-x  3 www-data www-data  4096 Dec 29 18:02 themes
drwxr-xr-x  2 www-data www-data  4096 Dec 29 18:03 updater
-rw-r--r--  1 www-data www-data   101 Dec 29 18:02 .user.ini
-rw-r--r--  1 www-data www-data   383 Dec 29 18:02 version.php

let me know what information anyone would need to help with this and i will get it. NC is out of action for me until this can be fixed so huge appreciation to anyone that can help.

I am also unable to access /data folder through cli with sudo permissions?

Thanks

image

Can you run the cronjob directly from command line (with sudo -u www-data)?
Then you should get the errors directly on your screen.

1 Like

Ah useful thank you. I’m not to sure what i have done for the cronjobs, but it appears to be resolved now. :upside_down_face: The command I have is the same i have used before with the --apcu appended at the end. I know thats not in the picture but have tried it before.

Hi, I am completely stuck where to turn for this. The server doesn’t load the webpage for way too long a time, then it will work for a bit clicking through pages and then it will hang for a good 20 seconds and repeat.

I am quite certain this is not a network work issue. Pinging the server works perfectly fine.

Is there any detailed documentation for backing up data/ and restoring only data? I can only achieve this if I restore the whole next cloud directory and it seems to have this issue.

I have the same issue after doing an import and export. It seems to be fine but after 20 seconds it becomes unresponsive and comes back up in 10 to 20 seconds. It is very annoying. Here is what my monitoring software sees:


The red graph upwards is when the website is down.