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.
- On the Deployment details page, click 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
You can encrypt trail files using encryption profiles in the deployment console or by creating master encryption key wallets. This topic covers Encryption profiles with and without resource principals. For information about master encryption key wallets, see Manage encryption keys wallets.
Before you proceed, ensure that you have:
- Access to the Vault service and a Vault created.
Note:
A virtual private vault is not required. - Added the minimum required policies to for OCI GoldenGate to use the Vault service.
Encrypt with resource principal
A resource principal is a feature of Identity and Access Management (IAM) that authorizes resources to act as principal actors that perform actions on your resources. Each resource has its own identity, and the resource authenticates using the certificates that are added to it. These certificates are automatically created, assigned to resources, and rotated, avoiding the need for you to create and manage your own credentials to access the resource.
You can use resource principals to access your Vault key, which you can then use to encrypt trail files. To do so, your deployment must have access to your selected Vault key. Ensure that you've reviewed the requirements listed above in Encrypt trail files, especially the minimum required policies for the Vault service.
- On your deployment details page, click Launch console.
- In the deployment console, in the navigation menu, expand Encryption, and then select Profiles.
- For Oracle Cloud Infratstructure with Resource Principal, click Add Plugin Encryption Profile.
- In the Create Encryption Profile panel, complete the following fields:
- For Profile Name, enter a name for this encryption profile.
- (Optional) Add a description.
- Paste the OCI Vault Key OCID of your OCI Vault. You can find this on your Encryption Key details page in your Vault.
- Enter the Cryptographic endpoint for OCI Vault from your Vault details page.
- Click Submit.
Encrypt without resource principal
- On your deployment details page, click Launch console.
- In the deployment console, in the navigation menu, expand Encryption, and then select Profiles.
- For Oracle Cloud Infratstructure, click Add Plugin Encryption Profile.
- In the Create Encryption Profile panel, complete the following fields:
- Enter a Profile name.
- Enter a Description.
- Paste in the Crypto Endpoint URL, which you can find on your Vault details page.
- Paste in your Tenancy OCID, which you can find on your Tenancy details page.
- Paste in your Key OCID, which you can find on your Key details page.
- Paste in your User OCID, which you can find on your user profile page.
- Upload or paste the API Key, which you can generate from the Tokens and Keys section of your user profle page.
- Paste in your Key Fingerprint, which is associated with your API Key.
- Click Submit.
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, select 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 } ]}'