/[sysadmin-cookbook]/recepies/zfs/zfs-send-snapshot.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /recepies/zfs/zfs-send-snapshot.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 113 by dpavlin, Thu Jun 18 12:56:56 2009 UTC revision 114 by dpavlin, Thu Jun 18 13:07:29 2009 UTC
# Line 10  nopool=`echo $fs | cut -d/ -f2-` Line 10  nopool=`echo $fs | cut -d/ -f2-`
10    
11  ip=`ifconfig | awk '/inet addr/ {split ($2,A,":"); print A[2]}' | grep -v 127.0.0.1 | head -1`  ip=`ifconfig | awk '/inet addr/ {split ($2,A,":"); print A[2]}' | grep -v 127.0.0.1 | head -1`
12    
13  echo -e "\n\nStart receiving side with:\n\nnc -w 5 $ip 8888 | dd_rescue - - | zfs receive \`hostname\`/$nopool\n\n"  echo -e "\n\nStart receiving side with:\n\nnc -w 5 $ip 8888 | dd_rescue -y 0 - - | zfs receive \`hostname\`/$nopool\n\n"
14    
15  zfs send $fs | dd_rescue - - | nc -l -p 8888  zfs send $fs | dd_rescue -y 0 - - | nc -l -p 8888

Legend:
Removed from v.113  
changed lines
  Added in v.114

  ViewVC Help
Powered by ViewVC 1.1.26