1 |
On Tue, 2005-12-27 at 23:53 +0000, Mick wrote: |
2 |
|
3 |
> |
4 |
> Ideally I would like to connect and tar | scp the directories/files from one |
5 |
> box to another in a single motion. Any advice to help me understand how to |
6 |
> make this work, or why the above attempt fails would be much appreciated. |
7 |
|
8 |
|
9 |
Locallly : |
10 |
|
11 |
tar lcf - . | (cd /other/area/store; tar -xpvf - ) |
12 |
tar lcf - /path/to/file | (cd /other/area/store; tar -xpvf - ) |
13 |
|
14 |
To specify directories or files to exclude, we can use the option "-- |
15 |
exclude" |
16 |
|
17 |
tar --exclude File1 --exclude Dir1 -lcf - . | ( cd /other/area; tar |
18 |
-xvpf - ) |
19 |
|
20 |
via SSH remotely : |
21 |
|
22 |
tar -czf - /directory/to/copy | ssh systemB tar -xzvf - -C /tmp |
23 |
|
24 |
How's that?? Bear in mind that SSH will use some overhead due to |
25 |
encryption. (you can change the cipher to blowfish if you want/is not |
26 |
that paranoid :-) |
27 |
|
28 |
|
29 |
|
30 |
|
31 |
-- |
32 |
Ow Mun Heng |
33 |
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM |
34 |
98% Microsoft(tm) Free!! |
35 |
Neuromancer 10:27:28 up 1 day, 1:09, 6 users, load average: 0.73, 0.83, |
36 |
1.09 |
37 |
|
38 |
|
39 |
-- |
40 |
gentoo-user@g.o mailing list |