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

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

revision 241 by dpavlin, Fri Jun 11 12:39:11 2010 UTC revision 242 by dpavlin, Sun Feb 13 19:39:00 2011 UTC
# Line 11  exclude='--exclude var/cache --exclude v Line 11  exclude='--exclude var/cache --exclude v
11    
12  test -d $log || mkdir $log || exit  test -d $log || mkdir $log || exit
13    
14  function rsync_veid() {  rsync_veid() {
15          ssh $from "umount /mnt/backup/$2 ; lvremove -f $vg/$2-backup"          ssh $from "umount /mnt/backup/$2 ; lvremove -f $vg/$2-backup"
16          ssh $from "sync && sync && lvcreate -s -L 10G -n $2-backup $vg/$2 && mount $vg/$2-backup /mnt/backup/$2" || exit          ssh $from "sync && sync && lvcreate -s -L 10G -n $2-backup $vg/$2 && mount $vg/$2-backup /mnt/backup/$2" || exit
17          test -d /$pool/backup/$1 || zfs create $pool/backup/$1 || exit          test -d /$pool/backup/$1 || zfs create $pool/backup/$1 || exit

Legend:
Removed from v.241  
changed lines
  Added in v.242

  ViewVC Help
Powered by ViewVC 1.1.26