Avatar billede ritajtaylor Nybegynder
19. april 2007 - 05:12 Der er 4 kommentarer og
1 løsning

Using dd

Can you give me the exact command using dd or cp to copy data from a disk with possibly tretabytes of information? The disk to copy information from is /file1/a which is mounted as /dev/sda1 on server1 and the disk to transfer the information is empty and unmounted as file or directory /file3/a on a device I don't know on server3? What speed to I need to transfer the data and do I mount the two disks on server3?
Avatar billede jazzjack Nybegynder
19. april 2007 - 09:20 #1
# dd --help

For more options check dd man page

Using dd you can create backups of an entire harddisk or just a parts of it. This is also usefull to quickly copy installations to similar machines. It will only work on disks that are exactly the same in disk geometry, meaning they have to the same model from the same brand.



Full hard disk copy:

dd if=/dev/hdx of=/dev/hdy
dd if=/dev/hdx of=/path/to/image
dd if=/dev/hdx | gzip > /path/to/image.gz

Hdx could be hda, hdb etc. In the second example gzip is used to compress the image if it is really just a backup.



Restore Backup of hard disk copy:

dd if=/path/to/image of=/dev/hdx

gzip -dc /path/to/image.gz | dd of=/dev/hdx



Master Boot Record (MBR) backup:

In order to backup only the first few bytes containing the MBR and the partition table you can use dd as well.

dd if=/dev/hdx of=/path/to/image count=1 bs=512



MBR restore:

dd if=/path/to/image of=/dev/hdx

Add "count=1 bs=446" to exclude the partition table from being written to disk. You can manually restore the table.

Hope this will do the trick for you.
Avatar billede ritajtaylor Nybegynder
19. april 2007 - 11:53 #2
Thank you jazzjack. I'll try this and get back to you. If it is not necessary to copy deleted files, is cp better?
Avatar billede ritajtaylor Nybegynder
19. april 2007 - 15:32 #3
I used cp and the job wasn't as hard as I thought. Tusind tak jazzjack for being there. You're an angel. Can I assign the points to you from here?
Avatar billede ritajtaylor Nybegynder
19. april 2007 - 15:32 #4
I'm trying something by turning off the Abonner maybe I can send you the points.
Avatar billede jazzjack Nybegynder
19. april 2007 - 19:24 #5
Guess it's the same problem. Just worte comments, no answers.Well here is an answer.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester