JonathanGiles / jonathangiles.net-comments

0 stars 0 forks source link

posts/2013/scheduled-backups-for-raspberry-pi-to-a-nas/index #168

Open JonathanGiles opened 4 years ago

JonathanGiles commented 4 years ago

Scheduled backups for Raspberry Pi to a NAS

https://jonathangiles.net/posts/2013/scheduled-backups-for-raspberry-pi-to-a-nas/

JonathanGiles commented 4 years ago

Auto-imported comment, original author: Ben Comment posted on: September 18, 2013

Nice one Jonathon - fancy adding some details about how you restore an image to an SD card in the case of a card dying?

JonathanGiles commented 4 years ago

Auto-imported comment, original author: Gerrit Comment posted on: September 18, 2013

Very nice, thanx for sharing :)

JonathanGiles commented 4 years ago

Auto-imported comment, original author: Jonathan Comment posted on: September 18, 2013

Very simple:

1) Because the file being created is a gzipped file, you firstly need to unzip it. You can do this with <code>gzip -d filename.gz</code>

2) You'll end up with a .img file, and then you can follow the usual instructions for writing to an SD card. The Raspberry Pi website has <a href="http://www.raspberrypi.org/downloads&quot; rel="nofollow">useful instructions here</a> (look under 'Raw Images').

3) Put the SD card into the Pi and start it up.

For future reference, here is the text from the Raspberry Pi website:

To use an image file, you will need to unzip it and write it to a suitable (2GB or larger) SD card using the UNIX tool <a href="http://en.wikipedia.org/wiki/Dd_(Unix)&quot; rel="nofollow">dd</a>. Windows users should use <a href="http://sourceforge.net/projects/win32diskimager/&quot; rel="nofollow">Win32DiskImager</a>. Do not try to drag and drop or otherwise copy over the image without using dd or Win32DiskImager – it won’t work. If you’re still not clear on what to do, the community on the Raspberry Pi Wiki has written a <a href="http://elinux.org/RPi_Easy_SD_Card_Setup&quot; rel="nofollow">guide for beginners</a> on how to set up your SD card.

JonathanGiles commented 4 years ago

Auto-imported comment, original author: David Comment posted on: September 18, 2013

Don't you run the risk of getting a corrupted image if a process on the Pi writes to the card while dd is reading it? You're reading whatever bytes happen to be in the block whenever dd gets to them. Maybe not an issue with sd cards.