CLI Replication and specify port

Status
Not open for further replies.

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
I'm trying to find out why my replication fails and so i'm trying the "zfs send" command. With default ports 22 it works, but i wan't to specify a different port.

How?

Also, only one of my two NAS reports when a replication fails. Never the other. Even though it does fail from that one (at least no snapshots appear on the other side) and i do get the security logs from it wich means email is configured correct.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
I'm trying to find out why my replication fails and so i'm trying the "zfs send" command. With default ports 22 it works, but i wan't to specify a different port.
Pipes are your friend.
 

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
Pipes are your friend.

Right... but how? :) And thanx for the last time paleoN!

Example:
zfs send repl01/Lagring@auto-20121129.0100-1w | ssh -i /data/ssh/replication mydnsname.com zfs receive vol01/Lagring@auto-20121129.0100-1w

How do i set port? I tried "mydnsname.com:portnumber" and "mydnsname.com portnumber"
but no luck. It goes for the default 22.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
Right... but how? :)
OK, you know to use pipes, but you aren't understanding what they do? Your problem is an SSH problem and has nothing to do with zfs send. The zfs send command sends to standard output, the pipe redirects that to SSH and SSH does what you tell it. See the SSH man pages.
 

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
Well... i'm sort of new to it... snagged that command from some example :)
Anyway i got it working. Had to delete all snapshots and the dataset on PULL. Then auto replication functioned :)

Thanx for the link! I now also manage to manually replicate through alternative port! :cool:
 
Status
Not open for further replies.
Top