tw_backup
The tw_backup utility enables you to create a backup of a BMC Discovery system on a local directory on the appliance, an SSH enabled remote system, or a Windows share. To use the utility, type the following command:
where:
- options are any of the options described in the following table and the common command line options described in Using-command-line-utilities.
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 | Create a local backup in the $TIDEWAY/var/backup directory. Only one local backup can be stored. |
--backup-smb | Create a backup on a Windows share. |
--backup-ssh | Create a backup on a remote SSH server. |
--email=EMAIL | Specify an email address to receive notification when the backup completes. This depends on email being correctly configured on the appliance. |
--encryption-fd=FD | Enables you to read the encryption passphrase from a file descriptor. |
--encryption-file=FILE | Enables you to read the encryption passphrase from a file. |
--exclude-sensitive | Exclude sensitive data from the backup. Appliance UI users are always backed up and restored, regardless of this setting. |
--fix-interrupted | Unlock the system after a previous backup has failed to complete, starting services if possible. |
--force | Force the creation of a backup when the 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. |
--no-verification | Do not verify (md5) the backup after it has been created. |
--notes=NOTES | Enter some free text notes about the backup. |
--overwrite | Overwrite the existing local backup. |
-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. Only required if the default SSH port (22) is not used. |
--reduce-db | Reduce database backup size (slower to restore) |
--remote-password=PASSWORD | The password for the remote user on the remote system. For SSH servers or Windows shares, the password can include special characters. If you include special characters in the password, make sure to enclose the password in single quotes; for example, '123$abc.edf' |
--remote-user=USER | The username for the remote user on the remote system. For SSH servers or Windows shares. To specify the domain for Windows shares, use the following syntax: --remote-user=user@domain |
-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 services to create the backup. Required when creating a backup. |
--unc-path=PATH | The UNC path for the Windows share. For example \\\\sharename\\foldername or //sharename/foldername. You can specify this as an alternative to --share and --backup-dir. |
-v, --version | Display version information and exit. |
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.
Create local backup
Create backup on a SSH enabled remote system
--remote-password=password --host=de-32.bmc.com
--username=system
Create backup on a remote Windows share
--remote-password=password --unc-path=\\\\windows.bmc.com\\backups
--username=system