Advertisement
Guest User

backuproot

a guest
Dec 31st, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement