rsync to copy/sync local dataset

Status
Not open for further replies.

dirkme

Contributor
Joined
Jul 19, 2017
Messages
162
Hi dear FreeNas friends,

I am life now with my freeNas system, as it is different to me as Linux and never used rsync, i need your help

I have a dataset called tardis (path: mnt/trust2/tardis) and I want it copied to dataok (path: mnt/trust3/dataok)

I am incapable to put that into the given rsync option in Freenas 11, even reading the guide section, can you please provide a step by step guide for a dummy?.

All descriptions and guides I could find are for FreeNas 9 and older and the interface is 100% different to me.

Help? ;-)

Dirk
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
FreeNas 9 and older and the interface is 100% different to me.
The GUI is virtually identical from 9.3 through 11. But I don't think the web GUI's rsync support is really designed to handle local copying in any event; this is something that would likely be best done through the CLI. And if you're at the CLI anyway, ZFS replication is almost certainly the better way to go:
  • zfs snapshot trust2/tardis@migration
  • zfs send -v trust2/tardis@migration | zfs recv trust3/dataok
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
The GUI is virtually identical from 9.3 through 11. But I don't think the web GUI's rsync support is really designed to handle local copying in any event; this is something that would likely be best done through the CLI. And if you're at the CLI anyway, ZFS replication is almost certainly the better way to go:
  • zfs snapshot trust2/tardis@migration
  • zfs send -v trust2/tardis@migration | zfs recv trust3/dataok

That would work, but I have a question for you @danb35 (or more than one :) ):

1 - Assume what will create the new dataset don't exist (dataok in this case)?
2 - Assume that won't update FN database, so the GUI wont see it?
3 - if 2 = true -> create the dataset with the GUI first?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
IIUC, replication must go into an existing dataset, and no, ZFS won't create the destination dataset if it doesn't already exist. I believe that moots questions 2 and 3.
 

dirkme

Contributor
Joined
Jul 19, 2017
Messages
162
IIUC, replication must go into an existing dataset, and no, ZFS won't create the destination dataset if it doesn't already exist. I believe that moots questions 2 and 3.

both datasets are created already: tardis and dataok
 

dirkme

Contributor
Joined
Jul 19, 2017
Messages
162
The GUI is virtually identical from 9.3 through 11. But I don't think the web GUI's rsync support is really designed to handle local copying in any event; this is something that would likely be best done through the CLI. And if you're at the CLI anyway, ZFS replication is almost certainly the better way to go:
  • zfs snapshot trust2/tardis@migration
  • zfs send -v trust2/tardis@migration | zfs recv trust3/dataok

Is there a way to do zfs replication through the Freenas GUI or any good solutuion, where I can use the Freenas gui?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Is there a way to do zfs replication through the Freenas GUI
It's possible, but (1) it's far more complicated than it needs to be, as the devs don't seem to think anyone cares about local replication (https://bugs.freenas.org/issues/23784), and (2) it's really designed for an ongoing periodic activity, rather than a one-time transfer of data.
 

dirkme

Contributor
Joined
Jul 19, 2017
Messages
162
[QUOTE=" it's really designed for an ongoing periodic activity, rather than a one-time transfer of data.[/QUOTE]

I would want it as a periodic activity, I might have to use syncthing to get the process automated.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If you want it as a regular thing, just set up a replication task as described in the manual. It remains more complicated than necessary, but the manual describes it pretty thoroughly. You'll just use your one FreeNAS installation as both ends of the replication task.
 

maydo

Contributor
Joined
Jan 9, 2017
Messages
159
rsync -av --progress --delete /mnt/trust2/tardis/* /mnt/trust3/dataok

something like this would work, just be carefull with the options
 
Status
Not open for further replies.
Top