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: https://pimylifeup.com/raspberry-pi-owncloud
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. 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.
@tom42 this page is not found. Is there a new link ?
I did exactly this during my setup as well. Now I can’t change it. The webpage everyone here points to doesn’t work at all. I cant even stop Apache. The “use ownCloud” doesn’t work either. Did you figure this out?
Overall it took me about 2 hours to setup the whole thing and I really don’t want to have to start from scratch. I’ve been trying to fix this for the last 4 hours now lol.
Nowadays following a link in a thread started in 2018 always might be problematic.
Is this just a general rant or are you looking for help?
this link still works for me.
No it was a serious question. I stayed up all night but finally figured it out. Turns out nginx is a web server and that’s what I was using instead of apache2. Once I stopped that I was able to get into the ownCloud by cd’inf into var/www the doing the maintenance mode to on. Then I had to go back to the server entry and could then finally input the code to change locations. Sadly when I tried logging in it said something had gone wrong with permissions. It was 4 am and I was tired and sad so I went to bed and redid it all this morning from scratch.
I was able to use the link from his previous comment. I mentioned I was following the steps in it but is kinda sucked because it skips so many steps that commoners like me wouldn’t know.