This section describes procedures for backing up and restoring ZFS storage pools.
"Backup"
For details on the settings (device settings) in advance for using AdvancedCopy Manager, or on the backup and restoration procedures, refer to "Chapter 6 Replication" or the "ETERNUS SF Operation Guide for Copy Control Module".
Note that the procedures and commands shown here are examples of snapshot-type copying (OPC). For using other types of copying, replace the procedures and commands as needed for each type of copying.
Whereas this document states some typical methods for controlling ZFS for your reference, refer to the operating system manuals for more details on usage.
Point
Below examples of command execution are based on the operating methods for replication operations and AdvancedCopy Manager CCM operations described in "G.2.2 System configuration". Adapt any real control actions to your actual configuration.
Backup operations to run a full backup once a week and a differential backup every day, keeping a total of 7 snapshots for each generation per full backup.
Assign snapshot0 as the name for the snapshot for backups, snapshot1 for the snapshot for differential backup on Day 1, and snapshot2 for that of Day 2.
Backup
This section shows the procedure for a full backup of a transaction storage pool.
No. | Description | Controlling server | At first full backup (*) |
---|---|---|---|
1 | Save the full backup of the preceding generation. | Backup server | |
2 | Create the backup storage pool again. | Backup server | |
3 | Delete all of the snapshots of the transaction storage pool. | Business server | |
4 | Create a snapshot of the transaction storage pool. | Business server | Yes |
5 | Back up the snapshot of the transaction storage pool. | Business server | Yes |
(*) When you make a full backup for the first time, only implement the processes indicated with "Yes".
The procedure for the full backup is as follows:
Save the full backup of the preceding generation.
Before capturing the full backup of the latest generation, save the data of the preceding full backup that is in the backup storage pool.
Export the backup storage pool.
For details, refer to the operating system manuals.
[Example]
# zpool export STP1B # |
Use AdvancedCopy Manager to back up the devices in the backup storage pool to a backup volume for older generations.
Back up all devices constituting the backup storage pool to a backup volume for older generations. If you are using multiple backup volumes for older generations (keeping full backups of 2 or more generations), back up to an unused backup volume or to the one with the oldest generation.
For using replication management
Specify backup group "BKSTP1" as the group and execute swsrpmake (Replication creation command).
[Example]
# /opt/FJSVswsrp/bin/swsrpmake -Xgroup BKSTP1 GROUP=BKSTP1 swsrpmake completed # |
For using AdvancedCopy Manager CCM
Specify backup group "BKSTP1" as the group and execute acopc start (OPC/QuickOPC copy start command) for AdvancedCopy Manager CCM.
[Example]
# /opt/FJSVccm/bin/acopc start -g BKSTP1 DX440/0x11:DX440/0x12 # DATE : 2012/01/01 00:00:00 - << OPC Started >> # From:BoxID=303045343030304d3323232323234534353053323041232323234b44343033303633393030342323/ Olu=11/ Adr_high=0/Adr_low=0/size_high=0/size_low=0 # To :BoxID=303045343030304d3323232323234534353053323041232323234b44343033303633393030342323/ Olu=12/ Adr_high=0/Adr_low=0 Succeeded : 1 Failed : 0 # |
Note
Since processing is carried out for all devices that constitute the storage pool, do not specify any copy pairs.
Create the backup storage pool again.
In order to back up the snapshot of the latest generation, create the backup storage pool on the backup server again. For information on how to create a ZFS storage pool, refer to the operating system manuals.
[Example]
# zpool create -f STP1B c2t1d11 # |
Delete all snapshots of the transaction storage pool.
Delete all snapshots that are in the transaction storage pool.
For information on how to delete snapshots, refer to the operating system manuals.
[Example]
# zfs destroy STP1@SNAP0 # zfs destroy STP1@SNAP1 # zfs destroy STP1@SNAP2 # zfs destroy STP1@SNAP3 # zfs destroy STP1@SNAP4 # zfs destroy STP1@SNAP5 # zfs destroy STP1@SNAP6 |
Create a snapshot of the transaction storage pool.
Create a snapshot of the transaction storage pool for full backup.
For information on how to create snapshots, refer to the operating system manuals.
[Example]
# zfs snapshot -r STP1@SNAP0 # |
Back up the snapshot of the transaction storage pool.
Use the zfs send and zfs receive commands of ZFS to back up the snapshot of the transaction storage pool to the backup storage pool. (Full backup)
For information on how to use the zfs send and zfs receive commands, refer to the operating system manuals.
[Example]
# zfs send -R STP1@SNAP0 | ssh [backup-server] zfs receive -F STP1B # |
This section shows the procedure for a differential backup of a transaction storage pool.
No. | Description | Controlling server |
---|---|---|
1 | Create a snapshot of the transaction storage pool. | Business server |
2 | Back up the snapshot of the transaction storage pool. | Business server |
The procedure for the differential backup is as follows:
Create a snapshot of the transaction storage pool.
Create a snapshot of the transaction storage pool for differential backup.
For information on how to create snapshots, refer to the operating system manuals.
[Example]
# zfs snapshot -r STP1@SNAP4 # |
Back up the snapshot of the transaction storage pool.
Use the zfs send and zfs receive commands of ZFS to back up the snapshot of the transaction storage pool to the backup storage pool. (Differential backup)
For information on how to use the zfs send and zfs receive commands, refer to the operating system manuals.
[Example]
Back up the differential data for SNAP4 (differential data between SNAP3 and SNAP4).
# zfs send -i STP1@SNAP3 STP1@SNAP4 | ssh [backup-server] zfs receive -F STP1B # |
Restoration
This section shows the procedure for restoring a latest-generation full backup and its differential backup generations.
No. | Description | Controlling server |
---|---|---|
1 | Unmount all ZFS file systems that are in the transaction storage pool. | Business server |
2 | Delete the transaction storage pool. | Business server |
3 | Export the backup storage pool. | Backup server |
4 | Use AdvancedCopy Manager to restore from the devices in the backup storage pool to the devices in the transaction storage pool. | Business server or backup server |
5 | Change the pool name and import the restored devices. | Business server |
6 | Roll back to the snapshots to be restored. | Business server |
7 | Mount the target ZFS file systems. | Business server |
The procedure for restoring from the latest generations is as follows:
Unmount all ZFS file systems that are in the transaction storage pool.
Unmount all ZFS file systems that are in the transaction storage pool to be restored. For information on how to unmount ZFS file systems, refer to the operating system manuals.
[Example]
# zfs mount STP1/data1 /mnt/data1 STP1/data2 /mnt/data2 # # zfs umount /mnt/data1 # zfs umount /mnt/data2 # |
Delete the transaction storage pool.
Delete (destroy) the transaction storage pool that is to be restored. For information on how to delete a ZFS storage pool, refer to the operating system manuals.
[Example]
# zpool destroy STP1 # |
Export the backup storage pool.
Export the backup storage pool. For details, refer to the operating system manuals.
[Example]
# zpool export STP1B # |
Use AdvancedCopy Manager to restore from the devices in the backup storage pool to the devices in the transaction storage pool.
Use AdvancedCopy Manager commands to restore from the devices in the backup storage pool to the devices in the transaction storage pool.
For using replication management
Specify group (R0STP1) as the group to be restored from the latest generation and execute swsrpmake (Replication creation command).
[Example]
# /opt/FJSVswsrp/bin/swsrpmake -Xgroup R0STP1 GROUP=R0STP1 swsrpmake completed # |
For using AdvancedCopy Manager CCM
Specify the group to be restored from the latest generation and execute acopc start (OPC/QuickOPC copy start command) for AdvancedCopy Manager CCM.
[Example]
# /opt/FJSVccm/bin/acopc start -g R0STP1 DX440/0x11:DX440/0x01 # DATE : 2012/01/01 00:00:00 - << OPC Started >> # From:BoxID=303045343030304d3323232323234534353053323041232323234b44343033303633393030342323/Olu=11/ Adr_high=0/Adr_low=0/size_high=0/size_low=0 # To :BoxID=303045343030304d3323232323234534353053323041232323234b44343033303633393030342323/Olu=1/ Adr_high=0/Adr_low=0 Succeeded : 1 Failed : 0 # |
Note
Since processing is carried out for all devices that constitute the storage pool, do not specify any copy pairs.
Change the pool name and import the restored devices.
Import the devices that you restored in Step 4. Since the pool name is currently that of the backup storage pool, modify the pool name to that of the original transaction storage pool before you start the import. For information on how to import a ZFS storage pool, refer to the operating system manuals.
[Example]
# zpool import STP1B STP1 # |
Roll back to the snapshots to be restored.
Roll back to the snapshots to be restored. For information on how to roll back to the snapshots, refer to the operating system manuals.
[Example]
For rolling back to the differential backup of Day 4 (SNAP4)
# zfs rollback STP1@SNAP4 # |
Mount the target ZFS file systems.
Mount the ZFS file systems that are in the restored transaction storage pool. If the ZFS file systems have not been mounted automatically by step 6, mount them manually.
For information on how to mount ZFS file systems, refer to the operating system manuals.
[Example]
# zfs mount STP1/data1 # zfs mount STP1/data2 # |
This section shows the procedure for restoring from an older-generation full backup and its differential backups.
No. | Description | Controlling server |
---|---|---|
1 | Unmount all ZFS file systems that are in the transaction storage pool. | Business server |
2 | Delete the transaction storage pool. | Business server |
3 | Use AdvancedCopy Manager to restore from the backup volume for older generations to the devices in the transaction storage pool. | Business server or backup server |
4 | Change the pool name and import the restored devices. | Business server |
5 | Roll back to the snapshots to be restored. | Business server |
6 | Mount the target ZFS file systems. | Business server |
The procedure for restoring from older generations is as follows:
Unmount all ZFS file systems that are in the transaction storage pool.
Unmount all ZFS file systems that are in the transaction storage pool to be restored. For information on how to unmount ZFS file systems, refer to the operating system manuals.
[Example]
# zfs mount STP1/data1 /mnt/data1 STP1/data2 /mnt/data2 # # zfs umount /mnt/data1 # zfs umount /mnt/data2 # |
Delete the transaction storage pool.
Delete (destroy) the transaction storage pool that is to be restored. For information on how to delete a ZFS storage pool, refer to the operating system manuals.
[Example]
# zpool destroy STP1 # |
Use AdvancedCopy Manager to restore from the backup volume for older generations to the devices in the transaction storage pool.
Use AdvancedCopy Manager commands to restore from the backup volume for older generations to the devices in the transaction storage pool.
For using replication management
Specify group (R1STP1) as the group to be restored from the older generation and execute swsrpmake (Replication creation command) for the group.
[Example]
# /opt/FJSVswsrp/bin/swsrpmake -Xgroup R1STP1 GROUP=R1STP1 swsrpmake completed # |
For using AdvancedCopy Manager CCM
Specify group (R1STP1) as the group to be restored from the older generation and execute acopc start (OPC/QuickOPC copy start command) for AdvancedCopy Manager CCM.
[Example]
# /opt/FJSVccm/bin/acopc start -g R1STP1 DX440/0x12:DX440/0x01 # DATE : 2012/01/01 00:00:00 - << OPC Started >> From:BoxID=303045343030304d3323232323234534353053323041232323234b44343033303633393030342323/Olu=12/ Adr_high=0/Adr_low=0/size_high=0/size_low=0 # To :BoxID=303045343030304d3323232323234534353053323041232323234b44343033303633393030342323/Olu=1/ Adr_high=0/Adr_low=0 Succeeded : 1 Failed : 0 # |
Note
Since processing is carried out for all devices that constitute the storage pool, do not specify any copy pairs.
Change the pool name and import the restored devices.
Import the devices that you restored in Step 3. Since the pool name is currently that of the backup storage pool, modify the pool name to that of the original transaction storage pool before you start the import.
[Example]
# zpool import STP1B STP1 # |
Roll back to the snapshots to be restored.
Roll back to the snapshots to be restored. For information on how to roll back to the snapshots, refer to the operating system manuals.
[Example]
For rolling back to the differential backup of Day 4 (SNAP4) of the older generation (1 week earlier)
# zfs rollback STP1@SNAP4 # |
Mount the target ZFS file systems.
Mount the ZFS file systems that are in the restored transaction storage pool. If the ZFS file systems have not been mounted automatically by step 5, mount them manually.
For information on how to mount ZFS file systems, refer to the operating system manuals.
[Example]
# zfs mount STP1/data1 # zfs mount STP1/data2 # |