This section explains the procedure to back up and restore the Sun OTP services. Backup and restore of solution can include backup and restore of the various components they are dependent on. That is, if you want to backup or restore your solution, you can integrate the backup and restore of the various component products on which your solution is dependent upon into your solution backup and restore.
The following topics are discussed:
The Sun OTP backup process is component specific. Sun OTP copies and creates the required configuration for backup. You can back up individual Sun OTP services or all running Sun OTP services. The backup and restore process uses the installation framework for its implementation. Therefore, you cannot back up the Sun OTP services that run on the remote host.
Perform this procedure only from the global zone even when Sun OTP security service is running in the non-global zone.
In a clustered system, ensure that the Sun OTP service that needs to be backed up is running on the current Sun OTP host.
Log in as root (su - root) to the Sun OTP host.
Determine the Sun OTP services that you want to back up.
To back up all the running Sun OTP services, type:
/opt/SUNWotp/cli/backup_otp -o backupdirectory -l logfile
backupdirectory is a directory name on the Sun OTP host. This directory can be any valid NFS path name that can be accessed by the Sun OTP host with write permission. The back up data is stored in a tar file under this backup directory.
logfile is the name of the log file that contains the output of the backup operation.
To back up the Sun OTP high availability service, type the following command:
/opt/SUNWotp/cli/backup_otp -c h -o backupdirectory -l logfile
To back up the Sun OTP system management service, type the following command:
/opt/SUNWotp/cli/backup_otp -c m -o backupdirectory -l logfile
To back up the Sun OTP application provisioning service, type the following command:
/opt/SUNWotp/cli/backup_otp -c p -o backupdirectory -l logfile
To back up the Sun OTP security service, type the following command:
/opt/SUNWotp/cli/backup_otp -c s -o backupdirectory -l logfile
The following table lists the data that is backed up by the backup plan.
Table 1–2 Data Backed Up By the Backup Plan
Sun OTP Service |
Data Backed Up |
---|---|
Sun OTP registry files |
/var/OTP directory |
Sun OTP high availability service |
/etc/cluster directory |
Sun OTP application provisioning service |
Database, plug-in, and SPS database data, and custom tasks data |
Sun OTP system management service |
Configuration files and SCS database |
Sun OTP security service |
/opt/SUNWotp/accessmgr directory /var/opt/SUNWotp/webserver/local-server/web-app directory /var/opt/SUNWotp/config/alias file /var/opt/SUNWotp/webserver/admin-server/config-store/ directory /etc/opt/SUNWotp/web-sso file /opt/SUNWjass/Drivers/sunotp driver Instance of the Directory Server. |
You can perform scheduled backup of the Sun OTP services. For more details, crontab(1).
Open the crontab file.
To back up Sun OTP services at 1 a.m. each Saturday, for example, add the following line to the crontab file.
0 1 * * 6 /opt/SUNWotp/cli/backup_otp -o /var/otp/backup -l /var/otp/backup.log
In this example, the backup tar files are stored in the /var/otp/backup directory.
To automatically delete old backup tar files at 1 a.m. each Sunday, for example, add the following line to the crontab file.
0 1 * * 7 find /var/otp/backup -name '*.tar' -mtime +10 -exec /bin/rm -f {} \;
In this example, the backup tar files are stored in the /var/otp/backup directory.
You can restore the Sun OTP services only on the same host where they are backed up. Before the restore process, stop the Web Server from the cluster control. Once you complete the restore process, restart the Web Server.
Perform this procedure only from the global zone even when Sun OTP security service is running in the non-global zone.
The backup tar file created by the backup plan determines the Sun OTP service to be restored. For example, if the backup tar file contains only the backup data for the Sun OTP application provisioning service, then only the Sun OTP application provisioning service is restored.
In a clustered system, make sure that the Sun OTP service to be restored is running on the current Sun OTP host.
Log in as root (su - root) to the Sun OTP host.
To restore the Sun OTP services, type the following command:
/opt/SUNWotp/cli/restore_otp -t tarfile -l logfile
tarfile is the backup tar file created by the backup CLI.
logfile is the name of the log file that contains the output of the restore operation.
Sun OTP configuration data and Sun OTP high availability service is not restored.