Ganze Partition sichern und zurückspielen
Hallo zusammen, ich möchte auf meiner Linuxkiste das Reiserfs installieren und will deshalb meine ganze Partition, wo Linux installiert ist, sichern und anschliessend zurückspielen das alles wieder so ist wie vorher. Wie mache ich das richtig?Hab mir schon diverse HowTo's und man Pages zu Tar angeschaut aber habe irgendwie Angst das ich doch was vergesse und dann alles weg ist. Danke im vorraus, Dieter ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
On 13-Jan-00 Dadieda Dabodo wrote:
ich möchte auf meiner Linuxkiste das Reiserfs installieren und will deshalb meine ganze Partition, wo Linux installiert ist, sichern und anschliessend zurückspielen das alles wieder so ist wie vorher. Wie mache ich das richtig?Hab mir schon diverse HowTo's und man Pages zu Tar angeschaut aber habe irgendwie Angst das ich doch was vergesse und dann alles weg ist.
also in dem speziellen Fall würde sich dd anbieten: dd if=/dev/hda1|gzip -c > safety.gz Sichert die Partition binär, also unabhängig vom Filesystem oder anderen Settings. Der gzip sorgt für Kompression (hier geht auch bzip2, ist langsamer und effizienter). Zurückspielen geht dann mit gzip -dc safety.gz|dd of=/dev/hda1 -- Erhard Schwenk <eschwenk@fto.de> - http://www.fto.de **** Jetzt neu: http://www.akkordeonjugend.de **** --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
Erhard Schwenk wrote:
also in dem speziellen Fall würde sich dd anbieten:
dd if=/dev/hda Sichert die Partition binär, also unabhängig vom Filesystem oder anderen Settings. Der gzip sorgt für Kompression (hier geht auch bzip2, ist langsamer und effizienter).
Zurückspielen geht dann mit
gzip -dc safety.gz|dd of=/dev/hda1
Um gzip oder bzip2 etwas unter die Arme zu greifen, bietet es sich an den unbenutzten Speicherplatz mit Nullen zu füllen. Diese lassen sich dann besser komprimieren. dd if=/dev/zero of=/da.wo.die.Partition.gemounted.ist/Null.Datei sync umount /da.wo.die.Partition.gemounted.ist/ dd if=/dev/hda1|gzip -c > safety.gz -- __ _ Raymond Häb, ray.haeb@gmx.net, cologne, germany / / (_)__ __ ____ __ / /__/ / _ \/ // /\ \/ / . . . t h e c h o i c e o f a /____/_/_//_/\_,_/ /_/\_\ G N U g e n e r a t i o n . . . --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
On 13-Jan-00 Raymond Haeb wrote:
dd if=/dev/hda Sichert die Partition binär, also unabhängig vom Filesystem oder anderen Settings. Der gzip sorgt für Kompression (hier geht auch bzip2, ist langsamer und effizienter).
Zurückspielen geht dann mit
gzip -dc safety.gz|dd of=/dev/hda1
Um gzip oder bzip2 etwas unter die Arme zu greifen, bietet es sich an den unbenutzten Speicherplatz mit Nullen zu füllen. Diese lassen sich dann besser komprimieren.
dd if=/dev/zero of=/da.wo.die.Partition.gemounted.ist/Null.Datei sync umount /da.wo.die.Partition.gemounted.ist/ dd if=/dev/hda1|gzip -c > safety.gz
Richtig. Allerdings würde ich Null.datei vorher wieder löschen, damit man nacher auch von der Partition booten kann ohne out of Diskspace oder sowas zu produzieren. Die Nullen bleiben ja auch nach dem Löschen erhalten, solange nichts anderes draufgeschrieben wird. -- =========================================================== Erhard Schwenk - alias Bitrunner =)B==o) =========================================================== No Spam replies please. --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
Erhard Schwenk wrote:
dd if=/dev/zero of=/da.wo.die.Partition.gemounted.ist/Null.Datei sync umount /da.wo.die.Partition.gemounted.ist/ dd if=/dev/hda1|gzip -c > safety.gz
Richtig. Allerdings würde ich Null.datei vorher wieder löschen, damit man nacher auch von der Partition booten kann ohne out of Diskspace oder sowas zu produzieren. Die Nullen bleiben ja auch nach dem Löschen erhalten, solange nichts anderes draufgeschrieben wird.
Sorry hatte ich auf die Schnelle nicht dran gedacht. Ich hab das aber schon mehrmals so gemacht, und dabei die Datei natürlich jedesmal vorher wieder gelöscht. -- __ _ Raymond Häb, ray.haeb@gmx.net, cologne, germany / / (_)__ __ ____ __ / /__/ / _ \/ // /\ \/ / . . . t h e c h o i c e o f a /____/_/_//_/\_,_/ /_/\_\ G N U g e n e r a t i o n . . . --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
[20000113 23:01], Erhard Schwenk (eschwenk@fto.de) fell asleep at the keyboard and... | On 13-Jan-00 Dadieda Dabodo wrote: [ Realname faendich nett.. ] | > ich möchte auf meiner Linuxkiste das Reiserfs installieren | > und will deshalb | > meine ganze Partition, wo Linux installiert ist, sichern und anschliessend | > zurückspielen das alles wieder so ist wie vorher. [...] | also in dem speziellen Fall würde sich dd anbieten: | | dd if=/dev/hda1|gzip -c > safety.gz Nee, aber nicht um das ganze anschliessend unter Reiserfs laufen zu lassen; *so* wirst Du naemlich hinterher wieder ext2 haben. Ich wuerde es so machen: find <mountpoint> -xdev |afio -o -Z <archiv_auf_anderer_partition> Wieder einspielen: mount -t reiserfs blabla cd <mountpoint> afio -i -Z <archiv_auf_anderer_partition> Wenn Du keinen Bock auf Kompression und warten hast, lass das 'Z' weg. Viel Erfolg ! -- Gruss / with best regards Jens-Eike Jesau <jesau@gmx.net> http://hp9001.fh-bielefeld.de/~jens /*************************************************************************** * `v'- Linux on a single Disk: www.toms.net/rb * || |`. strip;touch;finger;mount;fsck;more;yes;umount;sleep * - the way how unix gurus have sex - */ --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
Jens-Eike Jesau schrieb in 1,4K (50 Zeilen):
| On 13-Jan-00 Dadieda Dabodo wrote:
| > ich möchte auf meiner Linuxkiste das Reiserfs installieren | > und will deshalb | > meine ganze Partition, wo Linux installiert ist, sichern und anschliessend | > zurückspielen das alles wieder so ist wie vorher.
| dd if=/dev/hda1|gzip -c > safety.gz
Nee, aber nicht um das ganze anschliessend unter Reiserfs laufen zu lassen; *so* wirst Du naemlich hinterher wieder ext2 haben.
Ack.
Ich wuerde es so machen:
find <mountpoint> -xdev |afio -o -Z <archiv_auf_anderer_partition>
Du meinst find <mountpoint> -xdev -print0 | afio -oZ0 <archiv_auf_anderer_partition> wobei die Schalter -v und -z bei afio dir zeigen, was er gerade tut bzw. wie lange es gedauert hat und wie gross die Datei ist. Willst du die Komprimierung beschleunigen, so kann ein -G 4 oder -G 1 die Komprimierungsdichte verringern, willst du allerdings kleine Files (bei denen es eh kaum was bringt) nicht komprimieren, so sollte ein -T 3k oder -T 8k noch wesendlich mehr an Geschwindigkeit bringen.[1] -M 20m sollte Sinn machen. Archiv ueberpruefen: cd <mountpoint> afio -rZ <archiv_auf_anderer_partition> (Hier willst du kein -v. -z ist optional)
Wieder einspielen:
mount -t reiserfs blabla cd <mountpoint> afio -i -Z <archiv_auf_anderer_partition>
Wenn Du keinen Bock auf Kompression und warten hast, lass das 'Z' weg.
Statt afio geht natuerlich auch tar, cpio, ein Image-File (loopback)-mounten und cp -a verwenden, ... Lies die Manpage re. gzip und Libraries ueberschreiben. -Wolfgang [1] Afio komprimiert fileweise, d.h. fuer jedes File wird ein gzip gestartet, wenn es groesser als der -T Schwellwert ist. --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
participants (5)
-
d_hanke@hotmail.com
-
eschwenk@fto.de
-
jesau@gmx.net
-
ray.haeb@gmx.net
-
weissel@ph-cip.uni-koeln.de