Multiple drives with NextcloudPi

I’ve just set up a NextcloudPi at home with a usb hard drive enclosure that has 2 drive bays. Both drives show up fine on the Pi. What I’d like to do is use one of the drives for storing data from work and the other one for storing data from home. Any suggestions for a clean way to go about this? Also, is there a way to directly transfer data to the drives from my work/home computers (both running Linux)-transferring large chunks of data over my crappy internet connection might be painful :slight_smile:

Hi!
You can have 2 NC instances, each one running in each disk.
To sync the data between instances, just create a script for each one that automatically:

1- rsync folders from NC1 folder to NC2 folder
2- sudo -u www-data php occ files:scan --all
(for single user only use sudo -u www-data php occ files:scan --path="/USERNAME")

to sync all new data and be accesible from NC --> /var/www/nextcloud/data/USER/files
Set a cron job to run the script at the times that you consider

There might also be a solution with a single nc instance. If you plan to login with one user and have two directories (e.g. “work” and “home”) just have a look at external storages in Nextcloud.
Just configure the two mount points of the hdds in your nextcloud administration.

Here is a detailed description:
https://docs.nextcloud.com/server/16/admin_manual/configuration_files/external_storage_configuration_gui.html

Is it as simple as this?

Exactly :+1: It should work like this

Hmm, nope. Adding them through the GUI doesn’t seem to have worked, the data is still being stored on the SD card. I also noticed, I don’t have access to the data added by the other “work” user I created when I’m logged in as admin.

Try this - https://docs.nextcloud.com/server/16/admin_manual/configuration_files/external_storage_configuration_gui.html#adding-files-to-external-storages