Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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.

cd /usr/man/man1
tar -cv . | compress


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

ucmd -script myscript -host dallas -userid joe -pwd password -stdout -mode binary > data.tar



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
 

  • No labels