7.2.21 snap

Snapshot Exascale files.

Syntax

snap source1 target1 [ sourceN targetN ]...
     [{ -w | --wallet } wallet-location ] 
     [{ -T | --trace } trace-level ]
     [{ -j | --json } [ --compact ]]

Command Options

The options for the snap command are:

  • source1-N: Specifies the snapshot source file(s).

  • target1-N: Specifies the location of the snapshot(s).

  • -w, --wallet: Optionally specifies the path to the Exascale wallet directory.

  • -T, --trace: Optionally enables tracing, with the trace level (trace-level) set to 1 (minimum tracing), 2 (medium tracing), or 3 (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:

    1. If the $ADR_BASE environment variable is set:

      $ADR_BASE/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
    2. /var/log/oracle/diag/EXC/xsh_<user-name>/<host-name>/trace/xsh_<date>.trc
    3. /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 snapshot 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 snapshots created in the same operation are point-in-time consistent.

Examples

Example 7-36 Snapshot a File

This example shows creating a snapshot. The source file @my-data/file1 is and the snapshot is @my-data/snap-file1.

$ xsh snap @my-data/file1 @my-data/snap-file1

Example 7-37 Snapshot a Group of Files

This example shows creating snapshots for 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 snapshot of @my-data/file1 named @my-data/snap-dir/file1, @my-data/file2 named @my-data/snap-dir/file2, and so on.

$ xsh snap @my-data/file* @my-data/snap-dir/file*

Example 7-38 Snapshot Multiple File Groups

This example shows creating snapshots for multiple groups of files using wildcards. The source file groups are @my-data/a* and @my-data/b*, with the resulting snapshots located under @my-data/snap/.

$ xsh snap @my-data/a* @my-data/snap/a* @my-data/b* @my-data/snap/b*

Example 7-39 Ordering Significance

These examples show the significance of the order in which the source and target pairs are specified.

In the first command, the snapshots for files matching @my-data/a* are created in @my-data/snap/a, and the snapshots for the other files are created in @my-data/snap/other.

$ xsh snap @my-data/a* @my-data/snap/a/a* @my-data/* @my-data/snap/other/*

In the following command, all of the snapshots are created in @my-data/snap/other because all of the files match @my-data/*. In this case, the second source and target pair is never used.

$ xsh snap @my-data/* @my-data/snap/other/* @my-data/a* @my-data/snap/a/a*

Example 7-40 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 snapshot destination does not contain a wildcard to match the source specification.

$ xsh snap @my-data/a* @my-data-backup/a*
$ xsh snap @my-data/a* @my-data/snap/a* @vault2/a* @vault2/snap/a*
$ xsh snap @my-data/withwc* @my-data/snap/withoutwc