trying to understand backup of shared folder

RJ_fr33

Dabbler
Joined
Jan 10, 2020
Messages
26
HEllo,

When I share a folder from my TrueNAS to home users. How is that folder "backed up" on same NAS?? (using backupPC etc.)

confused.

I appreciate all guidance and help.

Thank you.
RJ
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
It makes no sense to back up onto the same NAS. An exception would be to avoid user-error and malware, but for that you would use snapshots. Can you describe your scenario in more detail?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It makes no sense to back up onto the same NAS
I disagree.

You may want to have a faster set of disks (maybe some SSDs) which hold the last (or last few) copies of the data and then replicate that (with a much longer retention period) to a pool of HDDs.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
@RJ_fr33 If your underlying zpool gas got a sufficient level of redundancy, e.g. a RAIDZ2, the most probable scenario requiring a backup is wanting an accidentally changed or deleted file "back". For that TrueNAS provides snapshots. You can setup a task that e.g. creates one daily and keeps them for e.g. a month. If you need a file version from a week ago, it will be there.

Helps against ransomware, too.

If that is not your use case, you need to elaborate a bit on what you are trying to achieve.

Additionally snapshots can be automatically replicated to a second system.
 

elorimer

Contributor
Joined
Aug 26, 2019
Messages
194
I may be entirely off base here, but I do backup some datasets to a different local pool. I have a main pool of 12TB in 2 mirrored vdevs with several datasets. Then I have two pools each with a single disk, one 4TB and one 2TB. I replicate some of the snapshots of some of the datasets to those pools. The main pool is at 57% and the local backups are over 80%, but I'm not too worried about that because they are just backups. In the home user context, a good chunk of the data is going to be video and music, and that doesn't change much.

Then I also backup the datasets to a remote TrueNAS server. My upload speed is only 35mb/s, soon to be cut to 5mb/s, so the remote backup can take a long time. The local backup pools are insurance against a loss of the main pool.

For the OP, then, in my scenario he would want a separate pool to replicate to. That's his backup (not backupPC). Snapshotting is his backup for home users doing something oopsie.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
@elorimer Right, But that's exactly why we cannot help him without a proper description of his intention, use case, and assumed failure scenario.
 

RJ_fr33

Dabbler
Joined
Jan 10, 2020
Messages
26
Thank you so much for all the responses.

I intend to (or was thinking) offer some shared folder to NAS users (i think they are called datasets).
Then I want to make sure that the data users save in those folders - is protected against any loss (malware, hw, old ver etc.) (I think versioning would be more resource demanding). For that purpose I was saying backup.

It seems, I can achieve this with datasets (NAS shares) snapshot !! (so the snapshots go in diff HDDs?) diff pool???

This is my very first time, I want to do it right the first time (minimal draw / erase / re-draw etc....)

Thank you !
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Snapshots are your way to go to protect users against "oopsies". No, they don't go to different disks, but it is all automatic and really really safe. You do need a redundant pool, though. What kind of zpool are you using? RAIDZ2 is a common recommendation for file sharing without high performance demands. That means at least 4 disks. And you can lose 2 disks completely and still have all your data and all your snapshots.
 

RJ_fr33

Dabbler
Joined
Jan 10, 2020
Messages
26
Hello Patrick,

Thank you so much for the insights. How many disks? That was my next question.

So I have 2 disks and 2 more ordered. with 8TB total I want to make a RAIDZ2, as you have suggested. How many VDEVS and Pools will be there?

I plan to run nextcloud and use it for pictures/documents/videos. Cell phone backups, etc. among other things

My resources: (my old PC)
Board: GA-E7AUM-DS2H ver.1.0
CPU: Intel Core2 Duo CPU 3GHz
RAM: 4GB (currently) (4GB more ordered)
on-board SATA = 5 ports, SATA-II standard (3Gbps)
PCI card with SATAIII ports = 4 ports.
SATAII disks: (3Gbps): 4 x 2TB
SATAIII disks: 2 x 120Gb SSD (6Gbps on attached to PCI card)
one more NIC card is ordered (Weastlinks Dual-Port PCI-E X1 Gigabit Ethernet Network Card 10/100/1000Mbps Rate Adapter)

This PC currently runs ubuntu 14.04. Which will be removed as part of plan.
I am thinking to install TrueNAS on SSD and mirror them for safety. and use 4 disks for data. It occurred late to me that, I should have ordered SATA-III disks for data and use the PCI card for data disks. so that they run at 6Gbps (too late already ordered :-( ). I think OS would have been ok on 3Gbps SATAII disks (HDD or SSD) - is that right??

How can I make the best use of it? Later on I am planning to buy a new server (DIY) to build a compute host with oVirt or vSphere(opensource).

Thank you so much for your valuable advice.

Rajeev
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Does that system have ECC memory? If not you should not use it.
Is the network card officially supported by FreeBSD without installing a vendor propriatary driver? If not you should not use it but buy an Intel or Broadcom card instead.
The disks and SATA II are fine - people have been building NAS systems befor SATA III, you know. :wink:
You wil get 1 vdev in 1 pool built from 4 disks and 4 TB of usable capacity. And as many datasets as you like.

Did you read the ZFS primer? You should, probably.
 

elorimer

Contributor
Joined
Aug 26, 2019
Messages
194
PCI card with SATAIII ports = 4 ports.
I didn't realize they made these. Isn't the throughput on such a thing less than SATAI? I don't think that is the place for your datapool. Can you boot from it? If you can, maybe use it for your boot disc, but you might hook up one of those SSDs to a USB port instead.

Also, I don't follow why you want the second NIC here, much less with two ports. You will be very much on your own with it.

I think you should consider having your main pool be a 3 disk Z1 with 4TB and use one of your disks as a backup pool for as much of your datasets as you can fit and not afford to lose.

My own use case is a home server, and I am very much aware that I am using sophisticated software guided by folks with sophistication and experience with high end enterprise servers, but implementing it inexpertly on low-power, consumer grade hardware. TrueNAS is built around data integrity at multiple levels that I can't rely on as a result. I'm still a lot better off.
 

RJ_fr33

Dabbler
Joined
Jan 10, 2020
Messages
26
Does that system have ECC memory? If not you should not use it.
Is the network card officially supported by FreeBSD without installing a vendor propriatary driver? If not you should not use it but buy an Intel or Broadcom card instead.
The disks and SATA II are fine - people have been building NAS systems befor SATA III, you know. :wink:
You wil get 1 vdev in 1 pool built from 4 disks and 4 TB of usable capacity. And as many datasets as you like.

Did you read the ZFS primer? You should, probably.


Hi Patrick,

Thanks for the primer link, read it once, will read again :)

No, it is regular 4GB SODIMM.
I saw some comments from people about NIC card working in FreeNAS.

I saw another link by you (by chance) where you show how to install TrueNAS on a partitioned SSD (mirrored). So that remaining space can be used for a data pool. So I have few questions:

first of all very basic question:
0: How much space does TrueNAS OS require for "best meaningful" operation?
0.a) When I install plugin where will they be installed? in boot SSDs? in separate pool? in data pool?

Now if we follow your procedure and partition SSDs. (120Gb to 20Gb for OS and rest for data)
1. When I upgrade the OS in such setup will it erase the disk layout?
2. In case next version need more space, can we extend/shrink the partitions?
3. Can I use the leftover space in both SSDs as a data pool?

Thank you.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
16 G minimum, 32 recommended in my book.
Everything is installed in one of your data pools. The boot pool is exclusively for ... booting.

No, an upgrade so far has never done that. An upgrade via UI will install into the "boot-pool" pool using ZFS, not overwriting raw data on the disk. So you should be fine. Not a guarantee and the configuration is still unsupported.
No, you cannot shrink vdevs. You can grow them, though, by replacing disks with larger ones.
Yes, if you use e.g. 32G of the SSDs for the boot pool by my unsupported method, you can use the rest as a data pool. You might then want to replicate the data from there to your RAIDZ2 pool built from spinning disks.
 
Top