Accessing raw dd images in a Docker Linux container
I was backing up a Linux server of mine the other day and I wanted to have a full backup (along with regular tar.gz backups) of the main disk mounted on the /dev/sda partition. You can backup your partition using dd with a command such as dd if=/dev/sda | dd of=/home/archive/disk.img If everything works, you will get an output similar to below:
1 2 3 |
4096000+0 records in 4096000+0 records out 2097152000 bytes (2.1 GB) copied, 371.632 seconds, 5.6 MB/s |
I was then looking to mount that backup raw image in order to check if everything was OK. You can do that by using the loop device in Linux. A loop device is a pseudo (“fake”) device (actually just a file) that acts as a block-based device1. My main OS is Windows and I did not have access to a Linux…
Read more