Managing snapshots
Over time, active use of AFMDR might result in a buildup of snapshots on both systems. To
save space on the primary and secondary systems, older snapshots can be pruned. You can use the
apdr clean --snapshot
command to delete older snapshots from both primary and
secondary systems.
About this task
The command deletes all the snapshots older than the valid recovery point.
The command is supported on system versions 1.0.26.0 and above.
You can use the apdr clean --snapshot command to remove the older snapshots
from primary and secondary systems. The command is run from the primary system, and it runs first on
the primary system and then on the secondary. It deletes all old snapshots, leaving only the last
one.
Note: In case the latest snapshot is not a stable snapshot, failover to secondary will not be
successful. Additionally, if no valid snapshot is available, explicit user permission needs to be
given to remove all snapshots but the oldest on both systems.
Procedure
Execute apdr clean --snapshot command from the primary system:
- In the event that a valid recovery point is present the command does not wait for user
confirmation and directly proceeds with deletion of older
snapshots:
[apuser@node0101 ~]$ apdr clean --snapshot Deleting older psnaps Successfully deleted older psnaps head db2_config: psnap-rpo-0900E01859CBCEF2-2-21-07-01-14-00-53 psnap-rpo-0900E01859CBCEF2-2-21-07-01-17-00-53 local db2inst1: psnap-rpo-0900E01859CBCFC5-1-21-07-01-14-00-53 psnap-rpo-0900E01859CBCFC5-1-21-07-01-17-00-53 data db2inst1: psnap-rpo-0900E01859CBCE7A-1-21-07-01-14-00-53 psnap-rpo-0900E01859CBCE7A-1-21-07-01-17-00-53 local db2archive: psnap-rpo-0900E01859CBCFC5-2-21-07-01-14-00-53 psnap-rpo-0900E01859CBCFC5-2-21-07-01-17-00-53 head keystore: psnap-rpo-0900E01859CBCEF2-1-21-07-01-14-00-53 psnap-rpo-0900E01859CBCEF2-1-21-07-01-17-00-53
- In the event that no valid recovery point is available, the following message is displayed to
confirm the user's action to remove all snapshots but the latest on both systems. If the user enters
No, the operation exits:
If the user enters Yes, then all snapshots but the latest are removed:[apuser@node0101 ~]$ apdr clean --snapshot Deleting older psnaps WARNING: The latest Valid Recovery Point not found. Attempting to remove all snapshots but the latest. Do you want to continue ?[No|Yes]: No Exiting clean operation
[apuser@node0101 ~]$ apdr clean --snapshot Deleting older psnaps WARNING: The latest Valid Recovery Point not found. Attempting to remove all snapshots but the latest. Do you want to continue ?[No|Yes]: Yes Successfully deleted older psnaps head db2_config: psnap-rpo-0A0B764A609302CF-2-21-05-24-13-42-51 psnap-rpo-0A0B764A609302CF-2-21-05-25-08-26-29 local db2inst1: psnap-rpo-0A0B764A609302FE-1-21-05-24-13-42-51 psnap-rpo-0A0B764A609302FE-1-21-05-25-08-26-29 scratch db2archive: psnap-rpo-0A0B764A60930316-1-21-05-24-13-42-51 psnap-rpo-0A0B764A60930316-1-21-05-25-08-26-29 data db2inst1: psnap-rpo-0A0B764A609302E7-1-21-05-24-13-42-51 psnap-rpo-0A0B764A609302E7-1-21-05-25-08-26-29 head keystore: psnap-rpo-0A0B764A609302CF-1-21-05-24-13-42-51 psnap-rpo-0A0B764A609302CF-1-21-05-25-08-26-29