Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backup/restore instructions #1

Open
lucasrangit opened this issue Mar 17, 2015 · 2 comments
Open

Add backup/restore instructions #1

lucasrangit opened this issue Mar 17, 2015 · 2 comments
Assignees

Comments

@lucasrangit
Copy link
Contributor

Astutely observed by Adam, the entire OS, configuration, and applications for the Raspberry Pi are stored on the removable SD card, so backing it up is as simple as copying the SD card.

Participants should perform a regular backup of their SD card as they would version their code. This is especially useful for having a backup in the demo gods are not happy come demo day.

@lucasrangit
Copy link
Contributor Author

Testing using dd to read.

sudo dd bs=4M if=/dev/sdb | pv | gzip > rpi_backup-date +%Y%m%d.gz

Will also try ddrescue in case the flash media is starting to fail to read or write.

@lucasrangit
Copy link
Contributor Author

http://raspberrypi.stackexchange.com/questions/311/how-do-i-backup-my-raspberry-pi has some recommendations. And http://sysmatt.blogspot.com/2014/08/backup-restore-customize-and-clone-your.html has a script but it may assume a two partition layout whereas my RPi 2 has the following partition table after installing Raspbian using NOOBS and adding an expanded data partition.

$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 7892 MB, 7892631552 bytes
4 heads, 16 sectors/track, 240864 cylinders, total 15415296 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009fdca

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            8192     1673828      832818+   e  W95 FAT16 (LBA)
/dev/sdb2         1679360    15349759     6835200   85  Linux extended
/dev/sdb3        15349760    15415295       32768   83  Linux
/dev/sdb5         1687552     2736127      524288   83  Linux
/dev/sdb6         2744320     2867199       61440    c  W95 FAT32 (LBA)
/dev/sdb7         2875392    15349759     6237184   83  Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant