Backup resources that use the PostgreSQL point-in-time recovery (PITR) mechanism (metering resources), which are among the resources that are obtained in online backup of the admin server, are stored in the directory that has been specified in the settings file, regardless of the storage destination specified by the command.
This section describes how to enable online backup of metering resources, and how to change the backup destination directory.
When online backup is enabled, in order to change the backup destination directory, the following files and items must be changed.
File to be Changed | File name | Item to be Changed |
---|---|---|
Operational settings file for the database | postgresql.conf | WAL save directory |
WAL saving settings (archive_mode) | ||
Operational settings file for online backup | ctmgbackup.properties | WAL save directory |
Backup directory |
Stop the manager.
For details on how to stop the manager, refer to "2.1 Starting and Stopping Managers".
Modify the operational settings file for the following databases.
[Windows Manager]
Installation_folder\RCXCTMG\Charging\pgsql\data\postgresql.conf
[Linux Manager]
/var/opt/FJSVctchg/pgsql/data/postgresql.conf
Change as follows:
Setting before change
archive_mode = off
Setting after change
archive_mode = on
This section describes how to change the backup destination directory, based on the example shown below.
[Windows Manager]
Directory | Type | Directory Path |
---|---|---|
Backup directory | Before change | C:\Fujitsu\ROR\RCXCTMG\backup\data |
After change | D:\basebackup | |
WAL save directory | Before change | C:\Fujitsu\ROR\RCXCTMG\backup\wal |
After change | E:\walbackup |
[Linux Manager]
Directory | Type | Directory Path |
---|---|---|
Backup directory | Before change | /var/opt/FJSVctchg/backup/data |
After change | /basebackup | |
WAL save directory | Before change | /var/opt/FJSVctchg/backup/wal |
After change | /walbackup |
Create a new backup directory.
[Windows Manager]
> D: <RETURN> > cd \ <RETURN> > mkdir basebackup\Charging <RETURN> > E: <RETURN> > cd \ <RETURN> > mkdir walbackup\Charging <RETURN>
[Linux Manager]
# mkdir /basebackup <RETURN> # mkdir /walbackup <RETURN>
Set access privileges for users connected with the database, for the directory.
[Windows Manager]
>cacls D:\basebackup\Charging /T /E /G rcxctdbchg:F <RETURN> >cacls E:\walbackup\Charging /T /E /G rcxctdbchg:F <RETURN>
[Linux Manager]
# chown -R rcxctdbdhg:rcxctdbchg /basebackup <RETURN> # chown -R rcxctdbdhg:rcxctdbchg /walbackup <RETURN>
Copy (move) files from the existing directory to the new directory.
[Windows Manager]
>xcopy c:\Fujitsu\ROR\RCXCTMG\backup\data\* D:\basebackup\ /E /H /K /X <RETURN> >xcopy c:\Fujitsu\ROR\RCXCTMG\backup\wal\* E:\walbackup\ /E /H /K /X <RETURN>
[Linux Manager]
# cp -pR /var/opt/FJSVctchg/backup/data/* /basebackup/. <RETURN> # cp -pR /var/opt/FJSVctchg/backup/wal/* /walbackup/. <RETURN>
Modify the operational settings file for the database.
Change the settings for the following operational settings file for each database cluster:
[Windows Manager]
Installation_folder\RCXCTMG\Charging\pgsql\data\postgresql.conf
Change as follows:
Setting before Change
archive_command = 'copy "%p" "C:\\Fujitsu\\ROR\\RCXCTMG\\backup\\wal\\Charging\\%f"' # command to use to archive a logfile segment
Setting after Change
archive_command = 'copy "%p" "E:\\walbackup\\Charging\\%f"' # command to use to archive a logfile segment
Point
Use "\\" as a delimiter.
[Linux Manager]
/var/opt/FJSVctchg/pgsql/data/postgresql.conf
Setting before Change
archive_command = 'cp "%p" "/var/opt/FJSVctchg/backup/wal/%f"' # command to use to archive a logfile segment
Setting after Change
archive_command = 'copy "%p" "E:\\walbackup\\Charging\\%f"' # command to use to archive a logfile segment
Point
Use "/" as a delimiter.
Modify the operational settings file for the online backup.
Open the following file:
[Windows Manager]
Installation_folder\RCXCTMG\bin\conf\ctmgbackup.properties
Change as follows:
Setting before Change
BASE_BACKUP_DIR=C:/Fujitsu/ROR/RCXCTMG/backup/data WAL_ARCHIVE_DIR=C:/Fujitsu/ROR/RCXCTMG//backup/wal
Setting after Change
BASE_BACKUP_DIR=D:/basebackup WAL_ARCHIVE_DIR=E:/walbackup
Point
Use "/" as a delimiter.
[Linux Manager]
/opt/FJSVctmg/bin/conf/ctmgbackup.properties
Change as follows:
Setting before Change
BASE_BACKUP_DIR=/var/opt/FJSVctchg/backup/data WAL_ARCHIVE_DIR=/var/opt/FJSVctchg/backup/wal
Setting after Change
BASE_BACKUP_DIR=/basebackup WAL_ARCHIVE_DIR=/walbackup
Point
Use "/" as a delimiter.
Restart the manager.
For details on how to start the manager, refer to "2.1 Starting and Stopping Managers".