08-17-2016, 12:17 PM
(08-17-2016, 09:52 AM)sdf_iain Wrote:(08-14-2016, 06:33 PM)MarkHaysHarris777 Wrote: Another tip, you can backup the SD card by reversing the burn process. Once I get my SD cards working the way I want them to I use the DD command to write the card back out to my image server. If I blow a card I'm back up and running without a hitch in about twenty minutes.
I'm not sure I can write a card in 20 minutes, but I might do that.
The way you do it in twenty minutes is by only writing what needs to be written. In addition to compressing, you also only write a 'smaller' partition size. Before I store the card I use tar (via standard in standard out) to write the contents of the rootfs to a smaller partition size; then I compress | DD that !
tar -cvf - -C <directory> <subdirectory> | tar -xvf -
That command will pass the tar through stdin | stdout and will preserve all the permissions to boot. So you can put your 32Gb partition into a 6Gb space (or whatever) and not have to write out an entire 32Gb SD card.
When you restore the card, you of course need to expand the partition size (either with lennyraposo's resize_rootfs.sh script , or with gparted )
marcushh777
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )
please join us for a chat @ irc.pine64.xyz:6667 or ssl irc.pine64.xyz:6697
( I regret that I am not able to respond to personal messages; let's meet on irc! )