Jump to content

Simple FreeNAS backups?

Gerr

I really want to run a FreeNAS server to host my Plex server as well as act as a NAS, mainly due to ZFS.  However, everything I have read is that backups are a PITA on FreeNAS and most recommend a 2nd server, which I do NOT want!  I need 2 types of backups.  One is for my movies & pictures and I just want it to sync with an external HDD or low end NAS box.  So if I add or removed a movie/pic, I want that change reflected on the backup when it runs that evening.  As for the NAS backup, I want something that can do a version chain, like differential backups so I can pull a deleted file or older version from a month back, also to an external HDD or low end NAS.  Is this possible?

Link to comment
Share on other sites

Link to post
Share on other sites

I guess what you want could be done with FreeNas or Unraid or similar home NAS systems. One of my many home projects is also a Nas system like computer, and ended up using a very barebone Windows 10 install because I want mine to do both the things you mention of version backup, but also external backup and sync specific folders to both GDrive, Dropbox, OneDrive and Backblaze, as I use all 4 services for different things. In my case it was way too complicated to setup anywere else than in WIndows so thats what I went with.

My Gaming PC: 27833

Link to comment
Share on other sites

Link to post
Share on other sites

38 minutes ago, Gerr said:

I really want to run a FreeNAS server to host my Plex server as well as act as a NAS, mainly due to ZFS.  However, everything I have read is that backups are a PITA on FreeNAS and most recommend a 2nd server, which I do NOT want!  I need 2 types of backups.  One is for my movies & pictures and I just want it to sync with an external HDD or low end NAS box.  So if I add or removed a movie/pic, I want that change reflected on the backup when it runs that evening.  As for the NAS backup, I want something that can do a version chain, like differential backups so I can pull a deleted file or older version from a month back, also to an external HDD or low end NAS.  Is this possible?

FreeNAS isn't exactly user friendly, as it is meant for enterprise environments run by a dedicated IT person or team. (Don't be scared off by this) It is perfectly do able it just might take a little more time to figure out how to setup everything. Don't expect running the little setup wizard to setup everything you want.  

 

You can plug the external drive into freenas and setup a zfs pool on that drive and just use the standard replication tasks in the freenas GUI to replicate a ZFS dataset. You will need to enabled snapshots on the dataset you want to replicate as freenas uses snapshots to send the data.

 
Replication task are meant to be sent to another server but you can just send the task to itself. You also need to readup on replication Tasks 

http://olddoc.freenas.org/index.php/Replication_Tasks


I do this to very critical datasets, works really well.

 

As for you version chaining backup your talking about.  ZFS has all of that built in with snapshots. 
For example I can setup a dataset to do a snapshot every 12 hours and keep the snapshot for 6 months.  At any time I can go back and find a file that has been deleted or edited within a 6 month period. As long as the file existed when a snapshot was taken it is saved for 6 months.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

For ZFS snapshots, how big does the storage need to be compared to the original volume?  IE if I have 2x3TB drives mirrored together for 3TB of redundant storage for my NAS, how big of a single HDD do I need to keep a decent amount of snapshots?

 

Also, I heard ZFS doesn't do so well when the pool starts to get near capacity.  If I have a 3x3TB in RaidZ1 for 6TB of usable storage and have it filled up with 5TB of storage, will I suffer any performance loss?

Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, Gerr said:

For ZFS snapshots, how big does the storage need to be compared to the original volume?  IE if I have 2x3TB drives mirrored together for 3TB of redundant storage for my NAS, how big of a single HDD do I need to keep a decent amount of snapshots?

 

Also, I heard ZFS doesn't do so well when the pool starts to get near capacity.  If I have a 3x3TB in RaidZ1 for 6TB of usable storage and have it filled up with 5TB of storage, will I suffer any performance loss?

Snapshots are kept on the pool and it depends on data change rate, no one can tell you how much you need.

https://docs.oracle.com/cd/E23824_01/html/821-1448/gbciq.html

 

If you modify 100GB of data, including deleting, the snapshot will be 100GB in size. This space will be used until the retention time expires and the snapshot is deleted. Fortunately ZFS is a COW file system so it may not actually use 100GB of actual space because it puts reference pointers in to the data blocks rather than making actual copies of them.

 

 

Quote

Disk Space Accounting for ZFS Snapshots

