Rücksichern eines DD Images über SSH

Backup, Restore und Transfer von Daten
Post Reply
tsaenger
Posts: 426
Joined: 2003-08-13 01:14
 

Rücksichern eines DD Images über SSH

Post by tsaenger »

Hallo,
Ich habe mir ein Image mittels DD erstellt und es auf nem Anderen Rechner liegen.
Nun würde ich gerne wissen, ob es irgendwie auch möglich ist über das Netzwerk das Image auf dem Server wieder rückzusichern.
Mittels:

Code: Select all

dd if=/dev/hda1 | gzip -9 > /home/boot.hda1
habe ich das image erstellt und auf nen anderen Rechner kopiert.

Wie kann ich die File nun wieder zurück auf meinen Server entpacken? Der Rechner auf dem es entpackt werden soll befindet sich mom. im Rescuemodus!


Gruß

Tobias[/code]
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: Rücksichern eines DD Images über SSH

Post by captaincrunch »

Code: Select all

zcat /home/boot.hda1 | ssh root@zielhost > /dev/hdaX
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
hornox
Posts: 139
Joined: 2005-09-22 23:09
 

Re: Rücksichern eines DD Images über SSH

Post by hornox »

Code: Select all

zcat /home/boot.hda1 | ssh root@zielhost dd of=/dev/hda1
Wie kann ich die File nun wieder zurück auf meinen Server entpacken?
Solche Fragen sollte man sich schon vor dem Backup stellen.


@CaptainCrunch: Dein Befehl leitet die Standardausgabe von ssh auf die lokale Datei /dev/hdaX um und auf dem Server probiert die Shell die Bootpartition als Befehl auszuführen.
tsaenger
Posts: 426
Joined: 2003-08-13 01:14
 

Re: Rücksichern eines DD Images über SSH

Post by tsaenger »

Hallo,


ich bekomme da folgende Fehlermeldung:

Code: Select all

stdin: is not a tty
-bash: ëH·úêP: command not found
-bash: 1��м: command not found
-bash: ÿtÃ?R¾v}è4ößtT´AȻUÍZRrIûUªuC A: No such file or directory
-bash: 
       �uát7fL¾: command not found
-bash: �DÿfD: command not found
-bash: Ã?Ã?DÃ?Dpf1Ã?DfD
                   ´BÍr»pë}Ís: command not found
-bash: öß  ¾: command not found
-bash: �Dÿf1�ð@fD1��Áâèô@1�Ð�èff¡D: command not found
-bash: f1�f÷4T: command not found
-bash: f1�f÷tT
              D
               : command not found
�âL: No such file or directory
-bash: line 4: unexpected EOF while looking for matching ``'
-bash: line 5: syntax error: unexpected end of file
tds-media:/backup # VT102VT102VT102VT102

Gruß

Tobias
hornox
Posts: 139
Joined: 2005-09-22 23:09
 

Re: Rücksichern eines DD Images über SSH

Post by hornox »

ich bekomme da folgende Fehlermeldung:[...]
Auch bei meiner Variante?
tsaenger
Posts: 426
Joined: 2003-08-13 01:14
 

Re: Rücksichern eines DD Images über SSH

Post by tsaenger »

Hallo,

Sorry. Nee deine Variante hat funktioniert.
Ich habe nun nur noch folgendes Problem:
Wenn ich so das Image meines MBRs rücksichere, dann bekomme ich ne Fehlerhafte Partitionstabelle.
Richtig sollte sie so aussehen:

Code: Select all

server1:/boot # fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 5005 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1        33    265041   83  Linux
/dev/hda2            34        66    265072+  82  Linux swap
/dev/hda3            67      5005  39672517+  83  Linux
sie sieht aber so aus:

Code: Select all

rescue:~# fdisk -l

Disk /dev/hda: 16 heads, 63 sectors, 79780 cylinders
Units = cylinders of 1008 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1       526    265041   83  Linux
Partition 1 does not end on cylinder boundary:
     phys=(32, 254, 63) should be (32, 15, 63)
/dev/hda2           526      1052    265072+  82  Linux swap
Partition 2 does not end on cylinder boundary:
     phys=(65, 254, 63) should be (65, 15, 63)
/dev/hda3          1052     79768  39672517+  83  Linux
Partition 3 does not end on cylinder boundary:
     phys=(1023, 254, 63) should be (1023, 15, 63)
Woran kann das liegen? Es sind beides die selben HDD's.

Gruß

Tobias
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: Rücksichern eines DD Images über SSH

Post by captaincrunch »

Woran kann das liegen?
An der unterschiedlichen Diskgeometrie.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
tsaenger
Posts: 426
Joined: 2003-08-13 01:14
 

Re: Rücksichern eines DD Images über SSH

Post by tsaenger »

Hallo,
und wie kann ich das Problem beheben?

Gruß

Tobias
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: Rücksichern eines DD Images über SSH

Post by captaincrunch »

Indem du Backups über geeignete Mittel anfertigst.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Post Reply