Setting up external hard drive on a Raspberry Pi for ownCloud storage



As a newcomer to Raspberry Pi and distributed systems, I found a tutorial on using ownCloud as a remote storage unit. Here is a link to that tutorial:

I went through the whole process and everything was fine. However, I made a mistake when creating an admin account for ownCloud. On the “Data folder” option I left the path as “/var/www/owncloud/data”, which has left the Pi’s own internal storage as the data folder instead of the mounted hard drive. For the latter to be the data folder for ownCloud, the data folder path should have been “/media/ownclouddrive”.

In sum, my question is how to I change the data folder directory after creating an admin account.
I feel like an answer to this question could be useful to many other learners, as this is a popular type of project for new Raspberry Pi owners.

Thank you in advance.

Note: I’m running Raspbian and have installed version 10.0.9 of ownCloud.



it seems to me that a documentation on how to move the data directory already exists:



Thank you for replying.
I had found that page before but it did not seem to quite address my problem since it mentioned running web servers. However, there seems like part of what is in that page would be the solution to this problem (again, keep in mind I am not running a web server nor am I using a database). It seems to me like the steps to achieve the solution would be as below:
rsync -avz /var/www/owncloud/data /mnt/owncloud
ln -s /mnt/owncloud /var/www/owncloud/data
occ config:app:set --value /mnt/owncloud fictitious datadir

Is this correct? Again, thank you in advance.



unfortunately i’m not sure to what you’re referring to. :slightly_frowning_face: If you’re running ownCloud you’re running a web server and a database where you need to follow to steps outlined in the documentation on how to move the data directory.