Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Stuff
Wednesday, May 16th, 2012 at 1:02:01pm MDT 

  1. #!/bin/sh
  2. for snapshot in `zfs list -H -t snapshot | awk '{print $1}' | grep ROADBACKUP1`
  3. do
  4. echo $snapshot
  5. zfs destroy $snapshot
  6. done
  7. for snapshot in `zfs list -H | awk '{print $1}' | grep ROADBACKUP1`
  8. do
  9. echo $snapshot
  10. zfs destroy $snapshot
  11. done
  12. for dataset in `zfs list -H | awk '{print $1}' | grep backupstorage`
  13. do
  14. if [ "$dataset" = "backupstorage" ]
  15. then
  16.    echo "Doing [$dataset]"
  17. else
  18.    for snapshot in `zfs list -H -t snapshot | awk '{print $1}' | grep $dataset`
  19.    do
  20.       toto=$snapshot
  21.    done
  22. echo "ZFS Sending $toto to ROADBACKUP1"
  23. tata=`echo $toto | sed 's/backupstorage\///g' | sed 's/@/_/g'`
  24. zfs send $toto | zfs receive ROADBACKUP1/$tata
  25. fi
  26. done

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
fantasy-obligation