RSYNC FreeNAS Jails to another storage (maintain file permissions)

Status
Not open for further replies.

hus

Dabbler
Joined
Feb 20, 2017
Messages
17
Hi Guys,

I'm extremely impressed and satisfied with FreeNAS and the jail concept. I have invested almost a month to get many web services up and running on my FreeNAS server such as Plex, Next Cloud, Sickrage, Couchpotato, Nginx Reverse Proxy, Subsonic, Rtorrent and few other services. All of this are sitting under one main jails dataset and they have their own sub data set under the main one. While I trust on the reliability of ZFS, Im sure backing up all these is a wise decision. At this moment, I have one of my old Buffalo Link Station NAS which has enough storage to be used for backup of all my jails. It happens to also support RSync so it will go well with Freenas.

Now my major concern is, file permission/ownership of assets under each and every individual jails. Example plex has its own user/group, sickrage its own etc etc. Now, when I rsync all these to the other NAS, is there anyway possible to maintain the file permission integrity, so that in case of any catastrophic failure of my FreeNAS storage, I can just reverse the rsync and restore back all my jails data. Has anyone been able to do such thing? And in principal can these work?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Theoretically it should work but in practice there are so many variables that you need to spend some time testing it and verifying that restore works the way it needs to.

Most people would not worry about restoring their jails. It is probably faster to just reinstall everything. Take notes on what you did to set stuff up. You are using lots of jails but none of them are that complicated to setup.
 
  • Like
Reactions: hus

hus

Dabbler
Joined
Feb 20, 2017
Messages
17
Theoretically it should work but in practice there are so many variables that you need to spend some time testing it and verifying that restore works the way it needs to.

Most people would not worry about restoring their jails. It is probably faster to just reinstall everything. Take notes on what you did to set stuff up. You are using lots of jails but none of them are that complicated to setup.
Yes I agree, although they are many jails, none of them are super duper difficult to setup. Its just the time and effort to go through the whole process which I feel is not worth. While writing this I just realized that Freenas also has snapshot feature. What if I take a weekly snapshot of the jails dataset, then rsync the snapshot to the other backup NAS. Do you think this is a better option? Ive not used snapshot feature so far so Im just assuming snapshot is like an tar/rar archive of the whole data. Please correct me if im wrong.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Please correct me if im wrong.
Gladly ;)

A ZFS snapshot isn't anything like a tar/rar archive. ZFS is a copy-on-write filesystem, so when data blocks change, they are read, modified, then written to new storage. The final step is to mark the original blocks as free. What a snapshot does is prevent all currently allocated blocks from being marked as free after modification. That's why a snapshot only begins to consume space when subsequent modifications
are made to the underlying dataset.
What if I take a weekly snapshot of the jails dataset, then rsync the snapshot to the other backup NAS.
Close. A weekly snapshot can be replicated to another storage device (research zfs send and zfs receive). If the destination is not a ZFS filesystem, the snapshot just sits there as a monolithic data dump, and must be replicated back to a ZFS filesystem for later recovery.
 
Status
Not open for further replies.
Top