7.2.5 clone
Clone Exascale files.
Syntax
clone source1 target1 [ sourceN targetN ]...
[{ -w | --wallet } wallet-location ]
[{ -T | --trace } trace-level ]
[{ -j | --json } [ --compact ]]
Command Options
The options for the clone
command
are:
-
source1-N: Specifies the source file(s) being cloned.
-
target1-N: Specifies the location of the clone(s).
-
-w
,--wallet
: Optionally specifies the path to the Exascale wallet directory. -
-T
,--trace
: Optionally enables tracing, with the trace level (trace-level) set to1
(minimum tracing),2
(medium tracing), or3
(maximum tracing). If the trace level is not specified, then minimum tracing is enabled by default.The trace file is written to the first accessible location in the following list:
-
If the
$ADR_BASE
environment variable is set:$ADR_BASE/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
/var/log/oracle/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
/tmp/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
-
-
-j
,--json
: Displays the output in JSON format. -
--compact
: Displays JSON formatted output in a compact format, without white space and line breaks.
Usage Notes
Note the following information when using this command:
-
You can use a wildcard (
%
) in the source to specify multiple source files, in which case the corresponding target must also contain a matching wildcard. -
All files in a clone operation must be in the same vault.
-
Multiple source and target pairs are permitted. In this case, the source file specifications are considered in order, and only the first match is used.
-
All clones created in the same operation are point-in-time consistent.
Examples
Example 7-8 Clone a File
The following example shows cloning a file. The source file @my-data/file1
is and the clone is @my-data/clone-file1
.
$ xsh clone @my-data/file1 @my-data/clone-file1
Example 7-9 Clone a Group of Files
The following example shows cloning a group of files using a wildcard. Assuming the existence of files named @my-data/file1
, @my-data/file2
, and so on, the example creates a clone of @my-data/file1
named @my-data/clone-dir/file1
, @my-data/file2
named @my-data/clone-dir/file2
, and so on.
$ xsh clone @my-data/file* @my-data/clone-dir/file*
Example 7-10 Clone Multiple File Groups
The following example shows cloning multiple groups of files. The example clones @my-data/a*
and @my-data/b*
, with the resulting clones located under @my-data/clone/
.
$ xsh clone @my-data/a* @my-data/clone/a* @my-data/b* @my-data/clone/b*
Example 7-11 Ordering Significance
These examples show the significance of the order in which the source and target pairs are specified.
In the first command, the clones for files matching @my-data/a*
are created in @my-data/clone/a
, and the clones for the other files are created in @my-data/clone/other
.
$ xsh clone @my-data/a* @my-data/clone/a/a* @my-data/* @my-data/clone/other/*
In the following command, all of the clones are created in @my-data/clone/other
because all of the files match @my-data/*
. In this case, the second source and target pair is never used.
$ xsh clone @my-data/* @my-data/clone/other/* @my-data/a* @my-data/clone/a/a*
Example 7-12 Invalid Commands
The following examples show invalid commands. The first and second commands are invalid because multiple vaults are referenced. The final command is invalid because the clone destination does not contain a wildcard to match the source specification.
$ xsh clone @my-data/a* @my-data-backup/a*
$ xsh clone @my-data/a* @my-data/clone/a* @vault2/a* @vault2/clone/a*
$ xsh clone @my-data/withwc* @my-data/clone/withoutwc
Related Topics
Parent topic: XSH Command Reference