LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   backup a 8gb pendrive for a small size image? (https://www.linuxquestions.org/questions/linux-general-1/backup-a-8gb-pendrive-for-a-small-size-image-4175538180/)

Xeratul 03-29-2015 04:17 PM

backup a 8gb pendrive for a small size image?
 
Hello,

I have created a damnsmallinux pendrive, which is bootable.
dsl uses syslinux to boot and holds on 50 mb only.

I would like to backup my pendrive using linux.

Code:

dd if=/dev/sdb of=image-dsl-bootable.img
works but it is very long and is of about 8gb.

Which alternative would you propose?

(I haven't syslinux installed and wont install it)

Looking forward to hearing your ideas.

Thank you!

suicidaleggroll 03-29-2015 08:14 PM

If you gzip the image it should drop to the size of the used space, provided everything else is just zero (if not, mount the drive and use dd if=/dev/zero of=/path/to/mount/point/zerofile.bin, and then when it finishes delete zerofile.bin, unmount, and redo your dd backup).

syg00 03-29-2015 09:06 PM

Better to not copy the unwanted data in the first place as the OP is complaining about time. Simply add a "count" keyword to the dd - make sure you get all the relevant data.

jefro 03-30-2015 04:38 PM

If you simply want a backup of the drive a file by file method may be better. Many file by file ways exist from tar to clonezilla to gparted to parted.

syslinux is easy to replicate on windows or linux by the way. No need to worry about it, just sometimes the version level. Very small footprint.

You can compress the image with a compression level of 9 if you wish in the same dd command. It will take longer.

If your drive saves data to a folder or part of the usb and the rest is static then just save the user data.


All times are GMT -5. The time now is 03:30 PM.