10-01-2006, 12:43 AM
I just got back from a Linux class and one of the tools that I learned about was a command called "dd" for "data dump" I think. It makes a byte-wise dump of an entire drive partition, directory, or file. To test it on my laptop, I booted an Ubunu live CD and made an copy of my Ubuntu partition on the laptop and copied it to an external USB drive. The command is:
sudo dd if=/dev/hda2 of=/dev/sda2
This will copy the second partition of my laptop drive to the second partion of my external drive. It works for any partition, any file format, as it is a byte-by-byte copy from one to the other. This works fine, except that you need to have the machine or drive unmounted so that the data is not in use while it is being copied. The 'if' and 'of' stand for "input file" and "output file".
Next I'm going to play with rsync. rsync will mirror directories accross a network to a different computer. When copying data, rsync compares the source and target directory and transfers only data that has changed or been created since the last rsync process. In theory, you could create a "ring" of friends and use each others computers as off-site storage for important data.
This stuff is probably old news to the linux and unix gurus, but it is exciting for me. I've been trying to figure out how to make an image of my Asterisk PBX for about 10 months and no one could/would explain it to me. I think that I may finally have a solution.
sudo dd if=/dev/hda2 of=/dev/sda2
This will copy the second partition of my laptop drive to the second partion of my external drive. It works for any partition, any file format, as it is a byte-by-byte copy from one to the other. This works fine, except that you need to have the machine or drive unmounted so that the data is not in use while it is being copied. The 'if' and 'of' stand for "input file" and "output file".
Next I'm going to play with rsync. rsync will mirror directories accross a network to a different computer. When copying data, rsync compares the source and target directory and transfers only data that has changed or been created since the last rsync process. In theory, you could create a "ring" of friends and use each others computers as off-site storage for important data.
This stuff is probably old news to the linux and unix gurus, but it is exciting for me. I've been trying to figure out how to make an image of my Asterisk PBX for about 10 months and no one could/would explain it to me. I think that I may finally have a solution.