9/20/2023 0 Comments Archive mounter linuxAdjust accordingly for your system if you want to image a different device or partition. Where sda is the name of the device, and 1 is the partition number. Sudo dd if=/dev/sda1 of=image/sda1_backup.img bs=4M If you're imaging an entire disk then you will want to wash each of the partitions on the disk.ĬAUTION: Be careful, you want to set the of to a file in the mounted partition, NOT THE PARTITION ITSELF! mkdir image_sourceĭd if=/dev/zero of=image_source/wash.tmp bs=4M If the disk is in good working condition, you will get better compression if you wash the empty space on the disk with zeros. It depends on whether the disk image is a full disk image, or just a partition. Would using AVFS to 'mount' the gz file then mounting the internal dd.img work (I don't think so. but this isn't my case.Īny suggestions for mounting the compressed img on the fly? Normally, one wouldn't compress the dd image, which will allow you to just mount the image using -o loop. ![]() Let's say I don't have the storage space to actually unzip and dd the image to a drive but want to mount the image to get individual files off of it. Lets say I do the above but not on a clean system and don't get the rsync backups going soon enough and there are files that I want to access that are on the image. ![]() This is really straightforward and allows me to save the 'whole drive' but really just save the used space. ![]() To put the system back to normal, I will usually do a gzip -dc /mnt/sda1/ | dd of=/dev/hda conv=sync,noerror bs=64K Umount and dd the drive while compressing it dd if=/dev/hda conv=sync,noerror bs=64K | gzip -c > /mnt/sda1/ Mount and zero out the empty space: dd if=/dev/zero of=temp.dd bs=1M After this first time I use rsync to do incremental backups. I like to create an image backup the first time I'm backing up a system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |