The tw_scheduled_snapshot utility enables you to to use the cron feature to schedule and transfer appliance snapshots.
 | Best Practice You can use the BMC Atrium Discovery user interface to perform appliance snapshots without a schedule. If you do so, see Using appliance snapshot for important prerequisites for taking the snapshot. |
The tw_scheduled_snapshot utility should be scheduled using the cron feature ($TIDEWAY/etc/cron) as the tideway user. For more information, see tw_cron_update. However, you can also run a snapshot that creates a current snapshot that you can view in the user interface.
To use the utility, type the following command at the $TIDEWAY/bin/ directory:
where options are any of the commands described in the following table:
 | Note Although the --target options are not required, you must use all four together for a transfer to occur. When transferring a snapshot to a host running SSH, you should do so using an account created specifically for this purpose. |
| Command Line Option |
Description |
| --child_timeout=TIMEOUT |
Specifies the timeout period for child processes during the transfer |
| --delete_snap |
Removes the snapshot as the script exits. This allows the snapshot to be removed after transfer to preserve disk space on the appliance. |
| --early_release |
Specifies release maintenance mode or reasoning early |
| --interactive |
Confirms that the user wants to run a snapshot. This argument prompts you to confirm that you want to take the snapshot (Y or N). |
| --pessimistic |
Specifies that the creation of the snapshot will continue only if 3 times the size of the datastore is available as free disk space. Otherwise, if pessimistic is not specified, 2 times the size of the datastore will be required for the snapshot to continue. Space is needed for 1) a complete clone of the files, 2) creation of a tarball, and 3) storage of temp files during the snapshot procedure. The worst case is that this would take 3 times the size of the datastore if it is too large to compress. Two times the size of the datastore is the normal space requirement as we are typically able to compress but require a large amount of space for temp files. |
| --snapshot_name=string |
Specifies a name for the created snapshot. While the allowed characters are unlimited, more than 30 characters is not recommended. The default value is Scheduled Snapshot. |
| --snapshot_notes=string |
Specifies a notes field for the created snapshot. This is a free text field supporting new line and essentially unlimited. It is advised that this field be used to tag the snapshot with shell variables such as the hostname for tracking purposes. The default value is Scheduled Snapshot. |
| --target_host=string |
Specifies the target host running SSH. It can be specified as an IP address or a hostname. |
| --target_user=string |
Specifies the user name of the account on the target host. When transferring a snapshot to another appliance you should always use the migrate user. |
| --target_pass=string |
Specifies the password of the account on the target host |
| --target_root=string |
Specifies the relative path to the snapshot archive root on the target host. Snapshots are directories and should be stored under an archive root directory. This directory must be a local one under the user account in use; the name snapshots is recommended. When transferring a snapshot to another appliance you should always specify --snapshot for this option. |
User examples
In the following examples, type the commands on a single line. Line breaks are provided to make the example easier to read.
Scheduling a snapshot
The primary purpose of the tw_scheduled_snapshot utility is to schedule a snapshot; however, can do so with no scheduling using no arguments in the script. The following syntax generates a snapshot that can then be viewed on the Administration => Appliance => Snapshot & Restore page:
The utility stops scanning before creating the snapshot, and then restarts scanning after the snapshot is created. Optionally, you can name the snapshot and provide a description in the Notes field. The snapshot displays in the Appliance Snapshots section of the Snapshot & Restore page.
Transferring a snapshot
You can use the tw_scheduled_snapshot utility to transfer the snapshot to another appliance or to a remote host running SSH. To do so, type the following commands:
 | Best Practice When transferring snapshots onto an appliance using the command line you should use the migrate user, which has a home directory that is the default location for uploading snapshots, and has limited access to the appliance. See The migrate user for information on enabling this user. |
Deleting a snapshot
You can make the script delete the local copy of the snapshot after it has been transferred to a remote host or migrated to another appliance. To do so, type the following command: