Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mit 'tar' Verzeichnisse verschieben - Links erhalten
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
Donnergurgler
Apprentice
Apprentice


Joined: 17 Jan 2003
Posts: 202
Location: Schnongs-Zone

PostPosted: Fri Jul 16, 2004 9:03 am    Post subject: Mit 'tar' Verzeichnisse verschieben - Links erhalten Reply with quote

Ich möchte meine Verzeichnisse unter Gentoo auf andere Partitionen
meiner Festplatte verschieben, ich denke so müsste es gehen (z.B: /usr):
Quote:
# tar -cf - /usr | (cd /mnt/usr && tar -xpf -)


Bleiben bei dieser Vorgehensweise die Links erhalten, auch wenn diese
vorübergehend ins Leere weisen?

Die ganze Aktion soll unter Knoppix durchgeführt werden.


Donnergurgler
Back to top
View user's profile Send private message
kiezpro
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2004
Posts: 126
Location: Yes

PostPosted: Fri Jul 16, 2004 9:12 am    Post subject: Reply with quote

Im Zweifel gilt natürlich: ausprobieren, aber ich denke, daß die Links in Ordnung sein sollten. Um sicherzugehen, würde ich vor der Aktion von CD booten.
Back to top
View user's profile Send private message
Donnergurgler
Apprentice
Apprentice


Joined: 17 Jan 2003
Posts: 202
Location: Schnongs-Zone

PostPosted: Fri Jul 16, 2004 9:46 am    Post subject: Reply with quote

Okay, danke dir!
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Fri Jul 16, 2004 12:57 pm    Post subject: Reply with quote

Wie wärs mit tar -cpf und tar xpvf ?
_________________
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
aslocum
Apprentice
Apprentice


Joined: 28 May 2004
Posts: 217
Location: Germany, Frankfurt

PostPosted: Fri Jul 16, 2004 6:31 pm    Post subject: Reply with quote

warum den erst umständlich packen, verschieben und entpacken??

am einfachsten ist es mit MC das verzeichnis zu kopieren.

preserve attributes muss aktiviert sein. kopier alles samt rechten, symlinks usw.
so habe ich meine ganze installation auf einen größere platte geschoben und mache das immer noch bei partitionen wenn ich die umwandeln will in ein anderes dateisystem
Back to top
View user's profile Send private message
UncleOwen
Veteran
Veteran


Joined: 27 Feb 2003
Posts: 1493
Location: Germany, Hamburg

PostPosted: Fri Jul 16, 2004 6:35 pm    Post subject: Reply with quote

Wer hat was von packen gesagt?
Back to top
View user's profile Send private message
awiesel
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2002
Posts: 134

PostPosted: Fri Jul 16, 2004 8:22 pm    Post subject: Reply with quote

Tar packts halt in ein archive, auch wenn es durch das tar nach der Pipe gleich wieder ausgepackt wird :)

Ein anderer Weg wäre auch noch cp -Rp, aber ich gebe zu, ich benutze auch am liebsten tar|tar oder cpio, da weiss ich wenigstens dass es auf allen meinen Plattformen mit den gleichen Schaltern funktioniert und performant ist. Auf einigen Systemen ist cp nämlich schnarchlangsam

PS:

bei der Geschichte mit tar bitte nicht mit absoluten Pfadnamen sichern, schliesslich soll das Zeug ja woanders hin :)

also nicht
Quote:
# tar -cf - /usr | (cd /mnt/usr && tar -xpf -)

sondern
Quote:
cd /usr; tar cf - .|(cd /mnt/usr; tar xpf -)
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 Jul 16, 2004 8:51 pm    Post subject: Ist bereits gepostet Reply with quote

In meinem Beitrag, der zugegebenermaßen nicht 100%tig zur Überschrift passt:
https://forums.gentoo.org/viewtopic.php?t=145148&highlight=
eine Lösung die ich selbst zuverlässig seit Jahren verwende.
_________________
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
Donnergurgler
Apprentice
Apprentice


Joined: 17 Jan 2003
Posts: 202
Location: Schnongs-Zone

PostPosted: Sun Jul 18, 2004 4:55 am    Post subject: Reply with quote

10x geht alles gut, hört nebenbei von Leuten, die
sich mit absoluten Pfadangaben ganze Installationen
zerschossen habe, und dann das:
Quote:
# tar -cf - /usr | (cd /mnt/usr && tar -xpf -)


Aber das:
Quote:
cd /usr; tar cf - .|(cd /mnt/usr; tar xpf -)

Ist genau der Grund warum ich die Frage hier
noch einmal gestellt habe :-)
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Sun Jul 18, 2004 7:39 am    Post subject: Reply with quote

Alles was du brauchst:
Code:

fdisk -l
mke2fs
mkreiserfs
oder ein anderes Dateisystem
und
Code:

mount /dev/hdXX /mnt/OLD
mount /dev/hdXX /mnt/NEW
und final:
Code:

(cd /mnt/OLD ; tar cf - .) | (cd /mnt/NEW ; tar xvf -)

Funktioniert erstklassig. Habe noch nie ein Problem gehabt.
OLD und NEW mußte natürlich erstellen und am besten von einem anderen System booten.
Ma
_________________
------------------------------------------------------------------
http://radio.garden/
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