1 |
Am Dienstag, den 16.12.2008, 03:15 -0600 schrieb Dale: |
2 |
> Daniel Troeder wrote: |
3 |
> > Am Dienstag, den 16.12.2008, 01:59 -0600 schrieb Dale: |
4 |
> > |
5 |
> >> |
6 |
> >> I'm not to worried about this since I will be moving this over to the |
7 |
> >> other drive anyway. I would like to know what command I should use to |
8 |
> >> tar up everything, transfer it over and untar it all on one line if |
9 |
> >> possible? I plan to do this while booted from a Gentoo CD. I just want |
10 |
> >> to try this so that it will be compressed then transfered and untared |
11 |
> >> once on the way. Does this make since? I have used cp -av in the past. |
12 |
> >> |
13 |
> >> Thanks. |
14 |
> >> |
15 |
> >> Dale |
16 |
> >> |
17 |
> >> :-) :-) |
18 |
> >> |
19 |
> > With "transfer" do you mean over a network, or to another local drive? |
20 |
> > |
21 |
> > You can of course use something like |
22 |
> > # tar czpf - | ssh remote - tar xzpf -C /dir |
23 |
> > (above probably not syntactically correct), but there are faster and |
24 |
> > easier options: |
25 |
> > |
26 |
> > "cp -a" costs little resources locally and maintains POSIX permissions, |
27 |
> > while "rsync -aASH --numeric-ids" is perfect for remote copy. |
28 |
> > |
29 |
> > You can use rsync also locally. It will (with the "-A" switch) also |
30 |
> > transfer POSIX-ACLs, if that is of any concern. It is also useful, if a |
31 |
> > transfer breaks at some moment, because it will kind of continue it :) |
32 |
> > |
33 |
> > Omiting the "-v" switch can significantly speed up things - depends on |
34 |
> > your terminal. In every case it helps to only see the errors, and not |
35 |
> > let them scroll away by everything that went well. |
36 |
> > |
37 |
> > Bye, |
38 |
> > Daniel |
39 |
> > |
40 |
> > |
41 |
> |
42 |
> The drive is in the same machine so there is no network involved. |
43 |
> Should help make it a little more simple. Would this work? |
44 |
> |
45 |
> tar czpf - | tar xzpf -C /dir |
46 |
> |
47 |
> Basically, I want as clean a file system as I can get to start off with |
48 |
> at least. Goal is very little fragmentation. |
49 |
> |
50 |
> Thanks |
51 |
> |
52 |
> Dale |
53 |
While this will work perfectly well, this command is a waste of |
54 |
resources. The compression ("-z") makes locally no sense, and there is |
55 |
no need to tar the data (which will basically just concat files). You |
56 |
will get the exact same result with |
57 |
# cp -a /source /dest |
58 |
|
59 |
If the FS has been formatted before, no fragmentation should occur in |
60 |
every scenario, as long as no parallelism is used while copying, because |
61 |
each file will be created and filled with data one after another. |
62 |
|
63 |
Bye, |
64 |
Daniel |