LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   image bakup (https://www.linuxquestions.org/questions/linux-general-1/image-bakup-575126/)

Ammad 08-06-2007 11:55 AM

image bakup
 
i want to backup using dd to create image file, and to restore it on another linux system like ghost.
is it possible to image / and /var using dd ?
thanks

saikee 08-06-2007 12:39 PM

Use tar better

You should also do it with a Linux not using / because you can be copying all the mounted partitions!

Say using a Live CD. Your source / is in sda3 and the target is in sde9, assuming you have formatted sde9 to the filing system of your choice. These are commands run at root console

Code:

mkdir /mnt/sda3
mkdir /mnt/sde9
mount /dev/sda3 /mnt/sda3
mount /dev/sde9 /mnt/sde9
cd /mnt/sda3
tar cf - . |  (cd /mnt/sde9; tar xf -)

The complete partition of / will be found in sde9.

If you use dd you have to make sure the size matches up. With tar you don't have to bother about the size.


All times are GMT -5. The time now is 09:07 AM.