This paragraph explains the sample script that simplifies automation of inter-box backup provided by AdvancedCopy Manager CCM.
Sample Script Name/Storage Directory
Name and storage directory of sample script are explained below:
Copy all files under the storage directory of the sample script to another folder. In addition, use them after revising for the actual backup operation.
For Windows
Types | Batch File Name | Storage Directory Name |
---|---|---|
Backup | nas_rec_backup.bat | <Environment Directory >\CCM\etc\sample\nasrec |
For Solaris/Linux
Types | Script File Name | Storage Directory Name |
---|---|---|
Backup | nas_rec_backup.sh | /etc/opt/FJSVccm/samp/nasrec |
Operating Conditions
This sample script will be executed on a Management Server.
For the required volume and copy group/copy pair, refer to "F.2.1 Creation of Environment".
Note
Only a copy pair can be defined in each copy group.
No validation of the number of copy pairs or defined volume combination in a copy group are performed by the sample script provided. Define the correct volumes.
All of the AdvancedCopy Manager CCM commands executed by the sample script provided will be executed in units of copy group. For that reason, in the case multiple copy pairs are defined in a copy group, copies will be executed simultaneously.
Setting of Script Execution Policy of PowerShell (For Windows)
Set execution policy of the script.
Set the execution policy at RemoteSigned or Unrestricted according to the method mentioned in the following URL:
http://technet.microsoft.com/en-us/library/ee176961.aspx
How to start
For Windows
nas_rec_backup.bat NASCopyGroup RECCopyGroup QuickCopyGroup
For Solaris/Linux
nas_rec_backup.sh NASCopyGroup RECCopyGroup QuickCopyGroup
Operands
Copy group name (QuickOPC) of NAS volume and NAS backup volume in the operation side
Copy group name (REC) of NAS backup volume in the operation side and the volume for REC in the stand-by/backup side
Copy group name (QuickOPC) of the volume for REC and the backup volume in the stand-by/backup side
Exit Status
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
4 | Invalid copy mode |
5 | Invalid environment |
Examples
Example of use of this script when it was executed in Solaris with normal completion
> nas_rec_backup.sh NAS_QuickOPC_NAS_Vol_0_1 RECGRP QUICKGRP nas_rec_backup start backup from NAS volume to primary backup volume start backup from NAS volume to primary backup volume end rc=0 rec from primary backup volume to rec dest volume start rec from primary backup volume to rec dest volume end rc=0 suspend rec from primary backup volume to rec dest volume start suspend rec from primary backup volume to rec dest volume end rc=0 copy from rec dest volume to secondary backup volume start copy from rec dest volume to secondary backup volume end rc=0 resume rec from primary backup volume to rec dest volume start resume rec from primary backup volume to rec dest volume end rc=0 nas_rec_backup end rc=0 >
Example of use of this script when it was executed in Solaris with abnormal completion
> nas_rec_backup.sh NAS_QuickOPC_NAS_Vol_0_1 RECGRP QUICKGRP nas_rec_backup start backup from NAS volume to primary backup volume start ccmxxxxx(Some error occurred in AdvancedCopy Manager CCM and AdvancedCopy Manager CCM output a message) backup from NAS volume to primary backup volume end rc=2 nas_rec_backup end rc=2 >
Message Lists
This script outputs a message in the standard output. The output messages are as follows:
Explanation
Backup script will start.
Explanation
The parameter of the script is invalid.
System Administrator Corrective Action
Check the contents of the designated parameter. Re-run after designating a correct value for the parameter.
Explanation
The execution environment of the script is invalid.
System Administrator Corrective Action
Check if the required script is correctly arranged or the contents of the copy group are correct. In the case it is the invalid state, change it into the right state and re-run it.
Explanation
Backup processing from NAS volume to NAS backup volume will start.
Explanation
The backup processing from NAS volume to NAS backup volume is completed with return code rc.
Parameters
rc | Meaning |
---|---|
0 | Completed successfully |
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
5 | Invalid environment |
System Administrator Corrective Action
Take corrective action according to the error message output immediately before this message.
Explanation
REC processing from NAS backup volume to the volume for REC will start.
Explanation
The copy state is invalid.
Explanation
The copy mode is invalid.
Explanation
The REC processing from NAS backup volume to the volume for REC is completed with return code rc.
Parameters
rc | Meaning |
---|---|
0 | Completed successfully |
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
5 | Invalid environment |
System Administrator Corrective Action
Take a measure according to the error message output immediately before this message.
Explanation
REC suspension processing from NAS backup volume to the volume for REC has started.
Explanation
REC suspension processing from NAS backup volume to the volume for REC is completed with return code rc.
Parameters
rc | Meaning |
---|---|
0 | Completed successfully |
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
4 | Invalid copy mode |
5 | Invalid environment |
System Administrator Corrective Action
Take a measure according to the error message output immediately before this message.
Explanation
Copy processing from the volume for REC to the backup volume has started.
Explanation
Copy processing from the volume for REC to the backup volume is completed with return code rc.
Parameters
rc | Meaning |
---|---|
0 | Completed successfully |
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
5 | Invalid environment |
System Administrator Corrective Action
Take a measure according to the error message output immediately before this message.
Explanation
REC resume processing from NAS backup volume to the volume for REC has started.
Explanation
REC resume processing from NAS backup volume to the volume for REC is completed with return code rc.
Parameters
rc | Meaning |
---|---|
0 | Completed successfully |
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
5 | Invalid environment |
System Administrator Corrective Action
Take a measure according to the error message output immediately before this message.
Explanation
The backup script is completed with return code rc.
Parameters
rc | Meaning |
---|---|
0 | Completed successfully |
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
4 | Invalid copy mode |
5 | Invalid environment |
System Administrator Corrective Action
Take a measure according to the error message output immediately before this message.
Script in Each Processing Phase
This script sequences scripts for each of the processing phases shown below. Arrange these scripts in the same storage directory as that of the sample script.
For Windows
Types | Batch File Name | Storage Directory Name |
---|---|---|
Backup | start_nas_backup.ps1 | <Environment Directory >\CCM\etc\sample\nasrec |
For Solaris/Linux
Types | Script File Name | Storage Directory Name |
---|---|---|
Backup | start_nas_backup.sh | /etc/opt/FJSVccm/samp/nasrec |
start_nas_backup
start_nas_backup.ps1 NASCopyGroup
start_nas_backup.sh NASCopyGroup
Execute acnas backup command.
Copy group name (QuickOPC) of NAS volume and NAS backup volume
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
5 | Invalid environment |
wait_qopc_completion
wait_qopc_completion.ps1 QuickCopyGroup
wait_qopc_completion.sh QuickCopyGroup
Queue physical copy completion of QuickOPC.
Copy group name of QuickOPC
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
5 | Invalid environment |
start_rec
start_rec.ps1 RECCopyGroup
start_rec.sh RECCopyGroup
Start REC.
Copy group name of REC
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM Command error |
3 | Abnormal copy state |
5 | Invalid environment |
wait_rec_equivalent
wait_rec_equivalent.ps1 RECCopyGroup
wait_rec_equivalent.sh RECCopyGroup
Queue equivalency of REC.
Copy group name of REC
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
4 | Invalid copy mode |
5 | Invalid environment |
suspend_rec
suspend_rec.ps1 RECCopyGroup
suspend_rec.sh RECCopyGroup
Suspend REC.
Copy group name of REC
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
3 | Abnormal copy state |
5 | Invalid environment |
start_qopc
start_qopc.ps1 QuickCopyGroup
start_qopc.sh QuickCopyGroup
Execute QuickOPC.
Copy group name of QuickOPC
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
5 | Invalid environment |
resume_rec
resume_rec.ps1 RECCopyGroup
resume_rec.sh RECCopyGroup
Resume REC.
Copy group name of REC
=0: Completed successfully
>0: Terminated abnormally
Exit Status | Meaning |
---|---|
1 | Parameter error |
2 | AdvancedCopy Manager CCM command error |
5 | Invalid environment |