Nextcloud version : 19.0.8
Operating system and version : Debian 10
Apache or nginx version : 2.4.38
PHP version : 7.4
Hi guys, a while after I installed NC for the first time, I’ve read about keeping your data folder out of the nextcloud directory. Therefore I tried changing it with this guide:
I changed the folder to one named ndata, and updated the config and database, according to the instructions.
Some time after that, I got a warning, that cron jobs cannot be executed because the .ocdata file was missing. I took a look around and found out, that nextcloud created a second data folder in my data folder:
# ls -la /storage/ndata/
insgesamt 9508
drwxrwx--- 16 www-data www-data 4096 Feb 10 21:31 .
drwxr-xr-x 3 root root 4096 Dez 8 16:03 ..
-rw-r--r-- 1 www-data www-data 542 Feb 10 21:43 .htaccess
-rw-r--r-- 1 www-data www-data 0 Feb 10 21:43 .ocdata
drwxr-xr-x 5 www-data www-data 4096 Mai 22 2020 user1
drwxr-xr-x 6 www-data www-data 4096 Apr 26 2020 admin_me !!
drwxr-xr-x 8 www-data www-data 4096 Aug 31 08:59 user2
drwxr-xr-x 8 www-data www-data 4096 Dez 4 11:44 user3
drwxr-xr-x 13 www-data www-data 4096 Jun 19 2020 appdata_xxxxxx
-rw-r----- 1 www-data www-data 8921607 Feb 10 21:43 audit.log
drwx------ 6 root root 4096 Dez 8 16:03 data
drwxr-xr-x 6 www-data www-data 4096 Apr 26 2020 user3
drwxr-xr-x 3 www-data www-data 4096 Mär 25 2020 files_encryption
drwxr-xr-x 2 www-data www-data 4096 Feb 10 21:43 files_external
-rw-r--r-- 1 www-data www-data 0 Feb 10 21:43 index.html
drwxr-xr-x 7 www-data www-data 4096 Aug 21 09:36 user4
drwxr-xr-x 7 www-data www-data 4096 Nov 6 14:41 user5
-rw-r----- 1 www-data www-data 658507 Feb 10 2021 nextcloud.log
drwxr-xr-x 8 www-data www-data 4096 Okt 8 16:42 user_me !!
drwxr-xr-x 3 www-data www-data 4096 Jun 16 2020 rainloop-storage
drwxr-xr-x 4 www-data www-data 4096 Feb 10 21:43 updater-xxxxxxxx
-rw-r--r-- 1 www-data www-data 29818 Feb 10 21:43 updater.log
# ls -la /storage/ndata/data/
insgesamt 28
drwx------ 6 root root 4096 Dez 8 16:03 .
drwxrwx--- 16 www-data www-data 4096 Feb 10 21:31 ..
-rw-r--r-- 1 www-data www-data 542 Jul 18 2020 .htaccess
-rw-r--r-- 1 www-data www-data 0 Jul 18 2020 .ocdata
drwxr-xr-x 6 www-data www-data 4096 Apr 26 2020 admin_me !!
drwxr-xr-x 13 www-data www-data 4096 Jun 19 2020 appdata_xxxxxxxx
drwxr-xr-x 2 www-data www-data 4096 Jul 18 2020 files_external
-rw-r--r-- 1 www-data www-data 0 Jul 18 2020 index.html
drwx------ 4 root root 4096 Okt 8 16:10 user_me !!
Me and the admin user (also me) are the only ones in this “sub”-data directory.
I’ve transferred everything to another server to try to fix it. However when I used rsync -Aavx to merge the contents, and tried to make the data directory change as above, I ended up with a lot of unaccesible files (my guess is something with server side encryption?).
How would I go from here, to bring it back together?
My config.php file:
# cat config/config.php
<?php
$CONFIG = array (
'instanceid' => 'xxxxxxxxxxxxxxxxx',
'passwordsalt' => 'xxxxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'xxxxxxxx',
),
'datadirectory' => '/storage/ndata',
'dbtype' => 'mysql',
'version' => '19.0.8.1',
'overwrite.cli.url' => 'https://xxxxxxxx',
'dbname' => 'user',
'dbhost' => 'xxxxxxxxxxxx',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'xxxxxxxxxxxx',
'dbpassword' => 'xxxxxxxxxxxx',
'installed' => true,
'maintenance' => false,
'theme' => '',
'log_type' => 'file',
'logfile' => '/var/log/nextcloud.log',
'logfilemode' => 416,
'logdateformat' => 'F d, Y H:i:s',
'loglevel' => '2',
'debug' => false,
'memcache.local' => '\\OC\\Memcache\\APCu',
'updater.secret' => 'xxxxxxxxxxxxxxxxx',
);
Thanks it advance. Please let me know if something is missing.