Operating System - HP-UX
1752797 Members
5946 Online
108789 Solutions
New Discussion юеВ

A way to preserve ownership and permissions when copying across the network

 
SOLVED
Go to solution
RobertCarback
Frequent Advisor

A way to preserve ownership and permissions when copying across the network

I've used the following to copy files from one server to another ---
tar cvf - . | remsh destination_server "cd /destdir ; tar xvf - "

How can I do the same to BRING files back to the server that is executing the tar command?
3 REPLIES 3
Steven Schweda
Honored Contributor
Solution

Re: A way to preserve ownership and permissions when copying across the network

> How can I do the same to BRING files back
> to the server that is executing the tar
> command?

_Which_ "the tar" command?

Guessing what you may mean, it should be
about the same as what you've been doing.

remsh rmt_host 'cd src_dir ; tar cf - .' | \
tar xf -

Details vary, depending on exactly what you
want, of course.
RobertCarback
Frequent Advisor

Re: A way to preserve ownership and permissions when copying across the network

thanks!
Dennis Handly
Acclaimed Contributor

Re: A way to preserve ownership and permissions when copying across the network

If you aren't root, you need -p to preserve permissions and ownership.