1834714 Members
2103 Online
110069 Solutions
New Discussion

Re: copy and links

 
SOLVED
Go to solution
Mayca Jimenez_1
New Member

copy and links

Hello all,
I am trying to copy several file systems from a server to another and I have some problems with symbolic links.
I am using the next sentence:
on the original server:
cd /original directory
find . | cpio -o | remsh final_server "cd /final_directory ; cat| cpio -pidlmuv"

With this sentence I´ve found that the dates are new on all symbolic links into the final server but also the targets of this symbolic links have changed their dates.

Does someone know how I can preserve all dates?

Thanks a lot,

Mayc
6 REPLIES 6
RAC_1
Honored Contributor

Re: copy and links

Check the man pages of cpio. you need to look at options -a and -m

Anil
There is no substitute to HARDWORK
Rick Garland
Honored Contributor

Re: copy and links

The -m option is to preserve the previous file modification times

The -a option is to reset the times.

Try adding the -m option to your cpio -o
Mayca Jimenez_1
New Member

Re: copy and links

With option -m, cpio -om, the problem is the same.
I preserve all data modifications of all files and directories but not of symbolic links.
Thanks
Jdamian
Respected Contributor
Solution

Re: copy and links

Hi Mayca.
it is not possible to set/restore the timestamp of a symbolic link.

Read my thread about the same question:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=623257


I'm sorry.
Mayca Jimenez_1
New Member

Re: copy and links

Muchas gracias Oscar
Michael Schulte zur Sur
Honored Contributor

Re: copy and links

Hi Mayca,

thank you for taking the time to rate the postings. Please be considerate however and do only assign 0 points if the posting is off topic. Assigning 0 points for a posting where the author honestly tried to help you even if the posting does not contain the solution is insulting in my view.

thanks for considering that,

Michael
http://forums1.itrc.hp.com/service/forums/helptips.do?#28