I have a RHEL5 Amazon cloud instance that I need to image to another instance in order to setup a test environment for some upcoming patching I'm doing. The server to be imaged is a production server.
The server has a single disk (xvda1, and yes the actual disk is xvda1, not xvda like it should be).
I thought I would use dd, piped to gzip, to make the image of the disk. But then I realized that there would be a problem with recursion. Because dd was reading from the disk that the gzip was being written to, the image would include a corrupted copy of the gzip file, meaning that the image itself was taking up more space than it needed to because of the partial copy of the gzip file, and thusly there would be more transfer time between the machines required.
Getting to the point, what options are there for backing up the entirety of the disk as a single block dump, the same way dd does, but that would not include the gzip file that is being written to on the same disk being read from?
Yes, I could rsync individual files, but for the purposes of this question, let's say that's not an option. Let's also say asking Amazon to add a second disk to the instance is not an option, nor are remote filesystems like NFS/SSHFS/etc, nor is LVM.