Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Systembackup
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)
View previous topic :: View next topic  
Author Message
silizium
n00b
n00b


Joined: 01 Mar 2004
Posts: 22
Location: München

PostPosted: Fri Mar 05, 2004 12:03 pm    Post subject: Systembackup Reply with quote

Hallo,

nach dem ich nun wirklich viel Zeit und Mühe in mein Gentoo investiert habe, würde ich gerne ein Backup davon machen.
Es soll das komplette System "ge'tar'd" werden, so das wenn ich mir mal was kaputt mache ich nur das Backup einspielen muss und alles läuft wieder.
Ich versuchte bereits ein:
Quote:

tar -cpjf /srv/daten/backup/system/system-datum.tar.bz2 / --numeric-owner


Das machte ich von knoppix aus.
Ein anschliessendes entpacken mit tar -xjf ging jedoch in die Hose, weil er am Schluss mit einem Fehler abgebrochen hat.

Hat von euch jemand eine Idee (vielleicht schonmal selber (erfolgreich) gemacht), wie man ein Backup von seinem Gentoo erstellt.

THX

Silizium
Back to top
View user's profile Send private message
boris64
Veteran
Veteran


Joined: 04 Oct 2003
Posts: 1770
Location: Vechelde/Peine

PostPosted: Fri Mar 05, 2004 12:06 pm    Post subject: Reply with quote

such mal im forum, die diskussion gabs schon so einige male.
_________________
boris64.net 200x / visit my desktop / try these tiny kernel patches ;)
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Fri Mar 05, 2004 12:14 pm    Post subject: Reply with quote

Oder Du probierst mal 'dar'

Quote:
* app-arch/dar [ Masked ]
Latest version available: 2.1.0-r1
Latest version installed: 2.1.0-r1
Size of downloaded files: 630 kB
Homepage: http://dar.linux.free.fr/
Description: A full featured backup tool, aimed for disks (floppy,CDR(W),DVDR(W),zip,jazz etc.)


Damit habe ich sehr gute Erfahrungen gemacht ...

Stefan
Back to top
View user's profile Send private message
Lenz
Veteran
Veteran


Joined: 17 Jul 2003
Posts: 1439
Location: Marburg [HE, D, EU]

PostPosted: Fri Mar 05, 2004 12:44 pm    Post subject: Reply with quote

Dar kann ich nur empfehlen, mit kdar bekommst du noch ein passendes Frontend dazu, mit dem sich leicht einzelne Dateien wieder herstellen lassen.
Back to top
View user's profile Send private message
mikkk
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2003
Posts: 126

PostPosted: Fri Mar 05, 2004 2:12 pm    Post subject: Reply with quote

Quote:

tar -cpjf /srv/daten/backup/system/system-datum.tar.bz2 / --numeric-owner

Mit *exakt* dem selben Befehl (mal abgesehen vom Pfad ;-)) hab ich mal ein gentoo von einer Platte auf eine andere kopiert, und es hat funktioniert!
Dein Problem muss also woanders liegen. Ist vielleicht Dein Backup-Medium kaputt?

mikkk
Back to top
View user's profile Send private message
Lenz
Veteran
Veteran


Joined: 17 Jul 2003
Posts: 1439
Location: Marburg [HE, D, EU]

PostPosted: Fri Mar 05, 2004 2:27 pm    Post subject: Reply with quote

Hier ist mein Backupskript für dar. Wenn du willst, kannst du das ja für deine Zwecke abändern. Dar ist echt spitze.


Code:

#!/bin/sh


# backup.root

# Version: 0.07
# License: GPL


# Author: Lenz Heilmann <gentoo@lenzheilmann.de>


# Ein Script, das ein Backup von allen wichtigen Systemdateien
# auf der /-Partition durchgeführt.

# Ausgenommen sind:
# * /boot
# * /dev
# * /home
# * /media
# * /mnt
# * /proc
# * /pub
# * /root
# * /sys
# * /tmp
# * /usr/portage

# Das Archiv wird im Verzeichnis /mnt/temp/tmp/backup erstellt
# und später in das Verzeichnis /mnt/temp/tmp/backup/backup.root
# verschoben.



# Setze Variablen für die Zeitangabe im Archivnamen

day=`date +%d`
month=`date +%m`
year=`date +%G`

hour=`date +%H`
minute=`date +%M`
second=`date +%S`

timezone=`date +%Z`


# Wechsle zu /
cd /


#Ausführen des dar-Befehls


