pastebin - collaborative debugging tool
phoenix.kpaste.net RSS


Kindle Backup Script Part 1
Posted by Phoenix on Mon 13th May 2013 04:27
raw | new post

  1. #!/bin/bash
  2. function sending (){
  3.   echo "Sending partition $1"
  4.   sleep 5
  5. }
  6.  
  7. sending 1
  8. dd if=/dev/mmcblk0p1|nc 192.168.15.201 31337
  9.  
  10. echo
  11.  
  12. echo "Skipping partition 2"
  13.  
  14. echo
  15.  
  16. sending 3
  17. dd if=/dev/mmcblk0p3|nc 192.168.15.201 31337
  18.  
  19. echo
  20.  
  21. sending 4
  22. dd if=/dev/mmcblk0p4|nc 192.168.15.201 31337
  23.  
  24. echo
  25.  
  26. echo "Creating MD5s"
  27. md5sum /dev/mmcblk0p1 | sed 's:/dev/::; s/$/.img/' > /tmp/backupmd5s
  28. md5sum /dev/mmcblk0p3 | sed 's:/dev/::; s/$/.img/' >> /tmp/backupmd5s
  29. md5sum /dev/mmcblk0p4 | sed 's:/dev/::; s/$/.img/' >> /tmp/backupmd5s
  30.  
  31. echo
  32.  
  33. echo "Sending MD5s"
  34. sleep 5
  35. cat /tmp/backupmd5s|nc 192.168.15.201 31337
  36.  
  37. echo
  38.  
  39. echo "Finished"

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at