Manually add files to OwnCloud / NextCloud
http://bartsimons.me/manually-add-files-to-owncloud/
First, find your data folder
find / -name config.php 2>/dev/null | while read line ; do cat "$line" | grep " 'datadirectory'" ; done
Now cd to the folder
OwnCloud:
cd /var/www/owncloud/data
NextCloud:
cd /mnt/ncdata
Check the folder content
ls -all
Find the users folder (cd again to it) find the files folder (cd again to it) and create a new folder within or move/copy files here
mkdir testfolder
Moving a file/folder (or creating a new folder) into ownCloud's data directory doesn't add it to the database automatically. Now you should use a CLI tool called occ that can manually add missing files and folders to the ownCloud database. So, check where th e utility is located:
find / -name "occ" 2>/dev/null
Change to folder in which occ was discovered:
OwnCloud:
cd /var/www/owncloud
NextCloud:
cd /var/www/nextcloud
…and start occ to scan users folder
sudo -u www-data php occ files:scan --all
this is how the output should look like
root@owncloud:/var/www/owncloud# sudo -u www-data php occ files:scan --all Scanning files for 6 users Starting scan for user 1 out of 6 (admin) Starting scan for user 2 out of 6 (xxxxx1) Starting scan for user 3 out of 6 (yyyyy2) Starting scan for user 4 out of 6 (zzzzz3) Starting scan for user 5 out of 6 (aaaaa4) Starting scan for user 6 out of 6 (bbbbb5) +---------+--------+--------------+ | Folders | Files | Elapsed time | +---------+--------+--------------+ | 24076 | 150551 | 00:03:01 | +---------+--------+--------------+
Now, the folder you have just created will appear in your web client…
