I've installed OpenWrt on a 32GB Micro SDHC card which has 30GB of free disk space after installing and configuring OpenWrt. If I try to backup the card using 'dd' it will create a 32GB file. Can anyone suggest a more efficient way of backing up the card?
Pipe it through gzip or another compression utility.
rsync / rsnapshot
tar to a different filesystem (such as
/tmp/ if its not the same device and has sufficient space).
Thanks for the suggestions, but what I'm really after is a means of recreating the required partitions on a device which has OpenWrt installed, rather than the actual data/confguration, so that I could easily move the installation to a different device if I wanted.
dd piped into
You might want to dd /dev/zero into a file to fill up most of the filesystem before you dd the flash drive and compress it. Large files full of zeros will be easily compressible