Backup examples

Execute the following command to start a backup to tape without specifying a level: ontape -s

You can use the -L option to specify the level of the backup as part of the command, as the following example shows: ontape -s -L 0

Use the -d option to avoid interactive prompts when you are backing up to or restoring from a directory: ontape -s -L 0 -d

When you do not specify the backup level on the command line, ontape prompts you to enter it. The following figure illustrates a simple ontape backup session.
Figure 1: Example of a simple backup created with ontape
ontape -s
Please enter the level of archive to be performed (0, 1, or 2) 0

Please mount tape 1 on /dev/rst0 and press Return to continue ... 
16:23:13 Checkpoint Completed: duration was 2 seconds
16:23:13 Level 0 Archive started on rootdbs
16:23:30 Archive on rootdbs Completed.
16:23:31 Checkpoint Completed: duration was 0 seconds
 
Please label this tape as number 1 in the arc tape sequence. 
This tape contains the following logical logs:

 3

Program over.
The following example shows how to create a level-0 archive of all storage spaces to standard output, which is diverted to a file named level_0_archive in the directory /home:
ontape -s -L 0 >/home/level_0_archive -t STDIO
The following example assumes TAPEDEV STDIO in onconfig and creates a level-1 archive to standard output , which is diverted to a pipe:
ontape -v -s -L 1|compress -c >/home/compressed/level_1_archive

The compress system utility reads from the pipe as input, compresses the data, and writes the data to the file level_1_archive in the /home/compressed directory. The ontape information messages are sent to stderr.