This documentation refers to a previously released version of BMC Discovery.
See the information on this topic for the latest version (11.3) or version 11.2.

The tw_restore utility enables you to restore a BMC Discovery backup from a local directory on the appliance, an SSH enabled remote system, or a Windows share. The utility can be used on an appliance where the UI cannot be started. To use the utility, type the following command:

tw_restore [options]

where:

  • options are any of the options described in the following table and the common command line options described in Using command line utilities.

Common password options are described in this table

Common password options are described in this table to make it clear whether the password referred to is for the local or remote system.

Restoring backed up system data when a baseline run is in progress results in critical baseline alerts

Baseline is run periodically by the BMC Discovery system. Should baseline be running when a restore is started critical baseline alerts may be reported. The restore is unaffected by these alerts. The automatic baseline check schedule can be modified using the tw_cron_update. In order to minimize the chance of alerts no new periodic baseline checks are performed during the restore.

Command Line Option

Description

--backup-dir=DIR

Specifies a remote backup directory relative to the user's home directory on SSH servers, and the top-level share directory in Windows shares. This option is required for SSH and Windows shares, unless the alternative --unc-path is specified for Windows shares.

--backup-local

Restore from a local backup in the $TIDEWAY/var/backup directory.

--backup-smb

Restore from a backup on a Windows share.

--backup-ssh

Restore from a backup on a remote SSH server.

--email=EMAIL

Specify an email address to receive notification when the restore completes. This depends on email being correctly configured on the appliance.

--encryption-file=FILEEnables you to read the encryption password from a file.

--fix-interrupted

This option can be used where BMC Discovery has been interrupted by an unscheduled reboot or power failure. When you run tw_restore you are prompted to use this option if it is required.

--force

Force backup restore when services are down. This can omit some auditing of the action.

-h, --help

Display help on standard options and exit.

-H, --host=HOST

The hostname or IP address of the remote host.

-u, --username=NAME

The user to run the utility as. This has to be a valid BMC Discovery UI user such as the system user, not a username used to access the command line via SSH.

-p, --password=PASSWD

Specifies the password of the BMC Discovery user. If no password is specified, you are prompted for one. This is only relevant for utilities that have the --username option. For more information about password policies, see Managing security policies.

--passwordfile=FILE

Specifies a file from which the password is to be read. This is only relevant for utilities that have the --username option. This file is not encrypted, though you can set the file permissions to owner-only (chmod 600 passwordfile.txt) to restrict access to the file. For more information about password policies, see Managing security policies.

-P, --port=PORT

The port on the remote Remote SSH server.

--preserve-identity

Preserve the identity and the HTTPS configuration of the appliance rather than take on the identity from the restored backup.

--remote-password=PASSWORD

The password for the remote user on the remote system. For SSH servers or Windows shares.

--remote-user=USER

The username for the remote user on the remote system. For SSH servers or Windows shares.

-S, --share=SHARE

The share name of the remote Windows share. For example sharename. This option is required for Windows shares, unless the alternative --unc-path is specified.

--stop-services

Stop the services to perform the restore. Required when restoring from a backup.

--unc-path=PATH

The UNC path for the Windows share. For example \\sharename\foldername. You can specify this as an alternative to --share and --backup-dir.

--verify-only

Verify the backup without performing a restore operation.

 

User examples

In the following examples, the local username is system and the password is not specified on the command line. The remote SSH username is tideway and the password is password. The remote Windows share is called remshare, the corresponding username is remdom/tideway and the password is password.

The utility prompts for the local password after you enter the command. Type the commands on a single line; line breaks are provided in the examples to make them easier to read.

Verifying a local backup

$TIDEWAY/bin/tw_restore --verify-only --backup-local --username system

Verifying a remote backup on an SSH server

$TIDEWAY/bin/tw_restore --verify-only --backup-ssh  --backup-dir=/usr/tideway/var/backup 
    --remote-user=tideway --remote-password=password --host=de-32.bmc.com
    --username system

Verifying a remote backup on a Windows share

$TIDEWAY/bin/tw_restore --verify-only --backup-smb  --share=remshare
    --backup-dir=2012-10-08_115740_addm_backup --remote-user=remdom\/tideway
    --remote-password=password --host=192.168.1.101  --username system

You must escape / characters as shown in the Windows share examples.

Performing a restore from a local backup

$TIDEWAY/bin/tw_restore --stop-services --backup-local --username system

Performing a restore from an SSH server

$TIDEWAY/bin/tw_restore --stop-services --backup-ssh  --backup-dir=/usr/tideway/var/backup
    --remote-user=tideway --remote-password=password --host=de-32.bmc.com --username system

Performing a restore from a Windows share

$TIDEWAY/bin/tw_restore --stop-services --backup-smb  --share=remshare  
    --backup-dir=2012-10-08_115740_addm_backup --remote-user=remdom\/tideway
    --remote-password=password --host=192.168.1.101  --username system

You must escape / characters as shown in the Windows share examples.

 

Was this page helpful? Yes No Submitting... Thank you
  • No labels
© Copyright 2004 - 2018 BMC Software, Inc.
Legal notices