ASMCMD - cp
ASMCMD> help cp
cp
Enables you to copy files between Oracle ASM disk
groups on local instances to and from remote instances.
cp [--service
[connect_str:]src_file [connect_str:]tgt_file
The options for the cp command are described below.
--service - name of the ASM instance name if not default +ASM.
--port - Listener port number, default is 1521.
connect_str - The connection string for use with a remote instance
copy.
src_file - Name of the source file to copy.
tgt_file - A user alias for the created target file name or
alias directory name.
cp cannot copy files between two remote instances. The local Oracle
ASM instance must be either the source or the target of the operation.
You can use the cp command to:
Copy files from a disk group to the operating system
Copy files from a disk group to a disk group
Copy files from the an OS File system to a disk group
Some file types cannot be the source or destination of the cp command.
These file types include OCR, OCR backup and SPFILE file types.
To back up, copy, or move an ASM SPFILE, use the spbackup, spcopy,
or spmove commands.
connect_str is not required for a local instance copy, which is the
default case. In the case of a remote instance copy, you must specify
the connect string and Oracle ASM prompts for a password in a
non-echoing prompt. The connect_str is in the form of:
user@host.SID
user, host, and SID are required in the connect_str parameter. The
default port number is 1521.
src_file must be either the fully qualified file name, the
system-generated name, or the Oracle ASM alias.
The cp command performs a binary copy without any data transformation.
The following are examples of the cp command.
The first example shows a copy of a file in the data disk group to a
file on the operating system.
The second example shows a copy of a file on the operating system to
the DATA disk group.
The third and fourth example shows how to copy files from ASM to
remote server (OS file).
The fifth example shows how to copy a remote OS File to DATA diskgroup.
The sixth example shows how to copy a remote OS File to DATA diskgroup
when listener port is not default.
sys is the user name on the remote server
server is the remote server name
asminstance ASM Instance name
/scratch/file OS file.
If password is not provided in the command line, it will be asked.
ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295 /mybackups/example.bak
copying +data/orcl/datafile/EXAMPLE.265.691577295 -> /mybackups/example.bak
ASMCMD [+] > cp /mybackups/examples.bak +data/orcl/datafile/myexamples.bak
copying /mybackups/examples.bak -> +data/orcl/datafile/myexamples.bak
ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295 sys@server.asminstance:/scratch/file
ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295 sys/passwd@server.asminstance:/scratch/file
ASMCMD [+] > cp sys@server.asminstance:/scratch/file +data/orcl/datafile/file
ASMCMD [+] > cp --port 2500 sys@server.SID:/scratch/file
+data/orcl/datafile/file
copying /scratch/file -> +data/orcl/datafile/file
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29477587/viewspace-1162426/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【ASM】ASMCMD cp 命令ASM
- asmcmd的cp命令小bugASM
- oracle 11gR2 asmcmd工具增加 cp命令OracleASM
- Oracle ASM使用asmcmd中的cp命令來執行遠端複製OracleASM
- 【asmcmd】使用asmcmd工具管理ASMASM
- asmcmdASM
- ASMCMD命令ASM
- 使用asmcmdASM
- asmcmd詳解ASM
- oracle asm asmcmdOracleASM
- ASM工具asmcmdASM
- CP命令
- ASMCMD簡介(1)ASM
- asmcmd命令學習ASM
- asmcmd命令用法教程ASM
- asmcmd does not exist in directoryASM
- CP3405 CP2408 Lean UXUX
- Oracle ASMCMD命令參考OracleASM
- OCP(11g)------> ASM Command-Line Utility (ASMCMD)和 使用 ASMCMDASM
- Linux cp命令Linux
- [Bash] cp command
- ASMCMD中的各個命令ASM
- asmcmd的一個問題ASM
- asmcmd工具的詳細介紹ASM
- asmcmd對磁碟組的處理ASM
- ASMCMD處理問題一則ASM
- ASMCMD - ASM command line utility .ASM
- linux 的cp命令Linux
- Linux命令—–CP命令Linux
- asmcmd: command disallowed by current instance typeASM
- ASM命令列管理工具asmcmdASM命令列
- Linux基礎命令---cpLinux
- Linux命令 --- cp與scpLinux
- aix基本命令之 cpAI
- LTE-5G學習筆記5---Normal CP和Extended CP的區別筆記ORM
- Oracle 12C ASM asmcmd amdu_extractOracleASM
- asmcmd lsdsk和lsdg檢視asmdisk和asmdiskgroupASM
- grid使用者asmcmd命令相關ASM