I’ve since re-installed NextcloudPI and setup the data directory to the correct location. Everything seems to be working fine, I can create users etc. But when I try to restore my data using BTRFS I now get the following in the console window:
[ nc-restore-snapshot ] (Wed May 12 11:40:35 EDT 2021)
Create a readonly snapshot of ‘/media/myCloudDrive/ncdata’ in ‘/media/myCloudDrive/ncdata/…/ncp-snapshots/autobackup_2021-05-12_114037’
snapshot autobackup_2021-05-12_114037 generated
Maintenance mode enabled
Delete subvolume (no-commit): ‘/media/myCloudDrive/ncdata’
ERROR: cannot snapshot ‘/media/MyBackupDrive/ncp-snapshots/daily_2021-04-30_141706’: Invalid cross-device link
Create a snapshot of ‘/media/MyBackupDrive/ncp-snapshots/daily_2021-04-30_141706’ in ‘/media/myCloudDrive/ncdata’
{“reqId”:“WYDPLQqfSQeJo3dMCIzZ”,“level”:2,“time”:“2021-05-12T15:40:39+00:00”,“remoteAddr”:"",“user”:"–",“app”:“no app in context”,“method”:"",“url”:"–",“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:"–",“version”:“20.0.8.1”}
Your data directory is invalid
Ensure there is a file called “.ocdata” in the root of the data directory.
Cannot create “data” directory
This can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/20/go.php?to=admin-dir_permissions
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:168
Stack trace:
#0 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)
#2 {main}
{“reqId”:“2SvUbaryfLhZSwAwAklh”,“level”:2,“time”:“2021-05-12T15:40:39+00:00”,“remoteAddr”:"",“user”:"–",“app”:“no app in context”,“method”:"",“url”:"–",“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:"–",“version”:“20.0.8.1”}
Nextcloud is in maintenance mode - no apps have been loaded
Your data directory is invalid
Ensure there is a file called “.ocdata” in the root of the data directory.
Cannot create “data” directory
This can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/20/go.php?to=admin-dir_permissions
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:168
Stack trace:
#0 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)
#2 {main}snapshot /media/MyBackupDrive/ncp-snapshots/daily_2021-04-30_141706 restored
I have no idea what this all means.