Back up UNIX Directory to Windows

Back up UNIX Directory to Windows

This example backs up a directory and its subdirectories on a UNIX system to a local file. Instead of executing a command on the remote host, a local script file is executed.

The following figure illustrates the script in a file named myscript.


The following figure illustrates the command to execute the script in myscript.


The script file changes its current directory to the directory to backup. The tar command creates an archive file containing all files and subdirectories located in the current directory. This archive file is written to tar's standard out, which is piped to the compress command. The compress command compresses its input and writes to its standard out. The standard out of the compress command is the same standard out of the script file. The script file's standard out is redirected back to the ucmd command running on the local system. The standard out of UCMD is redirected to the local file data.tar.

Command Line Options

The command line options used in this example are:

Option

Description

-script

File name of a script file. The script file is sent to the remote system for execution.

-host

Directs the command to a computer with a host name of dallas.

-userid

Remote user ID with which to execute the command.

-pwd

Specifies the password for the user ID.

-stdout

Starts the stdout option list. All options read afterwards are applied to the stdout file. The first option not recognized as a standard file option terminates the stdout option list.

-mode

Transfer mode for the stdout file: binary. The data is not translated.

Components

Universal Command Manager for Windows