/[sysadmin-cookbook]/recepies/zfs/zfs-snapshot-to-ve.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-snapshot-to-ve.sh

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

revision 108 by dpavlin, Sat May 16 12:35:09 2009 UTC revision 109 by dpavlin, Sat Jun 6 16:57:37 2009 UTC
# Line 1  Line 1 
1  #!/bin/sh -x  #!/bin/sh -x
2    
3  veid=60017  veid=60018
4    
5  fs=`zfs list | grep @ | iselect -t 'select snapshot to clone' -a | sed 's/ .*$//'`  fs=`zfs list | grep @ | iselect -t "select snapshot to clone into $veid" -a | sed 's/ .*$//'`
6    
7  if [ -z "$fs" ] ; then  if [ -z "$fs" ] ; then
8          exit;          exit;
# Line 23  vzctl stop $veid && ( Line 23  vzctl stop $veid && (
23    
24  zfs clone $fs $pool/clone/$orig-$veid  zfs clone $fs $pool/clone/$orig-$veid
25    
26  vzctl start 60017  vzctl start $veid
27    
28  vzlist -a  vzlist -a

Legend:
Removed from v.108  
changed lines
  Added in v.109

  ViewVC Help
Powered by ViewVC 1.1.26