Nextcloud in different ZFS datasets?

I’m going to set up Nextcloud on ZFS, and I’m wondering if there’s any value/prudence in breaking up Nextcloud locations into different datasets? I currently have an instance all in the one dataset, but the database is separated for some ZFS setting optimizations with MariaDB which is snapshotted and restored all the same. I was wondering if there was a recommendation or best practice to laying out Nextcloud on ZFS to handle snapshots/rollbacks. This will all be handled in a FreeBSD jail (which works like LXC/LXD for those who only have container experience in the Linux world).

The Nextcloud Pi-project is using btrfs, I’m not sure if it is only on the data folder or the system folder or both: https://ownyourbits.com/category/nextcloud/. Well, it’s all a bit different and probably hard to compare, perhaps you can find some useful information anyhow.

I am running NC on ZFS, but only for it’s data folder as the rest can be restored very easily. When it comes to automatic snapshotting, I’d recommend to take a look at zrepl, which is what I am using to replicate/manage the snapshots and replicate them to another server located in co-location.

I’d also use at least two different ZFS, if I’d had the database on ZFS, but you’re doing that already, so you’re good to go, imho.

I’m already using ZAP for automated snapshots/replication :slight_smile: The tip is much appreciated.

Thanks for the info. i think what I’ll do is have the database and data in their own datasets. One for restoration, but I was also thinking about migration. The datasets will be independent of what the jail is now so if I upgrade my jail to a different FreeBSD release I can just move the mountpoint to the new jail. Too late for my personal install, but it will be useful for the one I’m setting up now

Yeah, you will need a seperate dataset for your database, because you should set the ZFS recordsize to 8k for that dataset.