Want more features on Pastebin? Sign Up, it's FREE!
Guest

backuproot

By: a guest on Dec 31st, 2012  |  syntax: Bash  |  size: 0.31 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. # Mount /proc
  4. mount -t proc proc /proc
  5.  
  6. # mount destination
  7. mount -t ntfs-3g /dev/sdb5 /mnt/data
  8.  
  9. # backup root partition
  10. if [ $? ]; then
  11.         /usr/sbin/partimage -b -z1 -o -d -f3 -M save /dev/sda3 /mnt/data/backup/$HOST_backup
  12. else
  13.         echo "Could not mount /mnt/data!"
  14.         sleep 5
  15. fi
  16.  
  17. sync
  18. reboot -f
clone this paste RAW Paste Data