Help rsync-ing data between Truenas and old Zyxel NAS

nautilus7

Dabbler
Joined
Jan 23, 2023
Messages
15
Hi, I am quite new and inexperienced regarding shares, permissions and rsync. So, I need your help and advice.

I have an old Zyxel NAS 326, where my data currently are. I have built a new server based on Truenas scale and now I wan to migrate the data to it. I also want to keep the old nas for backups and use it as a replacement server for accessing the data in case of failure of the Truenas server. The only available method to sync data from Truenas to the Zyxel seems to be rsync, so I have setup an ssh connection between the two.

What I am struggling with is finding the most suitable setup options for user permissions (in the Truenas dataset that will hold the data) and rsync parameters for the sync between the two. Let me start with some facts:

1. We are a small office with 3 users. We use windows PCs to access the data via smb.

2. The Zyxel has very limited setup options regarding its shares and users. Currently we access our data using one guest account with no password. So basically, the data are open to everybody having access to our network. Creating new accounts IS possible in the Zyxel of course, but this is how is was setup initially.

3. Ideally, I would like to have a separate user account for each person in our office, so I can later setup additional smb shares for each user for e.g. personal data.


So, what would be best approach regarding data syncing? What would be the proper setup for rsync regarding permissions, owner, group, etc? My goal is to use the Zyxel for backups, but it should also be able to (temporarily) serve the data via smb in case of downtime/failure of the Truenas server.


Points 1-3 seem trivial to accomplish using in Truenas. For example, I was thinking using a dataset with nfsv4 acl and creating 4 users, all belonging to the same group: user1:office, user2:office, user3:office and office:office. Owner user of the dataset will be office and owner group will be office.

But then, is this the best setup? How does that affect compatibility when data are backed up in the zyxel? I am pretty sure the Zyxel does not support nfsv4 acl. So, what's left? Does it matter at all? I mean in case of Truenas server downtime, I don't care if all users can access the date from the Zyxel with the same account or if the data are open to the guest account, like they are now. It would be a temporarily thing anyway. Afterwards, if the data need be restored from the backup, I do not care if they are restored all having the same office:office owner and group, instead of the original user (user1, user2, user3, office) who created them.


I hope this is not too complicated to understand. I tried my best describing the situation. Any help would be appreciated. Thanks.
 

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
if you must use the zygel, I would setup the truenas with the user access in whatever way you want, and just rsync the files to the backup junker as root with --archive.
you dont need users to access the backup, and while you cant use zfs replication, you can still use snapshots to store versions and/or present something like windows previous versions for user restoreable backups.

the zygel in this case would be your "oh noes it all died" copy; you might have to muck with permissions on a catastrophic failure of truenas but the data would be still be present and that's relatively unlikely to begin with

i would also seriously consider investing in a backup truenas (doesnt have to be anything special, or have lots of performance. just about anything will have more performance than that zygel thing probably.)OR looking into just cloud backups - something like azure cold might be appealing.
 

nautilus7

Dabbler
Joined
Jan 23, 2023
Messages
15
Thanks for your response.

That's what I am planning to do. The Zyxel has been serving our office just fine. 3 users reading/writing small files (mostly documents) isn't any significant load that even that old nas couldn't handle. But I want to move to truenas, so I have snapshots aka windows previous versions, like you say.

I can't build a second truenas server just for backups, at least at this time. So, I have to use the Zyxel for backups.

My thought was, what happens if the Truenas has a hardware failure? Not in the form of disk failure and risk of loosing my data, but in the form of other hardware failure that will bring it of line, like psu, motherboard, etc.

That's why I want to be able to utilize the Zyxel, for smb sharing our data to the windows PCs. So, what would be the best and most compatible way of setting the Truenas dataset, user accounts and rsync task to the Zyxel, so it can take over the smb sharing in such case?
 
Top