UBQ000001:  Command Line Backup/Restore

UBQ ID Number: UBQ000001
Last Modified: 2009-10-26

Summary:

This document details the functionality of UltraBac v9.x's command line interface.

Details:

Many of UltraBac's features, such as backup and restore, can be used through a command line interface. This is helpful for those that would like to use scripts to automate backups, to chain backup jobs, or to have another application kick off your backup. This can also be an effective method of troubleshooting.

 

ub_93_knowledgebase_cli_options.jpg

Fig. 1 - Command line options.

Backup

The options for backup are set in the UBB (backup group) file. If you chose to perform a command line backup of a .UB (backup set) file, you will need to specify the following options:

 

 

Example:

 

C:\Programs\UltraBac Software\UltraBac>ub.exe /Backup TestSet.ub /Device:BackupPath0 /PrepareMedia:TestMedia

 

This command line will back up the set 'TestSet.ub' using any preferences contained within the set. It will use the device designated 'BackupPath0' which also can be specified as "/Device:1000". Before using that device for backup, it will prepare the media using "TestMedia" as the media label.

 

ub_93_knowledgebase_backup_results.jpg

Fig. 2 - Command line backup results (backup).

Restore

The default options for restore are:

 

 

UltraBac will also restore to the original path as the default option, unless another path is specified after the "/restore" option. To change any of those options from the default, you would need to specify the option and the selected preference in the command line.

 

NOTE:  The "/Restore" switch is a modifier for "/FindFiles," telling UltraBac to restore the files found to the path specified.

 

Example:

 

C:\Programs\UltraBac Software\UltraBac>ub /FindFiles:* /Restore:C:\TestRestorePath /Device:Tape0 /Set:1

 

This command line will restore all files contained in "Set 1" of backup device "Tape0" (which also can be specified as "/Device:0), and restore them to the path "C:\TestRestorePath." The "/FindFiles:" command tells UltraBac to find files of a specific type in the specified media. In the example above, the type of files specified is "*", which means "find all files." If you only wanted files with the extension ".bmp," you would enter "/FindFiles:*.bmp" in the command.

 

ub_93_knowledgebase_commandline_results.jpg

Fig. 3 - Command line results (restore).

View Media Index

This command will allow you to check the media to see which sets it holds in the index.

 

Example:

 

C:\Programs\UltraBac Software\UltraBac>ub.exe /ViewMediaIndex /Device:BackupPath0

 

The command line above instructs UltraBac to show the media index held in BackupPath0.

 

ub_93_knowledgebase_checking_media.jpg

Fig. 4 - Checking Media.

Eject Media

This command will allow you to eject the media thru the command line.

 

Example:

 

C:\Programs\UltraBac Software\UltraBac>ub.exe /EjectMedia /Device:0

 

The command line above tells UltraBac to eject the media in Device 0, which is also Tape0.

 

ub_93_knowledgebase_ejecting_media.jpg

Fig. 5 - Ejecting media

View Header

This command will allow you to view the media header.

 

Example:

 

C:\Programs\UltraBac Software\UltraBac>ub.exe /ViewHeader /Device:BackupPath0

 

The command above tells UltraBac to view the media header of BackupPath0.

 

ub_93_knowledgebase_media_header.jpg

Fig. 6 - Viewing media header.

Shortcuts

The following shortcut commands are equal to typing the entire command. For example, "ub /bu" would be the same as "ub /backup."

 

/bu: = /backup:

/PM: = /preparemedia:

/D: = /device:

More Information:

See UltraBac User Manual:  Command Line Functionality