aaronhurt / zfs-replicate

POSIX compliant shell script to manage ZFS snapshot replication locally, or between hosts.
69 stars 17 forks source link

Modification required in zfs list and send process #3

Closed patademahesh closed 10 years ago

patademahesh commented 10 years ago

First of all thanks a lot for the simple and smart script. I have made some changes to optimize the same process.

  1. Disable ssh ciphers to get more data transfer speed while sending snapshot to remote host.

To disable ciphers i have changed following in script:

REMOTE="ssh -c arcfour256,arcfour128,blowfish-cbc,aes128-ctr,aes192-ctr,aes256-ctr XXX.XXX.XXX.XXX zfs receive -vFd"

  1. List only respective volume snapshots while doing "zfs list". It makes sense if you have more number of ZFS dataset or volumes

local temps=$($ZFS list -Hr -o name -S creation -t snapshot -d 1 ${local_set})

./Mahesh

aaronhurt commented 10 years ago

Thank you, sorry for the delayed response. This should address your concerns: 1304d49997fa7558cf150278724116838b8fedc3

patademahesh commented 10 years ago

Hey,

There is one correction in zfs snapshot listings command. Previous command is having some sorting issues.

local temps=$($ZFS list -t snapshot -d 1 ${local_set} | grep "${local_set}\@autorep-" | awk '{print $1}')

./Mahesh

aaronhurt commented 10 years ago

You're right, that should have been a small 's' ... fixed here: c6dc932ab7769e8b4b867909c2d5883b55b123b4