![]() ![]() Now if the SD card goes bad I can ungzip the latest image on the HDD and burn it to a new SD card and not have to rebuild the Plex server. 0 2 * * 0 /path/to/script/bakup_sdcard.sh > /dev/null 2>&1 I automated the script to backup once a week by adding a Cron Job that runs on Sundays at 2AM. # dd if=/dev/zero of=/dev/mmcblk0/disk_zero_fill.tmp bs=8M rm -f /dev/mmcblk0/disk_zero_fill.tmpĭd bs=8M if=/dev/mmcblk0 conv=sync,noerror | "gzip > /path/to/usbdrive/pi_image_bkup.$ ![]() # this step it will reduce the lifespan of the SD card # remove # in front of line below enable this function # consider zeroing unused space before imaging. I then copied the entire drive to an image and compressed it, by creating an executable script.īakup_sdcard.sh #įind /path/to/usbdrive/pi_image_bkup.*.img.gz -type f -mtime +21 exec rm \ dd if=/dev/zero of=/tmp/disk_zero_fill.tmp bs=8M rm -f/tmp/disk_zero_fill.tmp I followed the instructions from GrammatonCleric on the Ubuntu Forums.įilled the SD card with zeros because when I compress the image it will shrink down considerably. I additionally set up a backup script for the SD card since I have had them go bad in the past.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |