Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Backup/Restore
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Wed Aug 16, 2006 10:22 pm    Post subject: Backup/Restore Reply with quote

Hallo,


heute suche ich nach einer origniellen Backup- und Restorelösung.
Umfeld: 1 Windows XP-Kommpjutah und 1 Gentoo Fileserver

Um nerviges Neuinstallieren vom XP zu sparen will ich via Gentoo ein Backup vom XP-System ziehen das ich bei Bedarf über die Partition/Platte des XP-Rechners wieder draufbügeln kann.
Idealierweise läuft alles über den Fileserver, dummerweise geht das aber nicht, wenn auf dem XP-Rechner kein Betriebssystem mit Dateisystemfreigabe der Festplatte C läuft, also muss was anderes her.

Es bleibt mir wohl nur der Weg über eine Live-CD mit ein oder zwei Scripten und Samba/smbfs bzw. nfs.
Hat jemand dazu und zum weiteren Backup/Restorevorgang noch eine Idee oder Verbesserungsvorschläge?


Grüße
equinox
_________________
AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Wed Aug 16, 2006 10:36 pm    Post subject: Reply with quote

*keine direkte Supportfrage daher -> Diskussionsforum*

im allersimpelsten Fall (erst heute wieder mal getestet)

- XP-Kiste mit Linux-CD booten
- dd if=/dev/hda of=/mnt/backup/XP-Clone-Datum.bin

/mnt/backup war in dem Fall eine USB2-Platte; 40GB/30Min. Selbst so Schweinereien wie PointSec kommen damit problemlos klar nach einem Restore.

Übers Netz müßtest du 'nur noch' einen netcat mit einflechten, z.B. so:

XP (gebooted von Linux-CD natürlich):
dd if=/dev/hda | nc <ip linux> 12345
linux:
nc -l -p 12345 | dd of=/mnt/backup/XP-Clone-Datum.bin

Kreativ genug? :roll:

Du kannst das ganze natürlich noch verfeinern indem du dd->bzip2->netcat bzw. netcat->bzip2->dd machst, oder zusätzlich den Netzwerkverkehr noch verschlüsselst.
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Wed Aug 16, 2006 11:02 pm    Post subject: Reply with quote

Think4UrS11 wrote:
XP (gebooted von Linux-CD natürlich):
dd if=/dev/hda | nc <ip linux> 12345
linux:
nc -l -p 12345 | dd of=/mnt/backup/XP-Clone-Datum.bin


Zu dem Zeitpunkt ist der USB-Stick wieder am Linuxrechner oder?
Die Idee hatte ich ungefähr so auch:

Backup erstellen:
- C:\> via smbfs mounten (Freigabe muss da sein)
- dd vom "device" (//host/share) auf eine .bin-datei (sollte doch gehen oder?)
- umounten
-> geht alles per script

Restore einspielen:
- XP-Rechner mit modifizierter Live-CD booten (wie erstellt man sowas genau? s.u.)
- gespeichertes .bin-Image per NFS mounten und auf die lokale Festplatte dd'en
- Reboot ohne CD
-> geht auch per script

Dann die Live-CD:
Sowas hatte ich schonmal versucht, bin aber gescheitert.
Ich hatte die Minimal-install-CD gesaugt und entpackt (war noch sehr viel Voodoo dabei, wie genau weiss ich nicht mehr). Dann hatte ich was geändert, neu gepackt (auch mit viel Voodoo), gebrannt und die CD hat nicht gebootet.
Gibts dafür ne Anleitung?


Danke für weitere Ideen und Vorschläge
equinox
_________________
AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Wed Aug 16, 2006 11:21 pm    Post subject: Reply with quote

du bist viel zu umständlich ;)

du brauchst genau 1 Linux-CD/Stick; enthalten sein muß lediglich alles was für Netz nötig ist (dhcp client z.B.) und natürlich netcat+dd
Damit wird die XP-Kiste sowohl für Backup wie für Restore gebooted und verbleibt dort bis zum Ende dieses Vorgangs

Netzwerkbackup XP -> Linux
XP: dd if=/dev/hda | nc <ip linux> 12345
Linux: nc -l -p 12345 | dd of=/mnt/backup/XP-Clone-Datum.bin

Netzwerkrestore Linux -> XP
XP: nc -l -p 12345 | dd of=/dev/hda
Linux: dd if=/mnt/backup/XP-Clone-Datum.bin | nc <ip XP> 12345

Das einzige was zu beachten ist wäre das zuerst der nc -l ... gestartet sein muß und danach erst der nc <ip> <port> auf der anderen Seite angeworfen werden sollte.

/mnt/backup ist ein (ausreichend großes) Filesystem auf deiner Linuxmaschine in dem die Images abgelegt werden.
Ob du dir dafür jetzt eine spezielle eigene Linux-CD bastelst oder etwas fertiges wie Knoppix nimmst bleibt deinem Spieltrieb überlassen; ich nehme (typisch Admin, ergo faul) dafür eine Knoppix.
Auf Linuxseite gibt es für den Zweck einen alias und auf XP-Seiten tippe ich den Befehl schnell ein, sooo lang ist er ja auch nicht.

Spart dir jede Menge Aufwand mit NFS/CIFS und Gerümpel - in dem Fall ist das alles schlicht überflüssig und bremst nur.
Eine Anleitung für einen eigenen Linux-Stick gibt es z.B. hier: http://www.gentoo.org/doc/en/liveusb.xml
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself


Last edited by think4urs11 on Wed Aug 16, 2006 11:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Wed Aug 16, 2006 11:24 pm    Post subject: Reply with quote

das problem ist, dass das XP-Image gut und gerne 5GB haben wird. Abgesehen davon, dass ich keinen so großen austauschbaren Wechseldatenträger habe dauert das Kopieren von solchen Datenmengen auch noch Zeit und Zeit ist Geld ;)
_________________
AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Wed Aug 16, 2006 11:27 pm    Post subject: Reply with quote

equinox0r wrote:
das problem ist, dass das XP-Image gut und gerne 5GB haben wird. Abgesehen davon, dass ich keinen so großen austauschbaren Wechseldatenträger habe dauert das Kopieren von solchen Datenmengen auch noch Zeit und Zeit ist Geld ;)


Naja je nachdem wie schnell die Platte in deiner Linuxmaschine ist reden wir hier (100MBit-Netz) von knapp 10 Minuten für die 5GB... und wenn du wie bereits geschrieben noch einen bzip2 dazwischenklemmst kannst du ordentlich Luft rauslassen aus dem Image. (dafür dauert es ggf. etwas länger) - einen Tod mußt du sterben ;)

Und wieso Wechseldatenträger? Ich dachte du willst auf deinen Gentoo Fileserver sichern? Der wird ja wohl noch ein paar GB frei haben in irgendeinem Mountpoint.
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Thu Aug 17, 2006 2:55 pm    Post subject: Reply with quote

dann brauch ich mich doch aber gar nicht mit einer linux-cd rumschlagen, effektiver und schneller wäre dann wahrscheinlich eine partition auf der platte der XP-Kiste für ein Minigentoo freizuhalten und dann von dort aus alles zu backupen/restoren ..

odr?
_________________
AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Thu Aug 17, 2006 3:04 pm    Post subject: Reply with quote

klar, du mußt eben nur dafür sorgen das du an die Daten der Partition herankommst, möglichst ohne jegliche Störeinflüße (sprich Windows dazu zu booten).
Hat natürlich den Vorteil das du dieses Mini-Gentoo gleich so konfigurieren kannst das es alles automatisch macht und du mußt dich nicht damit herumschlagen eine eigene Live-CD zusammenzuschrauben.
Dann ist es wirklich nur noch ein 'boote XP-Kiste mit Mini-Gentoo + warten' - selbst das Starten von netcat auf dem Server kannst du vom Client aus fernsteuern. Superedel wäre natürlich dann das ganze vom Server aus anzustoßen incl. WakeOnLAN des XP/Mini-Gentoo-Clients ;)
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
equinox0r
l33t
l33t


Joined: 18 Feb 2004
Posts: 614

PostPosted: Thu Aug 17, 2006 4:27 pm    Post subject: Reply with quote

das gefällt mir dann schon viel besser :)

mir ist das mit netcat nicht so ganz klar, in welchem zeitlichen ablauf muss was wo geschehen?
nur wake-on-lan funktioniert aus technischen gründen leider nicht.

danke nochmal.
_________________
AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Thu Aug 17, 2006 4:33 pm    Post subject: Reply with quote

equinox0r wrote:
mir ist das mit netcat nicht so ganz klar, in welchem zeitlichen ablauf muss was wo geschehen?

Ganz simpel ausgedrückt muß netcat jeweils auf der Maschine zuerst laufen die Daten empfängt.
Im Fall Backup ist das der Linuxserver; im Fall Restore der XP-Client.
Welcher Befehl exakt wann/wo - siehe oben.
und da du ja nur eine Partition und nicht die gesamte Platte sichern willst ist jeweils 'hda' durch die passende Partition auszutauschen.
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
Masta Pete
Tux's lil' helper
Tux's lil' helper


Joined: 06 Dec 2004
Posts: 89
Location: /Europe/Austria/Vienna

PostPosted: Thu Aug 17, 2006 7:58 pm    Post subject: Reply with quote

Also alternative zu netcat, kann man auch ssh nehmen. und statt einer livecd ein pxe linux.

wenn man weis, wie es geht, geht es sogar mit gentoo ganz easy :lol:

lg
pete
_________________
Auftragsentwicklung
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Fri Aug 18, 2006 10:51 am    Post subject: Reply with quote

Oder ganz einfach:

partimage -> das hat einen Netzwerkmodus eingebaut. Man kann also einen partimage-Server starten und auf diesen sichern.
_________________
...it's only Rock'n'Roll, but I like it!
Back to top
View user's profile Send private message
Masta Pete
Tux's lil' helper
Tux's lil' helper


Joined: 06 Dec 2004
Posts: 89
Location: /Europe/Austria/Vienna

PostPosted: Fri Aug 18, 2006 12:43 pm    Post subject: Reply with quote

Ghost 4 Linux ist sogar schon eine fertige livecd, mit ncurses interface und partimage oben :)

lg
pete
_________________
Auftragsentwicklung
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum