On 3/23/17 11:11 AM, Harry Putnam wrote:
This is my first actual usage of send/receive.  I see the examples
given here:

      https://docs.oracle.com/cd/E18752_01/html/819-5461/gbchx.html#gbinw

   host1# zfs send tank/dana@snap1 | ssh host2 zfs recv newtank/dana

Note the `#' sign .. so root is sending, however in all of my installs,
unless measures are taken to defeat the defaults, root cannot login to
a solaris host.

So using the formula above leads to the root passwd not being
accepted.

I attempted to insert the sudo command like so:

    # zfs send tank/dana@snap1 | ssh USER@host2 sudo zfs recv newtank/dana

But the sudo is rejected for lack of a tty.

So how is this normally accomplished.  Does one have to setup a normal
user in some way (I mean besides setting USER role=root) or steps
taken with ssh like some kind of non passwd login?


1. make sure ssh allows root logins
jason@heimdall:/tmp# grep PermitRoot /etc/ssh/sshd_config
PermitRootLogin yes

2. Make sure root is a normal account
root@heimdall:/tmp# rolemod -K type=normal root

After these two steps you should be able to login as root.

3. If you dont _need_ the data encrypted then dont use ssh. It makes things go slow :)
    On the LAN I prefer to use mbuffer

on the sending side:
zfs send tank/dana@snap1 | mbuffer -s 128k -m 1000m -O target_host:31337

on the receiving side:
mbuffer -s 128k -m 1999m -I 31337 | zfs recv -vFd newtank

If you want compression, which i recommend unless you mostly sending uncompressible data you can try:

sender:
zfs send tank/dana@snap1 | tamp | mbuffer -s 128k -m 1000m -O target_host:31337

receiver:
mbuffer -s 128k -m 1999m -I 31337 | tamp -d | zfs recv -vFd newtank


And that's how I do that :)
Consider making the -s value for mbuffer match your zfs recordsize.
I am not sure if tamp is in the hipster repo. Joyent has it. It originated here in 2008 https://blogs.oracle.com/timc/entry/tamp_a_lightweight_multi_threaded

Best,
j.


_______________________________________________
openindiana-discuss mailing list
[email protected]
https://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to