1 |
On Saturday 17 May 2014 04:33:57 meino.cramer@×××.de wrote: |
2 |
> Hi, |
3 |
> |
4 |
> is there any tool in the Gentoo portage which may speed up (make it |
5 |
> mopre efficient) the following task: |
6 |
> |
7 |
> On my HD there are data I want to copy to two identical external HDs. |
8 |
> These HDs are of the same type/model and each is separately |
9 |
> connectable via USB to my PC (...these two of the typical mobile external |
10 |
> USB-HDs). |
11 |
> |
12 |
> Instead of copying the data twice from my PC to eah of the HDs I want |
13 |
> to do it once...like I would be able to give the cp-command two |
14 |
> instead of one target where to copy two. |
15 |
> |
16 |
> The result should be two identically populated external HDs, each of |
17 |
> them useable/readable without the need to the other one. |
18 |
> |
19 |
> What tool of the portage tree I able to accomplish this task? |
20 |
> |
21 |
> Best regards, |
22 |
> mcc |
23 |
|
24 |
|
25 |
1. You could set up the two ext drives as a mirrored RAID and use your |
26 |
copying/tar-ing/dd tool of choice. |
27 |
|
28 |
|
29 |
2. Or you could use pipe and tee to split the feed into any devices you want, |
30 |
e.g.: |
31 |
|
32 |
pv /dev/sda1 | tee >(dd of=/dev/sdb1) >(dd of=/dev/sdc1) |
33 |
|
34 |
|
35 |
3. Or you could use a sequential copy: |
36 |
|
37 |
cp -a /home /dev/sdb1/ && cp -a /home /dev/sdc1 |
38 |
|
39 |
|
40 |
NOTES: |
41 |
|
42 |
a) Unlike other commands, pv will give you a progress bar so that you know how |
43 |
long your back up is taking. |
44 |
|
45 |
b) The 3rd example above will copy sequentially, but depending on the size of |
46 |
the file(s) the second copy may be read from cache. |
47 |
|
48 |
c) If you're doing this over the network then you can use nc in listening mode |
49 |
at the receiving end, or ssh if the network is untrusted. |
50 |
|
51 |
|
52 |
I'm interested to see what other ways will be suggested for this task. |
53 |
|
54 |
-- |
55 |
Regards, |
56 |
Mick |