dar -s 700M -S 695M -y -R / -X "*~" -X ".*~" -P boot/ -P dev/ -P home/ -P media/ -P mnt/ -P proc/ -P pub/ -P root/ -P sys/ -P tmp/ -P usr/portage -c "/mnt/temp/tmp/backup/backup.root - "$year"-"$month"-"$day" "$hour"-"$minute"-"$second" "$timezone""


# Einstelllen der korrekten Rechte
find "/mnt/temp/tmp/backup" -type d -exec chown -v root.backup {} \;
find "/mnt/temp/tmp/backup" -type f -exec chown -v root.backup {} \;
find "/mnt/temp/tmp/backup" -type d -exec chmod -v 770 {} \;
find "/mnt/temp/tmp/backup" -type f -exec chmod -v 660 {} \;


# Verschieben der Verzeichnisse in das richtige Verzeichnis
mv /mnt/temp/tmp/backup/*"$year"-"$month"-"$day"* /mnt/temp/tmp/backup/backup.root/



# End of file
Back to top
View user's profile Send private message
silizium
n00b
n00b


Joined: 01 Mar 2004
Posts: 22
Location: München

PostPosted: Fri Mar 05, 2004 3:25 pm    Post subject: Aha Reply with quote

Hallo!!!

Und wie bekomme ich DAR installiert wenn es masked ist?
Ich blicke mit der maskiererei irgendwie noch nicht ganz durch. Was bedeutet maskiert eigentlich. Ich habe bißher nur einen englischen Text dazu gefunden, leider ist mein Englisch nicht gerade gut :oops:

Aber trotzdem schonmal danke für die Hilfe bißher. Wenn mir jetzt noch jemand sagen kann wie ich das installieren kann wäre ich wunschlos glücklich.

Bye
Silizium
Back to top
View user's profile Send private message
AustrianCoder
Apprentice
Apprentice


Joined: 11 Oct 2003
Posts: 258
Location: �sterreich

PostPosted: Fri Mar 05, 2004 3:48 pm    Post subject: Reply with quote

ACCEPT_KEYWORDS="~x86" emerge dar
Back to top
View user's profile Send private message
silizium
n00b
n00b


Joined: 01 Mar 2004
Posts: 22
Location: München

PostPosted: Fri Mar 05, 2004 4:09 pm    Post subject: Ist das nicht gefährlich? Reply with quote

Hallo!

Quote:
ACCEPT_KEYWORDS="~x86" emerge dar


Ist das nicht gefährlich?

Und was sage ich Gentoo denn damit? Ich mache so schrecklich ungern was, wenn ich nicht weiß was ich da eigentlich mache.

Bye
Silizium
Back to top
View user's profile Send private message
_lobo
n00b
n00b


Joined: 23 Feb 2004
Posts: 48

PostPosted: Fri Mar 05, 2004 4:13 pm    Post subject: Reply with quote

moin,
hab zu dem thema auch ne farge!

und zwar hab ich schonmal mein system (damals noch debian) umziehn lassen (von platte hdc nach hda) hatte das damals mit nem konsolenbefehl von knoppix aus gemacht.
mein problem ist jetzt dass ich den befehl nimmer weiss und ich es gerne machen würde...

hat jemand ne lösung für die sache? das sys soll nu einfach 1:1 von hdaX nach hdaY kopiert werden!
sollte eigentlich nicht schwer sein, nur fällt mir grad nix konstruktives ein :?

mfg
chris
Back to top
View user's profile Send private message
Lenz
Veteran
Veteran


Joined: 17 Jul 2003
Posts: 1439
Location: Marburg [HE, D, EU]

PostPosted: Fri Mar 05, 2004 4:22 pm    Post subject: Re: Ist das nicht gefährlich? Reply with quote

silizium wrote:
Hallo!

Quote:
ACCEPT_KEYWORDS="~x86" emerge dar


Ist das nicht gefährlich?

Und was sage ich Gentoo denn damit? Ich mache so schrecklich ungern was, wenn ich nicht weiß was ich da eigentlich mache.

Bye
Silizium



Nein ist nicht gefährlich wenn du es so anwendest wie oben steht. Du sagst mit ACCEPT_KEYWORDS="~x86" Gentoo, dass er es aus dem ~x86 Tree (=unstable Portagetree) installieren soll. Neue ebuilds oder Programme die nicht genügend getestet wurden, sind oftmals masked. Das hat aber meist auf die Stabilität keinen einfluss. 'Dar' läuft super, nur das ebuild ist noch nicht sooo alt, daher ist es wohl noch masked.
Back to top
View user's profile Send private message
boris64
Veteran
Veteran


Joined: 04 Oct 2003
Posts: 1770
Location: Vechelde/Peine

PostPosted: Fri Mar 05, 2004 4:28 pm    Post subject: Reply with quote

Quote:
Und was sage ich Gentoo denn damit? Ich mache so schrecklich ungern was, wenn ich nicht weiß was ich da eigentlich mache.

auch wenns wieder mal doof und herablassend klingt.
lies doch einfach mal die portage-anleitung.

Quote:
hat jemand ne lösung für die sache? das sys soll nu einfach 1:1 von hdaX nach hdaY kopiert werden!

Code:
cp -av /mnt/hdaX /mnt/hdaY

oder aber, du bist faul (wie ich) und benutzt z.b. mc, der ist ja bei knoppix auch dabei.
_________________
boris64.net 200x / visit my desktop / try these tiny kernel patches ;)
Back to top
View user's profile Send private message
_lobo
n00b
n00b


Joined: 23 Feb 2004
Posts: 48

PostPosted: Fri Mar 05, 2004 4:39 pm    Post subject: Reply with quote

verdammt, das war glaub ich zu einfach um drauf zu kommen ;)

irgendwie war ich auf nen ewig langen befehl mit tar dd und was weiss ich was noch alles fixiert *grübel* warum hab ich das damals eigentlich so kompliziert gemacht? - na egal ;)

thx für die antwort
Back to top
View user's profile Send private message
boris64
Veteran
Veteran


Joined: 04 Oct 2003
Posts: 1770
Location: Vechelde/Peine

PostPosted: Fri Mar 05, 2004 4:41 pm    Post subject: Reply with quote

ach, und falls du das ganze wirklich 1:1 kopieren willst, nimm dd.
_________________
boris64.net 200x / visit my desktop / try these tiny kernel patches ;)
Back to top
View user's profile Send private message
_lobo
n00b
n00b


Joined: 23 Feb 2004
Posts: 48

PostPosted: Fri Mar 05, 2004 4:44 pm    Post subject: Reply with quote

hm, reicht es nicht wenn ich das ganze mit cp -a mache und wenns dann nötig wird so auch wieder zurückkopiere?
hab mich nämlich noch nie mit dd beschäftigt und müsste das nu extra machen *faul is*
Back to top
View user's profile Send private message
boris64
Veteran
Veteran


Joined: 04 Oct 2003
Posts: 1770
Location: Vechelde/Peine

PostPosted: Fri Mar 05, 2004 4:53 pm    Post subject: Reply with quote

mit cp sollte es ausreichen, mit dd kopierst du halt ein abbild der ganze partition inklusive partitionsgrösse etc.
_________________
boris64.net 200x / visit my desktop / try these tiny kernel patches ;)
Back to top
View user's profile Send private message
toskala
Advocate
Advocate


Joined: 14 Dec 2002
Posts: 2080
Location: hamburg, germany

PostPosted: Fri Mar 05, 2004 6:52 pm    Post subject: Reply with quote

dd if=/dev/hdX of=/mnt/wobackup/hinsoll/backup.dd

aus de maus :wink:
_________________
adopt an unanswered post
erst denken, dann posten
Back to top
View user's profile Send private message
UTgamer
Veteran
Veteran


Joined: 10 Aug 2003
Posts: 1326
Location: Troisdorf (Köln) Deutschland

PostPosted: Fri Mar 05, 2004 9:19 pm    Post subject: Reply with quote

Wenn ich zwischen unterschiedlichen Partitionen Backups, oder mehr umkopiere, nehme ich:

tar -cSp --numeric-owner --atime-preserve -f - . | ( cd /NEW && tar -xSpv --atime-preserve -f - )

Ich befinde mich dann gerade auf der Patition von der ich etwas wegkopieren will auf die gemountete /new
Sollte aber nicht auf dem gerade laufenden System gestartet werden, am besten von ner BootCD wie Knoppix.
_________________
AMD Phenom II x4 >> CFLAGS="-march=amdfam10 -O2 -mmmx -msse3 -mfpmath=sse,387 -pipe -ffast-math" is stable and here in use.

Did Intel produce at any time bugfree HW?
http://www.urbanmyth.org/microcode/
http://www.heise.de/newsticker/meldung/91748
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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