Results 1 to 3 of 3
I've backed up a LVM share via dd: dd if=/dev/mapper/VolGroup-lv_root | bzip2 >VolGroup-lv_root.dd.bz2 Can I restore the image to a different directory, eg: bunzip2 VolGroup-lv_root.dd.bz2 | dd of=backup/ so I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-22-2011 #1
- Join Date
- Apr 2006
Restoring dd Image
dd if=/dev/mapper/VolGroup-lv_root | bzip2 >VolGroup-lv_root.dd.bz2Can I restore the image to a different directory, eg:
bunzip2 VolGroup-lv_root.dd.bz2 | dd of=backup/so I can extract and restore certain files?
Can I restore it into the root directory of the live running system that it was backed up from,eg:
bunzip2 VolGroup-lv_root.dd.bz2 | dd of=/dev/mapper/VolGroup-lv_root
- 06-23-2011 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
1. To pipe input/output to/from bzip2/bunzip2, you need to use the -c option.
2. Since you have copied the entire LVM device, you probably cannot just restore it somewhere else, other than perhaps a raw partition that has adequate space.
3. If you uncompress the image, you may be able to mount it as a loop device and access individual files that way.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-24-2011 #3
I made a decently comprehensive intro to dd here. It may help you with your backup stuff.
What rubberman was talking about is a command like this:
#dd if=/dev/sdX bs=64k conv=noerror,sync | gzip -c -9 > sdX.img.gz
Restoring that would be something like:
#gunzip -c sdX.img.gz | dd of=/dev/sdX conv=sync,noerror bs=64K
You can specify any path, file, or storage device instead of sdX. If you specify a file you can then do something like:
# mkdir loopedMount
# mount -o loop sdX.backup loopedMount/
This would allow you to peruse those files as if they were on a physical disc mounted to that directory.