Skip to main content

Privacera Documentation

Migrate from PrestoSQL to Trino

This procedure helps you to migrate your existing policies from PrestoSQL to Trino.

When migrating previous version of PrestoSQL (versions <350) to Trino (versions >=350), you can also migrate your existing policies from PrestoSQL to Trino service.

Backup all the PrestoSQL Policies

You need to backup all the PrestoSQL policies inside the privacera_presto service. Following steps will guide you how to backup the policies:

  1. Login to Privacera Portal.

  2. On the left nav, go to Access Management, and then select Resource Policies.

  3. Navigate to privacera_presto service.

  4. Click the Export button.

    export.jpg
  5. Save the policies with a custom name such as, privacera_presto_policies_with_default.json

Delete all the Default PrestoSQL Policies

Delete all the Default PrestoSQL Policies for Presto except the new created policies.

This is mandatory because default policies will conflict with the new servicedef.

Policies before deleting the default policies

default_policies.jpg

Policies after deleting the default policies

after_export.jpg

Export Custom PrestoSQL Policies

You need to export the PrestoSQL policies again.

  1. Click the Export button.

    export.jpg
  2. Save the PrestoSQL policies with a custom name such as, privacera_presto_policies_without_default.json

Import Custom PrestoSQL Policies to Trino

Now, you need to import the above exported PrestoSQL policies into privacera_trino.

  1. On the left nav, go to Access Management, and then select Resource Policies.

  2. Navigate to privacera_trino service.

  3. Click the Import button.

    importp.jpg

    An Import Policy dialogue box will appear.

    windows1.jpg
  4. Click Choose file, and select the policy file, privacera_presto_policies_without_default.json.

  5. In the Specify Service Mapping (Source and Destination) section, add privacera_presto and select privacera_trino.

  6. Click the Import button.

Your custom policies from PrestoSQL will be imported into Trino service.

Trino policies before importing

import.jpg

Trino polices after importing

after_import.jpg