Importing and exporting tag-based policies

You can export and import policies from the Ranger Admin UI for cluster resiliency (backups), during recovery operations, or when moving policies from test clusters to production clusters. You can import or export a specific subset of policies (such as those that pertain to specific resources or user/groups) or clone the entire repository (or multiple repositories) via the Ranger Admin UI.


You can import and export policies from Service Manager > Tag Policies > Tag:

You can also export policies from Reports:

Table 1. Export Policy Options
Service Manager Page Reports Page
Formats JSON




Filtering Supported No Yes
Specific Service Export Yes Via filtering


When exporting from the Reports page, you can apply filters before saving the file.

Export Formats

You can export policies in the following formats:
  • Excel

  • JSON

  • CSV

When you export policies from the Service Manager page, the policies are automatically downloaded in JSON format. If you wish to export in Excel or CSV format, export the policies from the Reports page dropdown menu.

Required User Roles

The Ranger admin user can import and export only Resource & Tag based policies. The credentials for this user are set in Ranger Configs > Advanced ranger-env in the fields labeled admin_username (default: admin/admin).

The Ranger KMS keyadmin user can import and export only KMS policies. The default credentials for this user are keyadmin/keyadmin.


To successfully import policies, use the following database versions:
  • MariaDB: 10.1.16+

  • MySQL: 5.6.x+

  • Oracle: 11gR2+

  • PostgreSQL: 8.4+

  • MS SQL: 2008 R2+