亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: 如何拷貝SYMBOL LINK FILE [打印本頁]

作者: spiderland    時(shí)間: 2006-01-08 00:45
標(biāo)題: 如何拷貝SYMBOL LINK FILE
因?yàn)楦鼡Q盤陣,需要把SAP和ORACLE軟件和數(shù)據(jù)從一個(gè)盤陣上遷移到另一個(gè)盤陣上面.想停止應(yīng)用后直接拷貝,但是SAP和ORACLE軟件里面有很多連接文件,不知道用CP加什么參數(shù)可以拷貝這些文件,然后文件的連接關(guān)系不會(huì)發(fā)生變化,也不會(huì)變成一個(gè)實(shí)文件. 操作系統(tǒng)SOLARIS 9;沒有VERITUS VXFS,應(yīng)該沒有辦法做卷鏡象.
請(qǐng)各位老大幫忙.
作者: 非凡公子    時(shí)間: 2006-01-08 00:58
可以用cp 加 tar來實(shí)現(xiàn)
作者: spiderland    時(shí)間: 2006-01-09 01:09
原帖由 非凡公子 于 2006-1-8 00:58 發(fā)表
可以用cp 加 tar來實(shí)現(xiàn)


CP 拷貝不了SYMBOL LINK文件吧?考貝過去的文件都成了實(shí)際文件.  tar文件在解壓的時(shí)候是不是文件的屬主\權(quán)限都變了? 我不是很明白,還得老大多指教.

可能是我的問題沒有說明白.現(xiàn)在有下面幾個(gè)文件系統(tǒng):
/sapmnt
/usr/sap

/usr/sap下面有很多文件\目錄都是/sapmnt目錄下某些文件\目錄的軟連接.

然后是ORACLE的軟件本身,也有很多連接文件,偏偏文件的權(quán)限屬性有很復(fù)雜, 有很多有S權(quán)限的文件.

所以我現(xiàn)在不知道這種數(shù)據(jù)遷移應(yīng)該用什么辦法好? SOLARIS 9下面有沒有直接的文件系統(tǒng)的拷貝,連接和權(quán)限都可以帶過去.回來我重新命名個(gè)文件系統(tǒng)就可以了.

有VERITAS的VOLUME MANAGER就好了,做文件系統(tǒng)鏡象.
作者: chinaux    時(shí)間: 2006-01-09 16:43
assuming the 2 new file systems are mounted on /mnt/sapmnt, /mnt/sap -
#(cd /; tar -cf - sapmnt) | ( cd /mnt; tar -xf -)
#(cd /usr; tar -cf - sap) | (cd /mnt; tar -xf -)

then, umount /sapmnt, /usr/sap, /mnt/sapmnt, /mnt/sap, and mount the 2 new file systems on /sapmnt, /usr/sap respectively
作者: Philmoon    時(shí)間: 2006-01-09 16:59
原帖由 chinaux 于 2006-1-9 16:43 發(fā)表
assuming the 2 new file systems are mounted on /mnt/sapmnt, /mnt/sap -
#(cd /; tar -cf - sapmnt) | ( cd /mnt; tar -xf -)
#(cd /usr; tar -cf - sap) | (cd /mnt; tar -xf -)

then, umount /sapmnt,  ...


正解。不過tar命令的嚴(yán)格寫法是c、x等不帶“-”(恐怕考試要扣的。

#(cd /; tar cf - sapmnt) | ( cd /mnt; tar xf -)
#(cd /usr; tar cf - sap) | (cd /mnt; tar xf -)
作者: chinaux    時(shí)間: 2006-01-09 17:16
原帖由 Philmoon 于 2006-1-9 16:59 發(fā)表


正解。不過tar命令的嚴(yán)格寫法是c、x等不帶“-”(恐怕考試要扣的。

#(cd /; tar cf - sapmnt) | ( cd /mnt; tar xf -)
#(cd /usr; tar cf - sap) | (cd /mnt; tar xf -)



You are right according to its man page.

Just for your information, in certain cases, "-" is required, at least on Redhat Linux.:wink:
作者: nimysun    時(shí)間: 2006-01-09 18:05
原帖由 chinaux 于 2006-1-9 17:16 發(fā)表



You are right according to its man page.

Just for your information, in certain cases, "-" is required, at least on Redhat Linux.:wink:




我認(rèn)為"-"本來是需要的,后來慢慢退化了,我還是建議用de .
作者: nimysun    時(shí)間: 2006-01-09 18:06
拷貝符號(hào)連接,寫腳本的人一般都用cpio,sheller們出來講講。
作者: chinaux    時(shí)間: 2006-01-09 18:25
"tar" should work on all kinds of UNIX/Linux releases (probably options are a bit different).

I used the following to copy a directory (or a mountpoint) /a/b to /c:

cd /a; find b -xdev | xargs cpio -pdlmux /c

it works fine under HP-UX, but not work under Solaris 8. And, I tested  cpio options, but no right options found for Solaris.

On Redhat Linux, hmmm, I cannot remember exactly my testing results. However, we can always use "cp -a A B" instead.

[ 本帖最后由 chinaux 于 2006-1-9 18:26 編輯 ]
作者: spiderland    時(shí)間: 2006-01-09 20:00
謝謝各位老大,編了幾個(gè)文件沒有問題.多謝各位指教.
再有,對(duì)于一個(gè)100G左右的文件系統(tǒng),這么操作沒有什么問題吧? 因?yàn)槭巧a(chǎn)系統(tǒng),沒有辦法不小心.多謝各位!
作者: chinaux    時(shí)間: 2006-01-09 21:46
It doesn't matter with the size of a file system.

the attributes (ownership, permission, modification time, etc) of a destination file/directory will be the same with the  source, only a symbolic link will be created, and its modification time will be surely different, and it doesn't matter at all.




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2