After logging in to the host operating system, the administrator has a pre-installed folder called scripts with the file path /home/administrator/scripts. This folder contains a number of scripts written in the bash scripting language and have the filetype .sh. They are provided as tools for certain administrative operations and are described in this section.
The scripts found in the scripts folder are the following:
This script will automatically create a backup of the InCenter system in the scripts folder. A suitable SCP or SFTP client can then be used to download the newly created backup file to a management computer from the server's disk if required.
The backup.sh script will automatically stop and restart the InCenter services. A filename can be supplied as an argument in the command line. The file created will be in the GZIP format.
An example of running this script is the following:
$ ./backup.sh my-backup.tar.gz
This script will restore a backup that was created using the backup.sh script described above. The backup file should be uploaded into the scripts folder using a suitable SCP or SFTP client if the file is not already present.
The restore.sh script will automatically stop and restart the InCenter services. A filename can be supplied as an argument in the command line.
An example of running this script is the following:
$ ./restore.sh my-backup.tar.gz
This script will set the IPv4 or IPv6 address which is used to communicate both with the InCenter system as well as the host operating system. It takes two parameters: the IP address and the netmask for the network. For the change to take effect, the virtual machine should be restarted.
An IP address and netmask must be supplied as arguments in the command line when running this script. For example, to set the IPv4 address:
$ ./staticIP.sh --ip4 203.0.113.10 --netmask4 255.255.255.0
To set the IPv6 address:
$ ./staticIP.sh --ip6 2001:db8::c0ca:1eaf --netmask6 64
The full syntax for this script with all its options is the following:
./staticIP.sh [--ip4 <IP address> --netmask4 <netmask> [--gateway4 <gateway>]] [--ip6 <IP address> --netmask6 <netmask> [--gateway6 <gateway>]]
backupLogs.sh and restoreLogs.sh
These scripts are used for backing up and restoring log files. They are further explained in Section 18.4, Log Migration to a New Instance.
This script performs a similar function to the InCenter CLI techsupport command, which is described in Section 17.11, The techsupport Command. However, the Linux script version of the command provides the ability to create comparable diagnostic output even if the InCenter CLI is unavailable. As described below, the script also provides the additional option to include the current InCenter configuration in the output generated.
The following should be noted about using the techsupport.sh script:
The output file from the script is created in the user's current directory when the script is run.
The script must take one of the two following parameters:
-excludeCfg - Do not include the InCenter configuration.
$ ./techsupport.sh -excludeCfg
-includeCfg - Include the InCenter configuration.
$ ./techsupport.sh -includeCfg
Note that this second option to include the configuration does not exist with the techsupport command in the InCenter CLI.
If neither of the above parameters is specified in the command line after techsupport.sh then the script will terminate and no output will be created.