Managing Snapshot Policies
You must enable an HDFS directory for snapshots to allow snapshot policies to be created for that directory.
To create a snapshot policy:
- From Cloudera Manager, select .
- To create a new policy, click Create Snapshot Policy.
- From the drop-down list, select the service (HDFS or HBase) and the cluster for which you want to create a policy.
- Provide a name for the policy. Optionally, provide a description.
- Specify the directories, namespaces or tables to include in the snapshot.
- For an HDFS service, select the paths of the directories to include in the snapshot.
The drop-down list allows you to select only directories that are enabled for
snapshotting. If no directories are enabled for snapshotting, a warning
displays.
Click to add a path and to remove a path.
- For an HBase service, list the tables to include in your snapshot. You can use a
Java regular expression to specify a set of
tables. For example,
finance.*
matchs all tables with names starting withfinance
. You can also create a snapshot for all tables in a given namespace, using the{namespace}:.*
syntax.
- For an HDFS service, select the paths of the directories to include in the snapshot.
The drop-down list allows you to select only directories that are enabled for
snapshotting. If no directories are enabled for snapshotting, a warning
displays.
- Specify the snapshot Schedule. You can schedule snapshots hourly,
daily, weekly, monthly, or yearly, or any combination of those. Depending on the frequency
you select, you can specify the time of day to take the snapshot, the day of the week, day
of the month, or month of the year, and the number of snapshots to keep at each interval.
Each time unit in the schedule information is shared with the time units of larger
granularity. That is, the minute value is shared by all the selected schedules, hour by
all the schedules for which hour is applicable, and so on. For example, if you specify
that hourly snapshots are taken at the half hour, and daily snapshots taken at the hour
20, the daily snapshot will occur at 20:30.
To select an interval, check its box. Fields display where you can edit the time and number of snapshots to keep.
- Specify whether Alerts should be generated for various state changes in the snapshot workflow. You can alert on failure, on start, on success, or when the snapshot workflow is aborted.
- Click Save Policy.
The new Policy displays on the Snapshot Policies page.
To edit or delete a snapshot policy:
- From Cloudera Manager, select .
- To edit a snapshot, select a policy and click .
- To delete a snapshot, select a policy and click .