Is there a way to have a two-way sync between two datasets?

mikozee

Cadet
Joined
Aug 22, 2022
Messages
8
After having problems with permission on Truecharts Jellyfin on a dataset with SMB, I Googled for solutions and found one that I think could work.

Basically have a dataset dedicated to the app, and have files I need to view on those app sync to another dataset that has SMB so I can access it from Win10.

Searching for a method has come up with blanks. All the methods I've found are either one-way, or some other restriction.

Is there a way to do this natively, or an app that can do it?
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Usually, rsync can do all modes : one-way, mirror, etc.
 

mikozee

Cadet
Joined
Aug 22, 2022
Messages
8
Usually, rsync can do all modes : one-way, mirror, etc.
I thought rsync was for two different servers, I remember reading it requires a host and remote server. I only have my home server, I'm just trying to sync two datasets within the same server. Can it be used within one server with two datasets?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I thought rsync was for two different servers,

This is incorrect. Omit the target hostname and just specify a pathname by itself, and rsync is very happy to work locally. This is often used in interesting ways by people who are looking for a smarter copy program for UNIX, as it can do creative stuff like symlink trees.
 

mikozee

Cadet
Joined
Aug 22, 2022
Messages
8
This is incorrect. Omit the target hostname and just specify a pathname by itself, and rsync is very happy to work locally. This is often used in interesting ways by people who are looking for a smarter copy program for UNIX, as it can do creative stuff like symlink trees.

Thank you.

Just for clarification, is rsync a one-time command, or a perpetual background process? If the former, is there a more suitable method for a two-way sync that's always running in the background?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
rsync is a one shot, just like UNIX cp or DOS xcopy. rsync does have a daemon mode where it can be set up as a server to listen for connections from clients, but it is not ongoing. Mostly used to set up cron-based hourly syncs or stuff like that, in combination with the over-the-network mode you referred to previously.

Bidirectional sync is a difficult task, and I've not found anything that is totally reliable. Around here, I've used unison for our bidirectional file replication needs, and I think there was something more recent that I had run across as a possible alternative, but I do not recall offhand, apologies. I'll hit "Post reply" and see if it pops into my head in a few seconds, heh.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
Not sure sure where the original effort to have the same dataset shared via SMB and jellyfin failed?
@mikozee Can you explain?

Syncthing also has that bidirectional capability.
 

mikozee

Cadet
Joined
Aug 22, 2022
Messages
8
Not sure sure where the original effort to have the same dataset shared via SMB and jellyfin failed?
@mikozee Can you explain?

Syncthing also has that bidirectional capability.

The original dataset shared via SMB and Jellyfin is works. But I'm running into some permission issues within Jellyfin that I can't figure out (albeit, I am a total noob with Linux so maybe it's not an issue, I just messed something up). I tried setting myself as the owner, the 'apps' as the owner, and I've tried changing the UID settings, and nothing worked.

[This user seems to be having similar issues, so I'm trying out the workaround solution they posted at the very bottom](https://www.truenas.com/community/threads/truenas-scale-permission.98480/)
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
The original dataset shared via SMB and Jellyfin is works. But I'm running into some permission issues within Jellyfin that I can't figure out (albeit, I am a total noob with Linux so maybe it's not an issue, I just messed something up). I tried setting myself as the owner, the 'apps' as the owner, and I've tried changing the UID settings, and nothing worked.

[This user seems to be having similar issues, so I'm trying out the workaround solution they posted at the very bottom](https://www.truenas.com/community/threads/truenas-scale-permission.98480/)
You'll need to describe the symptoms and how the settings do or don't help..
 

somethingweird

Contributor
Joined
Jan 27, 2022
Messages
183
try looking lsyncd - a daemon to continuously synchronize directory trees. As for two way sync.. I don't know.. but at least it a step closer?
 
Top