When a snapshot is created, its disk space is initially shared between the snapshot and the file system, and possibly with previous snapshots. As the file system changes, disk space that was previously shared becomes unique to the snapshot, and thus is counted in the snapshot's used property. Additionally, deleting snapshots can increase the amount of disk space unique to (and thus used by) other snapshots.

 

A snapshot's space referenced property value is the same as the file system's was when the snapshot was created.

 

You can identify additional information about how the values of the used property are consumed. New read-only file system properties describe disk space usage for clones, file systems, and volumes. For example:


$ zfs list -o space -r rpool
NAME                      AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
rpool                     60.0G  6.92G         0   40.5K              0      6.92G
rpool/ROOT                60.0G  3.89G         0     31K              0      3.89G
rpool/ROOT/solaris        60.0G  3.49G     40.4M   3.16G              0       306M
rpool/ROOT/solaris-1      60.0G   403M         0    310M              0      92.7M
rpool/ROOT/solaris-1/var  60.0G  92.7M         0   92.7M              0          0
rpool/ROOT/solaris/var    60.0G   306M     89.9M    216M              0          0
rpool/dump                60.1G  2.00G         0   1.94G          62.7M          0
rpool/export              60.0G  96.5K         0     32K              0      64.5K
rpool/export/home         60.0G  64.5K         0     32K              0      32.5K
rpool/export/home/admin   60.0G  32.5K         0   32.5K              0          0
rpool/swap                60.0G  1.03G         0   1.00G          32.5M          0

 

General rule we go by is reserve 20% of space for snapshots.

Link to comment
Share on other sites

Link to post
Share on other sites

So snapshots are saved on the same pool as the normal data?  If so, that's not a backup, but just a feature to restore deleted or old versions.  I want a proper backup on an external HDD or NAS just in case there is a pool failure.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Gerr said:

For ZFS snapshots, how big does the storage need to be compared to the original volume?  IE if I have 2x3TB drives mirrored together for 3TB of redundant storage for my NAS, how big of a single HDD do I need to keep a decent amount of snapshots?

 

Also, I heard ZFS doesn't do so well when the pool starts to get near capacity.  If I have a 3x3TB in RaidZ1 for 6TB of usable storage and have it filled up with 5TB of storage, will I suffer any performance loss?

It depends on how much your data is changing. Snapshots don't take up any space until the data they are pointing to has been changed or removed. For example If I have a dataset that is 10GB and just had a snapshot taken, if I delete a 1GB file out of that dataset it will remain 10GB because I have snapshots that still contains that file. Once all snapshots that contain that file have been removed then that 1GB file will be removed and I will have 9GB used.

I should point out snapshots are read only. you can't delete a single file in a snapshot, you would have to delete the entire snapshot.

 

I am at 86% usage on one of my pools, anything over 80% is when they say your will start to see performance impacts. I personally haven't really notice any performance impacts at all. Maybe that will change as it gets closer to 90% or maybe I just am not using it in a way that I would see those impacts 
 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Gerr said:

So snapshots are saved on the same pool as the normal data?  If so, that's not a backup, but just a feature to restore deleted or old versions.  I want a proper backup on an external HDD or NAS just in case there is a pool failure.

That's why snapshots are not backups, they are snapshots :).

 

As @Catsrules mentioned, setup a replication task to an external HDD as well as configure snapshots on that external HDD so you get revision history. Replication alone only makes it look like the exact point in time it's replicated which is no good if you need a file you deleted 2 days ago and you replicated 1 day ago.

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Gerr said:

So snapshots are saved on the same pool as the normal data?  If so, that's not a backup, but just a feature to restore deleted or old versions.  I want a proper backup on an external HDD or NAS just in case there is a pool failure.

With a replication task snapshots are copied to the backup location. You can also set it up to copy all snapshots to the backup location, and you can have the option of keeping all snapshots forever on the backup location or removing the snapshots as they are removed on main pool.

With my setup I remove my snapshots on the backup location as they are removed on my main pool.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Could I create a Windows 10 VM inside FreeNAS and then run a Windows based backup program like Acronis and backup the data from a ZFS pool to an external HDD or NAS?

Link to comment
Share on other sites

Link to post
Share on other sites

My other option is to use the Sophos UTM box I use as a router/FW and instead of running Sophos UTM on bare metal, I VM it inside Windows and then use that Windows system to make backups from one NAS(FreeNAS) to another NAS or external HDD off that box.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×