We have CENTOS 5.3 on DELL servers. I tried to us following command to copy remote files system to local:
scp -rp oracle@ORA2:/home/app/oracle/10.2 .
After SCP finish copy, I found some files on source file system using "link" but on target file systems it change to "physical file".
Does there has way scp not change "link" setup?
Thanks.
___________________________________________________ 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! http://messenger.yahoo.com.tw/
mcclnx mcc wrote:
We have CENTOS 5.3 on DELL servers. I tried to us following command to copy remote files system to local:
scp -rp oracle@ORA2:/home/app/oracle/10.2 .
After SCP finish copy, I found some files on source file system using "link" but on target file systems it change to "physical file".
Does there has way scp not change "link" setup?
If you want to preserve symlinks you probably want to use rsync instead of scp.
mcclnx mcc wrote:
We have CENTOS 5.3 on DELL servers. I tried to us following command to copy remote files system to local:
scp -rp oracle@ORA2:/home/app/oracle/10.2 .
After SCP finish copy, I found some files on source file system using "link" but on target file systems it change to "physical file".
Does there has way scp not change "link" setup?
I've always preferred 'rsync -essh -aHv source host:path' over scp for remote copies. It will generally get everything right and in the case where part of the content is already there it is much more efficient.
On Mon, 2009-12-21 at 12:51 -0600, Les Mikesell wrote:
mcclnx mcc wrote:
We have CENTOS 5.3 on DELL servers. I tried to us following command to copy remote files system to local:
scp -rp oracle@ORA2:/home/app/oracle/10.2 .
After SCP finish copy, I found some files on source file system using "link" but on target file systems it change to "physical file".
Does there has way scp not change "link" setup?
I've always preferred 'rsync -essh -aHv source host:path' over scp for remote copies. It will generally get everything right and in the case where part of the content is already there it is much more efficient.
I know I'm going to be embarrassed by the answer to this one but I've checked a couple rsync and ssh references, including man rsync, and do not find an option -H. What is it?
Cheers!
CentOS 5.4, Linux 2.6.18-164.9.1.el5 x86_64 14:18:18 up 2 days, 20:25, 1 user, load average: 0.24, 0.14, 0.19
b.j. mcclure wrote:
I know I'm going to be embarrassed by the answer to this one but I've checked a couple rsync and ssh references, including man rsync, and do not find an option -H. What is it?
Looks like
-H, --hard-links preserve hard links
In my experience hard links aren't very common, symlinks on the other hand are very common, and probably the type of link you were encountering.
nate
On Mon, 2009-12-21 at 11:25 -0800, nate wrote:
b.j. mcclure wrote:
I know I'm going to be embarrassed by the answer to this one but I've checked a couple rsync and ssh references, including man rsync, and do not find an option -H. What is it?
Looks like
-H, --hard-links preserve hard links
In my experience hard links aren't very common, symlinks on the other hand are very common, and probably the type of link you were encountering.
nate
Darn. I knew it was dumb. ;-/
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS 5.4, Linux 2.6.18-164.9.1.el5 x86_64 14:29:22 up 2 days, 20:36, 1 user, load average: 0.13, 0.22, 0.20
Of course, if you want to be a really sneaky sysadmin and avoid links altogether, not to mention confuse the shit out of the developers using your system, you can always do a mount --bind as an alternative to symlinking directories ;)
Peter
On Mon, Dec 21, 2009 at 11:25 AM, nate centos@linuxpowered.net wrote:
b.j. mcclure wrote:
I know I'm going to be embarrassed by the answer to this one but I've checked a couple rsync and ssh references, including man rsync, and do not find an option -H. What is it?
Looks like
-H, --hard-links preserve hard links
In my experience hard links aren't very common, symlinks on the other hand are very common, and probably the type of link you were encountering.
nate
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Does there has way scp not change "link" setup?
I've always preferred 'rsync -essh -aHv source host:path' over scp for remote copies. It will generally get everything right and in the case where part of the content is already there it is much more efficient.
I know I'm going to be embarrassed by the answer to this one but I've checked a couple rsync and ssh references, including man rsync, and do not find an option -H. What is it?
-H, --hard-links preserve hard links
Tom H wrote:
Does there has way scp not change "link" setup?
I've always preferred 'rsync -essh -aHv source host:path' over scp for remote copies. It will generally get everything right and in the case where part of the content is already there it is much more efficient.
I know I'm going to be embarrassed by the answer to this one but I've checked a couple rsync and ssh references, including man rsync, and do not find an option -H. What is it?
-H, --hard-links preserve hard links
Most of the other options to create as exact a duplicate as possible are bundled into the '-a' option. However, since there is no efficient way to handle hardlink matching and recreation (it needs a brute-force inode table lookup), it is left separate.
On Monday 21 December 2009, b.j. mcclure wrote: ...
I know I'm going to be embarrassed by the answer to this one but I've checked a couple rsync and ssh references, including man rsync, and do not find an option -H. What is it?
$ man rsync | grep "-H" -a, --archive archive mode; same as -rlptgoD (no -H) -H, --hard-links preserve hard links want recursion and want to preserve almost everything (with -H ply-linked files is expensive. You must separately specify -H. -H, --hard-links
Cheers, Peter