About dd backup-Linux general technology-Linux technology and application information, the following is a detailed description. Dd backup Problems
Hello everyone! I tried it with dd this evening and it was unsuccessful. Please help me to see it.
My system is just done, and the partition is automatically divided by the system.
[Root @ localhost ~] # Df-h This Is My partition information
Filesystem Size Used Avail Use % Mounted on
/Dev/mapper/VolGroup00-LogVol00 logical volume Partition
3.1G 2.6G 361 M 88%/
/Dev/sda1 99 M 13 M 82 M 14%/boot Partition
None 113 M 0 113 M 0%/dev/shm
Manually add a hard disk as/dev/hda (test with virtual machine)
Device Boot Start End Blocks Id System
/Dev/hda1 1 100 50368 + 83 Linux (newly added)
/Dev/hda2 101 8322 4143888 83 Linux (newly added)
Disk/dev/sda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 13 104391 83 Linux
/Dev/sda2 14 522 4088542 + 8e Linux LVM
/Dev/hda1,/dev/hda2 is the newly added partition and mkfs. ext3/dev/hda1,/devhda2
[Root @ localhost ~] # Df-h
Filesystem Size Used Avail Use % Mounted on
/Dev/mapper/VolGroup00-LogVol00
3.1G 2.6G 361 M 88%/
/Dev/sda1 99 M 13 M 82 M 14%/boot
None 113 M 0 113 M 0%/dev/shm
[Root @ localhost ~] # Dd if =/dev/sda1 of =/dev/hda1
Dd: writing to '/dev/hda1': No space left on device
100738 + 0 records in
100737 + 0 records out
I used/dev/hda1 to back up/dev/sda1. The system prompts: the device on the right has no space (do not know what the problem is ?)
[Root @ localhost ~] # Rm-rf/boot/* Delete All/boot content
[Root @ localhost ~] # Dd if =/dev/hda1 of =/dev/sda1 restore with dd
100737 + 0 records in
100737 + 0 records out
So I restarted my computer and found that the system could not mount the/boot directory, but the system was able to start successfully.
Login as: root (after system restart)
Root@192.168.100.111's password:
Last login: Mon Jan 14 15:24:58 2008
[Root @ localhost ~] # Df-h: Check the partition information for the next time. The sending boot is unavailable.
Filesystem Size Used Avail Use % Mounted on
/Dev/mapper/VolGroup00-LogVol00
3.1G 2.6G 361 M 88%/
[Root @ localhost ~] # Mount/dev/hda1/boot (manual)
[Root @ localhost ~] # Cd/boot
[Root @ localhost boot] # ls
Config-2.6.9-42.EL lost + found System. map-2.6.9-42.ELsmp
Config-2.6.9-42.ELsmp memtest86 +-1.26 vmlinuz-2.6.9-42.EL
Grub message Co., vmlinuz-2.6.9-42.ELsmp.
A initrd-2.6.9-42.EL.img message. ja
Initrd-2.6.9-42.ELsmp.img System. map-2.6.9-42.EL
After you manually mount the boot file, the content in the file is restored, but the/boot directory cannot be automatically mounted every time the system restarts.
Which of the following friends knows this is a problem ??
The problem is not over yet! I used/dev/hda2 to back up/dev/sda2.
Device Boot Start End Blocks Id System
/Dev/hda1 1 100 50368 + 83 Linux
/Dev/hda2 101 8322 4143888 83 Linux
Disk/dev/sda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 13 104391 83 Linux
/Dev/sda2 14 522 4088542 + 8e Linux LVM this is an lvm volume
# [Root @ localhost boot] # dd if =/dev/sda2 of =/dev/hda2
8177085 + 0 records in
8177085 + 0 records out
[Root @ localhost boot] # mkdir/test
[Root @ localhost boot] # mount/dev/hda2/test
Mount: you must specify the filesystem type.
Let me specify the file system. I have formatted it as ext3 ,??
[Root @ localhost usr] # dd if =/dev/hda2 of =/dev/sda2 and then use the dd command to restore
Dd: writing to '/dev/sda2': No space left on device
The result is that the content is recovered in the/etc/and/usr directories, that is, I don't know if it can be used. Please try again after I restart.
The system is so angry that it cannot be automatically mounted to the/boot directory.
Dear Elders, can you help me see what's wrong ??
In the past, if there was a problem with the old windows system, ghost would be okay.
But linux does not have a ghost. I would like to ask, how do I do a full backup during normal work?
Is dd used? That is to say, when the system is really angry and needs to be restored through full backup, what method is the safest?
Or back up important configuration files and data. When the system cannot be recovered, reload the system directly,
Then, run the important configuration and data cp into it ????
Which of you can give me some work experience in this area? The younger brother is really confused here, so it takes a long time to study backup,
Because the technology is not good, but the backup is usually done, once the system has problems, it can be restored at least to the bottom!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service