An Apache Iceberg policy defines when a backup of your Iceberg tables is generated and how long the backup data is retained. The same policy can protect Apache Iceberg tables on the AWS Glue Data Catalog and on Amazon S3 Tables.
Create an Apache Iceberg policy
-
Navigate to Protect > Backup policies. Click Create. The Create policy wizard appears.
-
Type a name for the new policy.
-
From the Add asset types drop-down menu, select Apache Iceberg.
-
Select the backup frequency and retention. You can schedule backups every 1 to 31 days, and retain each backup for a minimum of 1 month.
-
On the Additional options panel, you can do the following:
-
Optionally specify a fixed start time for when backups should begin. Select the Start time checkbox and specify the time zone and the start time. Apache Iceberg policies use a fixed start time; an end time is not configurable.
-
Choose a backup destination to store your backups. In-region backups are kept in the same region as the table being backed up. If you select a different region (out-of-region) to store your backups, additional AWS transfer fees may apply.
-
Review your selections on the Create policy page.
-
Click Save to save the policy and have it display on the Backup policies page.
Snapshot options
By default, each backup captures every snapshot in the table. You can narrow this with two options.
- Back up only the last snapshot: each backup captures only the snapshot with the most recent commit time in the table metadata. In most tables, this is the current snapshot of the main branch.
- Back up only compaction snapshots: each backup captures only the snapshots produced by table compaction. When both options are enabled, each backup captures only the compaction snapshot with the most recent commit time.
The most recent snapshot by commit time can be different from the current snapshot of the main branch:
- After you roll back a table, the snapshot you rolled back from stays the most recent one until the next write to the table.
- If the table has other branches, the most recent snapshot can be on one of those branches.
When you restore a backup, the main branch of the restored table points to the snapshot in that backup. If you roll back tables or write to branches, consider turning off these options, or take an on-demand backup after the next write to the main branch.
These options skip some snapshots, so they reduce the points in time you can restore.
Modify an Apache Iceberg policy
You can modify a policy from the Create policy screen of the wizard before you save it, or later from the Backup policies page. To modify a policy, click the modify icon or the edit button.
Delete an Apache Iceberg policy
Deleting a policy does not affect any backups that have already been generated by the policy. Deleted policies cannot be recovered. To delete a policy, click the delete icon.