Manage Trail files
OCI GoldenGate Trail files quickly add up over time. Without purge tasks in place to manage these trail files, daily backups will take exponentially longer to complete and use compute resources that could otherwise be used elsewhere.
Note:
This information applies only to Data replication deployments.Related Topics
View Trail files
You can view Trail files details such as size, sequence, producers, and consumers on the deployment details page.
- From the GoldenGate Overview page, click Deployments.
- On the Deployments page, select a deployment to view its details, or select View details from the deployment's Action menu (ellipsis icon).
- On the Deployment details page, under Resources, click View Trail files.
Use this information to identify Trail files that are no longer used or needed, and then create Purge tasks to manage them.
Encrypt Trail files
Use master encryption keys to encrypt trail files distributed to other GoldenGate deployments. See Manage Master encryption key wallets to learn more.
Purge Trail files
OCI GoldenGate Trail files quickly add up over time. Without purge tasks in place to manage these Trail files, daily backups will take exponentially longer to complete and use compute resources that could otherwise be used elsewhere.
<deployment-name>/var/lib/data/
).
To ensure all Trail files are deleted, you can do one of the following:
- On the deployment details page in the Oracle Cloud console, under Resources, click Trail files and then click Refresh to review the list of Trail files.
- Create another manual backup and check the contents of the backup for the Trail files you wanted to keep. Note the aggregate size reduction and speed that the backup now completes.
REST Examples
The following examples show how to remove Trail files under different conditions:
Example 1: Purge all Trail files whose names match "IL":
curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d '{ "name": "purge", "purgeType": "trails", "trails": [ { "name": "IL" } ], "useCheckpoints": false, "keep": [ { "type": "min", "units": "files", "value": 0 } ]}'
Example 2: Purge all Trail files, as indicated by the asterisk
(*
), within the subdirectory, demo
:
curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d '{ "name": "purge", "purgeType": "trails", "trails": [ { "name": "*", "path": "/u02/Deployment/var/lib/data/demo" } ], "useCheckpoints": false, "keep": [ { "type": "min", "units": "files", "value": 0 } ]}'
Example 3: Purge all L1 Extract Trail files:
curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d '{ "name": "purge", "purgeType": "trails", "trails": [ { "name": "L1" } ], "useCheckpoints": false, "keep": [ { "type": "min", "units": "files", "value": 0 } ]}'
Example 4: Purge all Trail files whose names match "L1" but keep files from the last 10 hours:
curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d '{ "name": "purge", "purgeType": "trails", "trails": [ { "name": "L1" } ], "useCheckpoints": false, "keep": [ { "type": "min", "units": "hours", "value": 10 } ]}'
Example 5: Purge all L1 Extract Trail files more than a day old using USECHECKPOINTS:
curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d '{ "name": "purge", "purgeType": "trails", "trails": [ { "name": "L1" } ], "useCheckpoints": true, "keep": [ { "type": "min", "units": "days", "value": 1 } ]}'
Example 6: Purge all L1 Extract Trail files that are more than a day old:
curl -X POST https://<domain-name>/services/v2/commands/execute -n -H 'Content-Type: application/json' -d '{ "name": "purge", "purgeType": "trails", "trails": [ { "name": "L1" } ], "useCheckpoints": false, "keep": [ { "type": "min", "units": "hours", "value": 23 } ]}'
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.