This section explains the procedure for configuring the online backup and restoration procedures.
Configuring online backup takes 10 to 20 minutes. Restoration takes approximately 30 minutes.
Point
Time taken for restoration may vary depending on the disk performance at the file copy source.
When configuring online backup, collect base backups, specify a backup location for the WAL files, and add the execution schedule of the file that periodically performs backup of the WAL files.
Operation of this product must be stopped to prevent the resources to be backed up from being modified during the configuration operations of online backup.
Limit user access using the following operations:
Inform platform provider users that the usage of this product will be stopped
Block all access to the console of this product using the method appropriate for the environment
Stop certain services of this product
Execute the following stop command:
net stop "FUJITSU Software Cloud Services Management Web Server(GUI)"
Stop services
Execute the following command to stop the services of this product:
net stop "FUJITSU Software Cloud Services Management DB Service(fjsvfscsmdb_FSCSMSYSTEM)"
Perform offline backup
Collect backup data of the entire system including the configuration files and audit logs.
For details on how to perform offline backup, refer to "4.2.1.1 Backup".
Prepare the backup file storage location for online backup
Create the storage destination for the files that will be backed up by the online backup operation.
Prepare an arbitrary folder and create the following folder structure in that folder:
<Backup storage folder> | |---CSMACCOUNTING | | | +-- wal | |---CSMMETERINGLOG | | | +-- wal | |---CSMSYSTEM | | | +-- wal | |---CSMAPP | +-- wal
For example, if a backup storage folder will be created at the following location:
F:\csm_backup\online
The following folder structure should be created in the folder:
F:\csm_backup\online | |---CSMACCOUNTING | | | +-- wal | |---CSMMETERINGLOG | | | +-- wal | |---CSMSYSTEM | | | +-- wal | |---CSMAPP | +-- wal
Note
Ensure that the backup storage location is a folder that is accessible using the privileges of the OS user for database connection (fjsvcsmdb).
In order to prevent information that was backed up from being corrupted due to failure of the management server, specify another recording media or an external storage device for the backup location of the files.
Edit the online backup definition files
Online backup configuration information
Specify the backup storage folder that was created in step 4 in the online backup configuration file.
In addition, enable online backup.
For details on the online backup configuration information, refer to "2.10.5 Online Backup Configuration Information".
Backup data can be stored at locations other than local drives.
For the example of this procedure, assume the content of the online backup configuration file is as follows:
When the backup location is a local drive
<properties> <entry key="csm.base.onlinebackup.directory">F:\\csm_backup\\online</entry> <entry key="csm.base.onlinebackup">true</entry> </properties>
When the backup location is a location other than a local drive
<properties> <entry key="csm.base.onlinebackup.directory">\\\\10.20.30.40\\csm_backup\\online</entry> <entry key="csm.base.onlinebackup">true</entry> </properties>
The configuration file for the DB cluster "CSMACCOUNTING"
Edit the configuration file, specifying the backup folder that was created in step 4.
In addition, enable archive mode.
The file to edit is as follows:
%FSCSM_HOME%\db\CSMACCOUNTING\postgresql.conf
In the example of this procedure, modify as follows:
[Before Modification] #archive_mode = off #archive_command = 'copy "%p" "The directory for your backup files"' [After Modification] archive_mode = on archive_command = 'copy "%p" "F:\\csm_backup\\online\\CSMACCOUNTING\\wal\\%f"'
The configuration file for the DB cluster "CSMMETERINGLOG"
Edit the configuration file, specifying the backup folder that was created in step 4.
In addition, enable archive mode.
The file to edit is as follows:
File to edit: %FSCSM_HOME%\db\CSMMETERINGLOG\postgresql.conf
In the example of this procedure, modify as follows:
[Before Modification] #archive_mode = off #archive_command = 'copy "%p" "The directory for your backup files"' [After Modification] archive_mode = on archive_command = 'copy "%p" "F:\\csm_backup\\online\\CSMMETERINGLOG\\wal\\%f"'
The configuration file for the DB cluster "CSMSYSTEM"
Edit the configuration file, specifying the backup folder that was created in step 4.
In addition, enable archive mode.
The file to edit is as follows:
%FSCSM_HOME%\db\CSMSYSTEM\postgresql.conf
In the example of this procedure, modify as follows:
[Before Modification] #archive_mode = off #archive_command = 'copy "%p" "The directory for your backup files"' [After Modification] archive_mode = on archive_command = 'copy "%p" "F:\\csm_backup\\online\\CSMSYSTEM\\wal\\%f"'
The configuration file for the DB cluster "CSMAPP"
Edit the configuration file, specifying the backup folder that was created in step 4.
In addition, enable archive mode.
The file to edit is as follows:
%FSCSM_HOME%\db\CSMAPP\postgresql.conf
In the example of this procedure, modify as follows:
[Before Modification] #archive_mode = off #archive_command = 'copy "%p" "The directory for your backup files"' [After Modification] archive_mode = on archive_command = 'copy "%p" "F:\\csm_backup\\online\\CSMAPP\\wal\\%f"'
Add the schedule for the file that performs the backup process
Execute the following command as an OS administrator (It is not necessary to include line feeds in this command. When copying this command from the manual, delete line feeds before using it).
schtasks /create /tn FSCSM_onlinebackup_batch /ru Administrator /rp <Administrator password> /tr "\"%FSCSM_HOME%\sys\bin\fscsm_archive_wal.bat\"" /st 05:00:00 /sc DAILY
Note
When changing the execution interval, configure the parameters for schtasks and operate the task scheduler directly. If the execution interval is too short, creation of files in the backup folder will be performed frequently, potentially leading to a lack of disk space.
Start the database services
Execute the following command to start certain services of this product:
net start "FUJITSU Software Cloud Services Management DB Service(fjsvfscsmdb_FSCSMAPP)"
Create base backups
Execute the following command to create base backups.
> %FSCSM_HOME%\bin\fscsm_basebackup create -comment "any comment"<RETURN> INFO: fscsm0001: Command succeeded
Execute the following command and confirm that base backups have been created:
> %FSCSM_HOME%\bin\fscsm_basebackup list<RETURN> version time comment ------------------------------------------------------------------ 1 2015-12-03 11:10 any comment INFO: fscsm0001: Command succeeded.
Start services
Execute the following command to start the services of this product:
net start "FUJITSU Software Cloud Services Management Web Server(APP)"
Resume operation
Remove user access limitation and resume operation of this product.
The number of files that are backed up by online backup increases over time and according to the usage of this product. This increase of backup files may stress the destination drive or partition and cause unexpected problems.
This product manages multiple versions of base backups and provides a command that deletes specified versions of base backups. Deleting old base backups that are no longer necessary for restoration using this command deletes all backup files from the corresponding period.
Disk space usage of the backup destination drive can be reduced by periodically collecting new base backups while deleting old base backups. Stopping services is not necessary.
To do this, perform the following procedure:
Collect a base backup
Execute the following command to create base backups.
> %FSCSM_HOME%\bin\fscsm_basebackup create -comment "2nd backup"<RETURN> INFO: fscsm0001: Command succeeded
Execute the following command. A list of base backups is displayed. Check the list and confirm that base backups have been created. When no files are generated in the backup storage folder created in advance for online backup, the DB cluster configuration file is incorrect.
> %FSCSM_HOME%\bin\fscsm_basebackup list<RETURN> version time comment ------------------------------------------------------------------ 1 2015-12-03 11:10 any comment 2 2016-01-13 11:10 2nd backup INFO: fscsm0001: Command succeeded.
Determine the recovery target period
The list of base backups displayed in step 1 shows the version, collection completion time, and the comments specified during the creation of each base backup.
Determine a period to be the target of recovery and a period not to be recovered, based on the collection completion times and comments.
The explanation for this procedure is given based on an example in which the decision is made to "not recover data older than 11:10 on 2016-01-13".
Delete base backups that are not within the recovery target period of time
For the example of this procedure, base backup version "1", which was collected earlier than "2016-01-13 11:10", is deleted.
> %FSCSM_HOME%\bin\fscsm_basebackup delete -version 1<RETURN> INFO: fscsm0001: Command succeeded.
Execute the following command and confirm that the specified version of the base backup has been deleted:
> %FSCSM_HOME%\bin\fscsm_basebackup list<RETURN> version time comment ------------------------------------------------------------------ 2 2016-01-13 11:10 2nd backup INFO: fscsm0001: Command succeeded.
The above operation deletes the files that were backed up in the period between "2015-12-03 11:10", which is the time when collection of the base backups was completed, and "2016-01-13 11:10".
Note
When collecting base backups, if the command is abnormally terminated or the OS is restarted, the collection of base backups is incomplete. In such cases, there may be folders of which backup has not been completed which are not displayed by the fscsm_basebackup list command.
In the folder specified in the online backup configuration information file, if there are folders that have the numbers which are not displayed by the fscsm_basebackup list command, delete those folders using Explorer as the user with OS administrator privileges.
Increasing timeout values
Depending on the environment at the backup destination, the base backup command may time out. In such cases, it is possible to increase the time out value.
To do this, perform the following procedure:
Stop services
Execute the following command to stop the services of this product:
net stop "FUJITSU Software Cloud Services Management DB Service(fjsvfscsmdb_FSCSMSYSTEM)"
Edit the online backup configuration information file
In the online backup configuration information file, add a configuration item for the timeout value.
For details on the online backup configuration information, refer to "2.10.5 Online Backup Configuration Information".
Add "csm.base.onlinebackup.command.timeout".
The default value of "csm.base.onlinebackup.command.timeout" is 30 minutes (1800).
For example, to extend the timeout to 40 minutes, the content of the online backup configuration file should be as follows:
<properties> <entry key="csm.base.onlinebackup.directory">F:\\csm_backup\\online</entry> <entry key="csm.base.onlinebackup">true</entry> <entry key="csm.base.onlinebackup.command.timeout">2400</entry> </properties>
Start services
Execute the following command to start the services of this product:
net start "FUJITSU Software Cloud Services Management Web Server(APP)"
In environments where online backups are collected periodically, the period of the time in which the data can be recovered when necessary are described using the following example.
Figure 4.1 Example of the Backup Schedule and Scope of Recoverable Data
In the above illustrated example, base backup collection is performed once a month and differential backup is performed at 05:00 daily.
Assuming that restore is performed after 01:00 on April 20, 2016, restore is possible of the data from any specified point in time between "2016/02/13 05:00" and "2016/04/19 05:00".
To restore from an online backup, perform the following procedure.
Restore from an offline backups
Set up this product so that the environment will be same as the one at the time of backup.
Restore the assets such as configuration files and required software from an offline backup if necessary.
Point
If this product has been set up and the configuration files and required software have not been changed since an online backup, restoration from offline backup is not necessary.
Refer to the following procedure and restore the database.
Stop services
Stop the services of this product.
net stop "FUJITSU Software Cloud Services Management DB Service(fjsvfscsmdb_FSCSMSYSTEM)"
Select a base backup
Execute the following command to select a base backup to use.
> %FSCSM_HOME%\bin\fscsm_basebackup list version time comment ------------------------------------------------------------------ 3 2016-02-13 11:10 3rd backup 4 2016-03-13 11:10 4th backup 5 2016-04-14 11:10 5th reorganization INFO: fscsm0001: Command succeeded.
The following part of this section explains the procedure for recovering the system to the state it was in at 05:00 of March 31, 2016 using base backup version 4.
Back up database folders
Rename the data base folders of this product.
[Before Changing] %FSCSM_HOME%\db\CSMMETERINGLOG %FSCSM_HOME%\db\CSMACCOUNTING %FSCSM_HOME%\db\CSMSYSTEM %FSCSM_HOME%\db\CSMAPP [After Changing] (examples with "_old" appended) %FSCSM_HOME%\db\CSMMETERINGLOG_old %FSCSM_HOME%\db\CSMACCOUNTING_old %FSCSM_HOME%\db\CSMSYSTEM_old %FSCSM_HOME%\db\CSMAPP_old
Replace database folders
Copy the base backup stored at the backup file storage location for online backup as the database folder of this product.
After copying, check if full control permission is granted to the OS user for database connection (fjsvcsmdb) on the folders corresponding to data dictionaries.
If full control permission is not granted, edit the access permission settings.
Delete the "backup_label" file in each of the base backup folders that were copied.
In the example of this procedure, the base backup folder to copy is as follows:
F:\csm_backup\online\00000004
Copying CSMMETERINGLOG
[Copy Target Folder] F:\csm_backup\online\00000004\CSMMETERINGLOG [Copy Destination Folder] %FSCSM_HOME%\db\
[Status after Copy] %FSCSM_HOME%\db\CSMMETERINGLOG %FSCSM_HOME%\db\CSMMETERINGLOG_old
Copying CSMACCOUNTING
[Copy Target Folder] F:\csm_backup\online\00000008\CSMACCOUNTING [Copy Destination Folder] %FSCSM_HOME%\db\
[Status after Copy] %FSCSM_HOME%\db\CSMACCOUNTING %FSCSM_HOME%\db\CSMACCOUNTING_old
Copying CSMSYSTEM
[Copy Target Folder] F:\csm_backup\online\00000008\CSMSYSTEM [Copy Destination Folder] %FSCSM_HOME%\db\
[Status after Copy] %FSCSM_HOME%\db\CSMSYSTEM %FSCSM_HOME%\db\CSMSYSTEM_old
Copying CSMAPP
[Copy Target Folder] F:\csm_backup\online\00000008\CSMAPP [Copy Destination Folder] %FSCSM_HOME%\db\
[Status after Copy] %FSCSM_HOME%\db\CSMAPP %FSCSM_HOME%\db\CSMAPP_old
Operations for WAL files
Create "pg_xlog" folders in each destination folder and copy the target files to those folders.
Operation for CSMMETERINGLOG
[Copy Target Files] Files in F:\csm_backup\online\CSMMETERINGLOG\wal [Copy Destination Folder] %FSCSM_HOME%\db\CSMMETERINGLOG\pg_xlog
Operation for CSMACCOUNTING
[Copy Target Files] Files in F:\csm_backup\online\CSMACCOUNTING\wal [Copy Destination Folder] %FSCSM_HOME%\db\CSMACCOUNTING\pg_xlog
Operation for CSMSYSTEM
[Copy Target Files] Files in F:\csm_backup\online\CSMSYSTEM\wal [Copy Destination Folder] %FSCSM_HOME%\db\CSMSYSTEM\pg_xlog
Operation for CSMAPP
[Copy Target Files] Files in F:\csm_backup\online\CSMAPP\wal [Copy Destination Folder] %FSCSM_HOME%\db\CSMAPP\pg_xlog
Place recovery definitions.
Place the recovery definition in each database folder.
Placing in the CSMMETERINGLOG folder
[File to Place] %FSCSM_HOME%\db\CSMMETERINGLOG\recovery.conf
Enter the following content in this file:
restore_command = 'copy "F:\\csm_backup\\online\\CSMMETERINGLOG\\wal\\%f" "%p"' recovery_target_time = '2016-03-31 05:00:00 JST'
Placing in the CSMACCOUNTING folder
[File to Place] %FSCSM_HOME%\db\CSMACCOUNTING\recovery.conf
Enter the following content in this file:
restore_command = 'copy "F:\\csm_backup\\online\\CSMACCOUNTING\\wal\\%f" "%p"' recovery_target_time = '2016-03-31 05:00:00 JST '
Placing in the CSMSYSTEM folder
[File to Place] %FSCSM_HOME%\db\CSMSYSTEM\recovery.conf
Enter the following content in this file:
restore_command = 'copy "F:\\csm_backup\\online\\CSMSYSTEM\\wal\\%f" "%p"' recovery_target_time = '2016-03-31 05:00:00 JST '
Placing in the CSMAPP folder
[File to Place] %FSCSM_HOME%\db\CSMAPP\recovery.conf
Enter the following content in this file:
restore_command = 'copy "F:\\csm_backup\\online\\CSMAPP\\wal\\%f" "%p"' recovery_target_time = '2016-03-31 05:00:00 JST '
Note
For recovery_target_time, specify a value based on the local time zone.
Start services
Start the services of this product.
net start "FUJITSU Software Cloud Services Management Web Server(APP)"
Note
If the following services do not start or stop immediately after starting, check the recovery definition of each data base folder.
There may be errors in the definition for restore_command.
FUJITSU Software Cloud Services Management DB Service(fjsvfscsmdb_FSCSMSYSTEM)
FUJITSU Software Cloud Services Management DB Service(fjsvfscsmdb_FSCSMACCOUNTING)
FUJITSU Software Cloud Services Management DB Service(fjsvfscsmdb_FSCSMMETERINGLOG)
FUJITSU Software Cloud Services Management DB Service(fjsvfscsmdb_FSCSMAPP)