I am using OwnCloud 10.15.3 (stable) on a Raspi 5 in a docker environment. I use the apps “Files”, “Calendar” and “Contacts”. Attached to the Raspi there is a USB HDD which is supposed to store the files the users sync via OwnCloud. The Calendars and Contacts shall reside on the SD-card the Raspi boots from.
The background for this is that I want to have a simple backup concept: I copy an image of the SD-Card via cron-job to a backup location. For the files sync’d via OwnCloud there is a dedicated backup job. Since there are some other things on the SD-Card, the SD-Card image does not only backup owncloud but also those other things in one go.
After having set-up OwnCloud in Docker everything is stored in the SD-Card: Contacts, Calendar and also the files.
moves the user’s directory to a new location. I can also move it to the USB-HDD.
Unfortunately this move apparently encompasses calendar and contacts as well. I deduced that the following way: I created a few sample appointments in the calendar. Next I created an image of the SD-Card. After that I deleted one of the sample appointments and added new ones. Finally, I restored the SD-Card from the backup. I see that all changes I did after I took the backup are still there: The deleted appointments are still deleted and the newly created appointments are still there. If the Calendar data was stored on the SD-Card it would have been restored to the backup state, undoing the changes I did after the backup was created.
Now the question is: How can I move only the file storage from the SD-Card to the USB-HDD?
Thanks for the detailed explanation this setup makes a lot of sense for simplifying your backup process. In OwnCloud, unfortunately, the user:move-home command moves the entire user data directory, which includes not only the synced files but also app data like calendars and contacts. This is why you observed the calendar entries persisting despite restoring your SD card image the data is being stored along with the user’s home folder that was moved to the USB HDD.
To achieve your goal of separating file storage from calendar and contacts, you would need a more granular control of data paths, which OwnCloud doesn’t natively support out of the box. However, one potential workaround would involve mounting external storage (like your USB HDD) specifically for the files directory inside each user’s data folder, using symbolic links or bind mounts, while keeping the rest of the app data on the SD card.
More technical guidance and best practices around storage configuration are covered in the official OwnCloud Admin Documentation which might help you refine this setup.
If you’re interested in similar cloud storage and remote data access setups, feel free to visit the main OwnCloud Community Forum where advanced use cases like yours are regularly discussed.
That’s a really thoughtful setup makes total sense wanting to separate files from calendar and contacts for cleaner backups. I’ve run into similar issues with OwnCloud in Docker, and it can be tricky. Curious if mounting just the data/ directory to the USB HDD while keeping app and config data on the SD card could help? Would love to hear how you end up solving it.
thanks for the suggestion. Apparently this does not work. My attempt of creating such a files folder for a single user resulted in all the containers of the stack being displayed as running in Portainer, but the web service is not reachable.
Hi @kearawill,
my above statement is wrong. I missed deleting all data from the previous installation, in particular the stuff in OWNCLOUD_FILES_LOCATION. After emptying this folder, removing the stack and deploying it anew, the Owncloud server came up correctly. I was able to create the user “Miri” and a folder created in the web interface showed up in OWNCLOUD_USER_MIRI_FILES_LOCATION. So on 1sst glance it appears to be the case that this actually works.
Splendid!
Thanks for your suggestion.
Further testing is required, but for the time being it appears to be the case that this is the way to go for me. And maybe as well for you, @Ethanjohn ?