Can I just copy files to data folder?


I’m new to Nextcloud and just set it up on an Ubuntu 18.04 Jetson Nano.

I’ve about 2 TB of data currently stored on an old drive, I want to have available on Nextcloud and would like to know what the best way is to get it there.

Option 1: Connect Nextcloud App on PC and sync those folders.
Option 2: Connect harddrive to Jetson and copy over the files locally.
Option 3: ??

I’d imagine copying the files from HDD to HDD would be faster, as it doesn’t require to send via the WiFi. Can I simply use the cp command to copy the files into the nextcloud/data folder?

Best regards

Really Ubuntu 18.04? I think that is not a good idea. Please install Ubuntu 22.04 LTS.
Nextcloud requirements

Yes you can copy the files directly. But in this case you must Nextcloud inform that there are new files. Use this command to update the Nextcloud database.

sudo -u www-data php /path/to/nextcloud/occ files:scan --all


Thank you for the clear response. That database update command is perfect.

And in regards to the OS: Unfortunately, Nvidia doesn’t maintain the Jetson Nano hardware anymore, so there is no update available or planned. Therefore, I’ll just have to live with the older Ubuntu 18.04.

Not tested. But maybe you can use Armbian 23.02 Bullseye .

Armbian - Wikipedia
DebianBullseye - Debian Wiki

Ran into an issue with the scan: The scan took forever, so I rebooted after it wasn’t showing any progress after 12 hours. Now it seems to have locked the files in some weird way. Rebooting does not unlock it. Not all files got scanned, and the scan cannot be run again.

How can this issue be solved?

sudo -u www-data php /var/www/nextcloud/occ files:scan --all

Starting scan for user 1 out of 1 (myuser)

Exception during scan: “files/67da545166427ea4e928a9f7f375abb2”(“home::myuser::scanner::”) is locked

#0 /var/www/nextcloud/lib/private/Files/Storage/Common.php(762): OC\Lock\DBLockingProvider->acquireLock()

#1 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(610): OC\Files\Storage\Common->acquireLock()

#2 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(610): OC\Files\Storage\Wrapper\Wrapper->acquireLock()

#3 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(335): OC\Files\Storage\Wrapper\Wrapper->acquireLock()

#4 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(256): OC\Files\Cache\Scanner->scan()

#5 /var/www/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan()

#6 /var/www/nextcloud/apps/files/lib/Command/Scan.php(217): OCA\Files\Command\Scan->scanFiles()

#7 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute()

#8 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()

#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()

#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()

#11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()

#12 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()

#13 /var/www/nextcloud/console.php(100): OC\Console\Application->run()

#14 /var/www/nextcloud/occ(11): require_once(‘…’)

#15 {main}

You can scan single user. But i think it does not help.

Maybe you can delete the problem files.

What type of installation do you have? If you use the docker version of Nextcloud, the outer OS is much less of an issue.

It does work now.

Ended up reinstalling Nextcloud and manually updated MariaDB from 10.1 to 10.4 (a supported version)