Hardware Questions + NAS + Backup

Hello Guys,

Using Nextcloud since Version 9, you are doing a great job.

I am going to make a Project for our small but growing Business with Nextcloud (10 Users, approx 25 Devices)
The Main Ponts are Safety and Backup of our Data and the Power Consumption.

My approach:
Intel NUC with i5 or i7
M2 SSD Samsung 850 Evo
16gb DDR4 SODIMM 2133 MHZ

NAS Storage with 4 Ports, 2 Harddrives will be in Raid 1 at the beginning
Planning to run Ubuntu 16.04 Minimal or RHEL 7

My Questions:

  1. What would you maybe edit on the Hardware Setup?
  2. How to Backup the Nextcloud Server (config etc)?
    -should i install normal harddrive in the NUC besides the SSD to backup?
    -what Programm would you choose to backup and maybe notifying of backup status?
    3.How do i Backup the NAS that there are Snapshots available and how do you manage those?

Thank you for reading,
Dark-Schnitzel

Are there any reasons why you want to build your own server and not use NAS solutions like Synology?
10 users are not that much and NC runs on a Synology DIskStation (I use NC on a DS) and also comes with built in Backup solutions (e.g. save the backup of one NAS to anoter NAS).

That’s a good deal higher specced than most for a Nextcloud box :slight_smile:
You mention the NAS as a separate entity, what is it?

A scheduled rsync of the nc directory, in combination with database dumps saved to external storage will work just fine.

What is the NAS, just disks plugged into the NUC or an actual branded NAS box? If the disks are raw, something like ZFS as a filesystem will support snapshots, plus import/export should you wish to move your filesystem to new disks with minimal fuss.

1 Like

As @JasonBayton said, filesystem snapshots are a nice thing for running upgrades. You can use either LVM with conventional filesystems or more modern ones like ZFS or btrfs. At least for ZFS, it needs a certain amount of RAM.

About the SSDs: There is some controversy putting two (more or less identical) SSDs in a RAID. SSDs have a limited write cycle, if you take the same model of SSDs and they are doing the exactly same operations, they tend to fail at the same time. The performance point of view is probably harder to answer, if you get good settings of caches, many operations are carried out in your RAM so you won’t be less affected by your hard disk performance.

I would put my backup just on a different harddisk, perhaps on a different system as well. There are plenty of backup solutions, rsnapshot does time-machine-like backups, duplicity, …

There are good reasons not to use commercial NAS systems:

  • hardware updates are difficult
  • non-open operating system.

