Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. dd if=/dev/sdx of=/path/to/image bs=1M
  2.  
  3. dd if=/dev/rdiskx of=/path/to/image bs=1m
  4.  
  5. dd if=/dev/sdx of=/path/to/image
  6.  
  7. dd if=/dev/sdx | gzip > /path/to/image.gz
  8.  
  9. dd if=/path/to/image of=/dev/sdx
  10.  
  11. gzip -dc /path/to/image.gz | dd of=/dev/sdx
  12.  
  13. cd ~/projects
  14. tar czvf your-raspberry-project-top-level-dir-v1.0.tgz
  15. ./your-raspberry-project-top-level-dir
  16. scp your-raspberry-project-top-level-dir-v1.0.tgz
  17. user@backup-host:/home/user/backups/
  18.  
  19. cd ~/projects/your-raspberry-project-top-level-dir
  20. make clean # Or clean it manually using rm (rm ./*.o ./*.pyc)
  21. git init # Create new repo here
  22. git add . # Add source files to the staging index
  23. git status # Verify if it's ok
  24. git commit -a -m "Initial import" # Fix application's source changes
  25. git add remote https://github.com/user/your-raspberry-project.git
  26. git push -u origin master # Sends the sources to your github repo
  27. git pull && git push && git status # Now origin/master is your tracking branch
  28.  
  29. ssh root@raspberrypi gzip -c /dev/mmcblk0 > img.gz
  30.  
  31. ssh root@raspberrypi dd if=/dev/mmcblk0 | gzip -c > img.gz
  32.  
  33. $ diskutil list
  34. /dev/disk0
  35. #: TYPE NAME SIZE IDENTIFIER
  36. 0: GUID_partition_scheme *500.1 GB disk0
  37. 1: EFI 209.7 MB disk0s1
  38. 2: Apple_HFS Macintosh HD 499.2 GB disk0s2
  39. 3: Apple_Boot Recovery HD 650.0 MB disk0s3
  40. /dev/disk1
  41. #: TYPE NAME SIZE IDENTIFIER
  42. 0: FDisk_partition_scheme *7.9 GB disk1
  43. 1: Windows_FAT_32 58.7 MB disk1s1
  44. 2: Linux 7.9 GB disk1s2
  45.  
  46. sudo dd if=/dev/rdisk1 of=/path/to/backup.img bs=1m
  47.  
  48. sudo dd if=/path/to/backup.img of=/dev/rdisk1 bs=1m
  49.  
  50. sudo dd if=/dev/rdisk1 bs=1m | gzip > /path/to/backup.gz
  51.  
  52. gzip -dc /path/to/backup.gz | sudo dd of=/dev/rdisk1 bs=1m
  53.  
  54. dd if=/dev/sdd of=yourbackupfilenamehere.dd
  55. tar zcvf yourbackupfilenamehere.dd.tar.gz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement