nv-l
[Top] [All Lists]

Re: OT - Unix Question

To: nv-l@lists.tivoli.com
Subject: Re: OT - Unix Question
From: Darren_Tucker/AdvInt/Advantra%ADVANTRA@advantra.com.au
Date: Fri, 2 Nov 2001 14:11:43 +1000

> Does anyone know the syntax of the tar command to  tar up files (NV db)
on one machine and copy them to another?
> It is something like this, but I don't recall the  exact syntax
> tar -cvf - /usr/OV/databases/openview | (  rexec machine2 ; cd
/usr/OV/databases/openview ; tar xvf -)

The minimum would be:

tar cf - /usr/OV/databases/openview | rsh machine2 tar xfv -

Tar will restore the pull path. To be a bit safer, you could use:

cd /usr/OV/databases/openview; tar cf - * | rsh machine2 "(cd
/usr/OV/databases/openview ; tar xvf -)"

Basically, you want to change dir before starting up the extract. It will
probably work with without the ()'s but they are required if you're not
using rsh (ie tarring locally) and it won't hurt to leave them.

We use SSH rather than RSH since it's encrypted and easier to secure than
rsh.

          -Daz.


<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web