the last point is probably the largest issue. You really depend on the NAS manufacturer what he allows and does with his system. Do they ship recent php versions (we already had reports here that some don’t provide php>5.5, so you can’t run NC 11) or they don’t update/patch it. QNAP is pretty bad (https://central.owncloud.org/t/upgrade-to-9-1-on-qnap/3803/5). With decent hardware, you can always run an up to date linux distribution which provides current software packages and continue working over the next years.

edit: Synology-> nextCloud 11 | DSM 5.2 | php 5.6

3 Likes

Yes I know these arguments and they are good arguments. But on the other side it’s easier and you don’t need to set up everything on your own using ready-to-use systems. If you don’t need a tailor made solution and/or don’t have solid skills they are a good alternative.

And about Synology: DSM 5.2 is quite old. Or lets say DiskStations that don’t support newer DSM versions are quite old.

I’m not really sure if it is easier. When you have a synology app for owncloud this is very easy to install but when they don’t provide updates (we have seen this, people then stay on an old version with known security issues), this gets very complicated compared to a default setup on a “normal” Linux system. And there are less people with knowledge who can help you.

And who decides that it is too old? Or that you don’t need php7 or caching modules?

Sorry for answering late. Yes, it should be upgradable and its a project for my Training, theres a writing exam and a project. The Project will be setting up a nextcloud server. There is a Jury of 3 people + chef who will rate this. Open Source is a very important thing to me personally.

Upgradable Hardware is also very important and offers a higher performance than build in Hardware for the same price.

The NAS should be the Storage for the System, thought to install only the things needed to run Nextcloud on the NUC and Backup the internal SSD of the NUC to a seperate Disk.

But after reading the answers it seems to be useful to use 2 NAS Storages where NAS 2 backups NAS1 with Snapshots?
If this is right, is there still a raid 1 needed?

The Idea to work with Snapshots is great, ZFS should not be a Problem Ram can be upgraded to 32 GB :slight_smile:

Could you recommend a NAS for this Setup? Havent worked with NAS Storages before :frowning:

I would not use SSD’s in a NAS. They are too expensive and the lifetime is not that great for such things, it should be only a Fast System Disk to run Nextcloud at max Performance. Because of the limited lifetime i thought of a sperate SSD backup (M2 SSD -> 2,5" HDD)

Running Nextcloud on the Banana PI M3 atm and for the project it should run on a newer Kernel (banana pi 3.4.39) etc. So a Synology or similar is not an Option

Installing NC on a DiskStation is now easier than before but you are right, at least for English speaking people there is not much help but in the German Forum there is a lot of help.

You only have this PHP problems if you own this old hardware, they improved their software updates in the newer versions. Yes this is still a downside of such products especially when you use 3rd party software but they still have their value. Also most vendors offer software updates for several years and after that you can still change the NAS and keep the disks. Which is basically the same as if you change the whole hardware of an assembled system.

It’s still not clear how many separate machines you intend building. ZFS should be used with ECC memory too if you can do so, prevents data corruption in the memory module :slight_smile:

It should be as less machines as possible, but everything need to be backed up thats the main problem for me

Intel NUC with built in M2 SSD and 2,5" HDD for Backup (or another Hardware with maybe ECC-Memory)
NAS Storage for Nextcloud (Maybe Raid 1)
Another NAS or another HDD extern or other to backing up Snapshots of the Data-NAS

This Sounds very complex to me for realizing a Cloud with Backup and Snapshots, maybe theres a better way?
btw Energy-Efficency is point in the Project, so maybe less is more

Thanks for the Answers that helped a lot to understand this

How reliable do you need your server to be? With RAID, the system runs very reliable. A second hot spare server is better, but that’s a bit tricky to realize that it works reliably in all circumstances. And a second system doubles the energy consumption.

The easiest backup would be a separate disk on your system that is only mounted for backups. The risk is that if there is a hardware problem on your server, or someone hacks your server, the backup is not protected at all. So for this reason you should keep a offline backup as well. Or you take an external raspberry pi, that pulls the backups. Depends a lot on your use case. How long can it take to recover your server in case it completely crashes? What is the acceptable age of a backup (an hour, a day, a week, …)?

But if theres Changes on the Cloud, for example something like Locky or other ransomware, the locked files will be synced and duplicated on the Raid Harddrives (Worst Case).If i got a Backup with Snapshots i can recover from that. I think if theres a crash i will have time from 1 day to 1-2 weeks. This Time can be bridged i think. The Server now holds only ~100 gigs and 100.000 Files so a Offline Backup or a Raspberry Pi who is Syncing from the NAS could be an option.

Also if theres another Backup (Harddrive, Pi etc) on another location in case of fire or something data loss is also prevented, thats a good idea

Does the Encryption of the Hardddisk have any impact on the acces of the Backup? or is this no Problem?

I have built my Nextcloudserver according to this guide. Runs 24/7 and I am very satisfied. Power consumption is very low. 2 x 3 TB Western Digital Red with rsync backup twice a day. An external hard drive which I manually start and a script which then performs the backup and the disk suspend. Operating System Debian Stable with Backport Kernel.

1 Like

Seems very interesting, cant read the full article (paywall) but i gonna inform myself about this. Do you have a built in Raid Controller in this Setup?

Edit: i see the Board is offering a Raid Controller Built-In

Is it useful to use the Backup Harddrive(s) in Raid 1?

Your Information was very useful, thank you :slight_smile:

Softraid will offer more flexibility and should be easier to support/maintain.

1 Like

You can find information about the setup in the forum: https://www.heise.de/forum/c-t/Kommentare-zu-c-t-Artikeln/Heim-Server-im-Selbstbau/forum-329440/

1 Like

I will document my Steps to the Server now to help others who want to do similar things.

Thanks to JoMatr for the link, very helpful

Server Hardware:

Mainboard:
-Fujitsu D3402-B
-Built-in Raidcontroller
-https://www.heise.de/preisvergleich/fujitsu-d3402-b-a1346654.html

CPU
-Intel Core i3-6100
-https://geizhals.de/intel-core-i3-6100-bx80662i36100-a1329935.html?hloc=at&hloc=de

System SSD (NVM):
-2 xSamsung SSD SM951-NVMe 128GB, M.2 (MZVPV128HDGM-00000)
-https://www.heise.de/preisvergleich/samsung-ssd-sm95-https://www.heise.de/preisvergleich/samsung-ssd-sm951-nvme-128gb-mzvpv128hdgm-00000-a1301791.html

Ram (Unbuffered ECC):
-2x Samsung DIMM 8GB, DDR4-2133, CL15-15-15, ECC (M391A1G43DB0-CPB)
-https://www.heise.de/preisvergleich/samsung-dimm-8gb-m391a1g43db0-cpb-a1246195.html?hloc=at&hloc=de

Adapter M2 to Sata
-https://www.amazon.de/ZTC-Thunder-Board-NGFF-SATA-III-Adapter-Karte/dp/B00HKV2TVK

HDD
-2x Seagate IronWolf
-https://www.amazon.de/Seagate-IronWolfhttps://www.amazon.de/Seagate-IronWolf-ST3000VN007-interne-Festplatte/dp/B01LXUFP02/ref=sr_1_3?ie=UTF8&qid=1486648023&sr=8-3&keywords=Seagate+Ironwolf-ST3000VN007-interne-Festplatte/dp/B01LXUFP02/ref=sr_1_3?ie=UTF8&qid=1486648023&sr=8-3&keywords=Seagate+Ironwolf

Gehäuse (9.6"x8.4", 244 x 213mm) mikro atx
-Cooler Master Elite 342 USB 3.0
-https://geizhals.de/cooler-master-elite-342-usb-3-0-rc-342-a637619.html?hloc=at&hloc=de

Netzteil 300W
-be quiet! Pure Power 9 300W ATX 2.4 (BN260)
-https://geizhals.de/be-quiet-pure-power-9-300w-atx-2-4-bn260-a1454801.html

Customer (my Chef) wants:
-Reliability
-Change the Main SSD with Backup SSD if the SSD is dying
-Raid for the Data Partition
-as less downtimes as possbile

Plan for Server Setup:
-1 NVM SSD for the System (ZFS?)
-2 Seagate IronWolf in Raid 1 (ZFS)
-1 NVM SSD, connected to Sata with the Adapter, same file system as the Main SSD (ZFS)

-Ubuntu Server 16.04
-Installing Nextcloud
-SSL from Letsencrypt

Scripts to create for this Server
-Cronjob for rsync of the Main SSD
-Cronjob to Backup the Nextcloud relevant directorys and Database
-Cronjob for Letsencrypt

This is not the Final Plan/Setup and its my first time setting up such an environment.
If someone is interested i will update the Status and Changes of the Project.

Your setup seems like a nice hobby project, but if your data is valuable I would recommend a simple solution. For your situation you don’t need a really high performing setup. ZFS is nice for snapshotting purposes, but I question it’s reliability under ubuntu with regard to keeping your system up to date. btfrs is more native although I would also not recommend it.
SSD’s are fast, but you must remember that a lot of things are being cached on webserver and database level if you setup it right, and for large file transfers HDD’s are perfectly capable of handling everything you can trow at it using a gigabit connection.

What I would do:

  • Buy a HP microserver Gen8 for a few hundred euro.
  • 2x traditional 7200rpm HDD, for example HGST, RAID1.
  • Install the free version of vmware ESXi(or opensource alternative). It’s really simple if you have a little IT knowledge.
  • Create Vm and install Ubuntu and nextcloud normally.
  • VM for collabora(optional).
  • Buy a simple NAS with enough strorage that supports NFS or iSCSI(Synology or Readynas), and connect it to ESXi
  • use free GhettoVCB to schedule complete VM backups to the NAS

When Microserver performance isn’t sufficient anymore --> copy VM files to ESXi server with newer hardware.
No more hassle with Ubuntu or Nextcloud upgrades. --> Just create a vmware snapshot and if something fails just rollback.
If hardware fails, then you have a working VM on the NAS. Just restore it on another ESXi host and it’s running again.

1 Like