Howto Backup and Restore SD card image with tar and dd

Just my quick post today... I'm quite busy these days...



I normally backup my embedded system SD card image using dd and the output size will be 969M. To reduce the size, I'm using tar and gzip to compress the image file. Here is the command:

# dd if=/dev/sdd of=sd1gb.dd
$ tar zcvf sd1gb.dd.tar.gz


This way I will have the image in tar.gz file which is only 218MB. And delete the dd file.

However, to use the tar.gz, we don't have to extract the file because we can only use a single command like this:

# tar Ozxf sd1gb.dd.tar.gz | dd of=/dev/sdd


That's all for today... see u later!

Comments

Popular posts from this blog

How to Create Hyperlink on Blogger Post

How to Add a Sudo User on AlmaLinux 9.2 (Turquoise Kodkod): A Step-by-Step Guide

How to Check AlmaLinux Version on the Command Line: A Quick Guide