Error when trying to move data-dir to USB (ncp)

I’m having issues moving my data directory to USB drive. I followed the instructions (
I formatted the USB in webui via nc-format-USB (with default label “myCloudDrive”) and enabled nc-automount.
Then, at nc-datadir, I wrote “/media” as the new data dir path.
After approximately 2h, I get the following error message.
After rebooting the RaspberryPi, I get “Unauthorized request. Try reloading the page” errors everywhere in the webui, e.g. when trying to update via nc-update.
I’m able to get back to a working system by restoring the whole SD card.
Any help is very appreciated :slight_smile:

[ nc-datadir ]
Nextcloud is in maintenance mode - no apps have been loaded

INFO: /media is not empty. Creating backup /media-02-16-19
Maintenance mode already enabled
moving data dir from /var/www/nextcloud/data to /media…
An unhandled exception has been thrown:
RedisException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. in /var/www/nextcloud/lib/private/Memcache/Redis.php:64
Stack trace:
#0 /var/www/nextcloud/lib/private/Memcache/Redis.php(64): Redis->setex(‘f57571b138e110b…’, 60, ‘["\/var\/www\/n…’)
#1 /var/www/nextcloud/lib/autoloader.php(168): OC\Memcache\Redis->set(‘OC_User’, Array, 60)
#2 [internal function]: OC\Autoloader->load(‘OC_User’)
#3 /var/www/nextcloud/lib/private/User/Session.php(223): spl_autoload_call(‘OC_User’)
#4 /var/www/nextcloud/lib/private/L10N/Factory.php(168): OC\User\Session->getUser()
#5 /var/www/nextcloud/lib/private/L10N/Factory.php(127): OC\L10N\Factory->findLanguage(‘lib’)
#6 /var/www/nextcloud/lib/private/Server.php(1499): OC\L10N\Factory->get(‘lib’, NULL)
#7 /var/www/nextcloud/lib/base.php(234): OC\Server->getL10N(‘lib’)
#8 /var/www/nextcloud/lib/base.php(659): OC::checkConfig()
#9 /var/www/nextcloud/lib/base.php(1068): OC::init()
#10 /var/www/nextcloud/console.php(46): require_once(’/var/www/nextcl…’)
#11 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)
#12 {main}
sed: can’t read /etc/fail2ban/jail.local: No such file or directory

/media is the path the usbdrive appears in, but u can not use that path, its only a mountpoint. You should use something like /media/myCloudDrive/ncdata as a path to move your data to.

1 Like

thank you for the quick answer. I will give it a try soon and mark your answer as the solution when it works.