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:

  1. From Cloudera Manager, select Replication > Snapshot Policies in the left navigation bar.

    Existing snapshot policies are shown in a table.

  2. To create a new policy, click Create Snapshot Policy.
  3. From the drop-down list, select the service (HDFS or HBase) and cluster for which you want to create a policy.
  4. Provide a name for the policy. Optionally, provide a description.
  5. 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 with finance. You can also create a snapshot for all tables in a given namespace, using the {namespace}:.* syntax.
  6. 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. For example:

  7. 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.
  8. Click Save Policy.

    The new Policy displays on the Snapshot Policies page.

To edit or delete a snapshot policy:

  1. From Cloudera Manager, select Replication > Snapshot Policies in the left navigation bar.

    Existing snapshot policies are shown in a table.

  2. Click the Actions menu shown next to a policy and select Edit or Delete.