2009/11/13 Peter Merchant <mercha...@onetel.com>:
>
> As a non-expert, I am wondering if you are using a sledge-hammer to
> crack a nut by using tar. Is it not possible to copy sets of files
> across to the memstick and thence to the new machine?

This sounds like a very good point. This thread started going down a
'I have a tar problem' q&a route rather than a 'I want to move A from
here to there' question.

I've come across this being called an "XY Problem" - We end up talking
about how to do Y when you had the problem X. [
http://perlmonks.org/?node=xy+problem : the tone may appear a bit
'snooty' I'm afraid ]

So, backing off: do you even need the mem stick? Can the two machines
see each other over a network? If so, then rsync should be enough:

cl...@box1 $ rsync -avzP /home/clive box2:/home/

this will try to make a ssh connection from box1 to box2 as the user
'clive' and if successful will copy the whole of /home/clive over into
/home on box2 on the first occasion it is run. Later runs will copy
only files on box1 that are newer than their instance on box2.
-a: preserve file user & permissions
-v : verbose
-z: compress data in transit (and uncompress at other end. Tradeoff
processing time vs network volume. ymmv)
-P give percentage progresss stats per file
*Take care with the arguments. first arg is what to send. If you give
a *folder (directory) name, e.g. /home/clive _without_ the slash, then
the 'clive' dir and all its contents will be transferred. If you give
a folder name _with_ a slash then the _contents_ of clive, e.g.
clive/file1, clive/file2, clive/dirA etc. will be copied over directly
into the destination. If the destination is /home as above thent hat
is probably not waht you want.

rsync /home/clive box2:/home  ... good
rsync /home/clive/ box2:/home  ... bad.
rsync /home/clive/ box2:/home/clive ... good
rsync /home/clive/* box2:/home/clive ... good .. equivalent to the above.

If this can be done, great. It avoids all those issues about
permissions, file systems, hidden .trash folders (eurgh) and flash
wearout!

OTOH if the two boxes can only be connected by stickNet then similar
rsync commands could be used to send the desired directory to & from
the USB stick. This is probably a bit more user friendly and
transparent that using tar.

-- 
Next meeting: Bournemouth, Wednesday 2009-12-02 20:00
Dorset LUG: http://dorset.lug.org.uk/
Chat: http://www.mibbit.com/?server=irc.blitzed.org&channel=%23dorset
List info: https://mailman.lug.org.uk/mailman/listinfo/dorset

Reply via email to