How to save file on another partition


I have set nextcloud on my Ubuntu server and everything is running.

I added a new disk to my server and i want to know if it is possible to save certain files on the new hard drive.

I want to have some files on the default installation SDA2 and only a folder on the second partion. SDB2

I have sda2 as default location and sdb2 as mount partition.

Is there a way in order to mount a folder, be able to save files there on the new hard disk and give share permissions?


Maybe the best way is to move all to the bigger disk. But if not you can use Configuring External Storage (GUI) with the sub-part Local. Note the correct rights for the mount point and directory for user www-data and group www-data.

If you want to move all data to the bigger disk you can manage it with copy/rsync, modfify in config.php , occ files:scan --all and maybe a little bit more configurations. Search the web.

Notice that there is only one datadirectory in Nextcloud possible (config.php).

 'datadirectory' => '/path/to/',