Restore UNIX Directory Backup from Windows to UNIX

Restore UNIX Directory Backup from Windows to UNIX

This example restores a directory that was backed up (see Back up UNIX Directory to Windows). The file containing the backup is on the local system.

The script is located in local file myscript.

The following figure illustrates the script to perform the restore.



The following figure illustrates the command to execute the script file.



The script file creates directory man1 in joe's home directory if it does not already exist. It then changes its current directory to man1. The uncompress command reads from the script's standard in file, which is redirected from UCMD's standard in on the local system.

Notice that UCMD's standard in is redirected from the backup file file.tar. The uncompress program uncompresses its input and writes it to its standard out, which is piped to the tar command. The tar command extracts and writes the archive to the current directory. The final command, diff, compares the original directory with the new one. The diff command returns 0 if no differences are found; otherwise, it returns 1.

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

Password for the user ID.

-stdin

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

-mode

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

Components

Universal Command Manager for Windows