Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Issue backing up the Ranger KMS DB?

Solved Go to solution

Issue backing up the Ranger KMS DB?

New Contributor

Hi,


Can you provide the procedure for backing up ranger kms? I've backed up the ranger and ranger audit databases using the postgres dump command (pg_dump), but I'm running into an issue when I try the same procedure for the rangerkms database. I tried the following command and got the error shown below. To access the ranger kms I have to login using the keyadmin user. I was thinking that this is my issue, that I'm trying to create a backup of this database using the wrong user? Any thoughts are suggestions are appreciated as I haven't been able to find any support articles on this. Thanks in advance...


pg_dump -U rangeradmin rangerkms > rangerkms.sql

Password:

pg_dump: [archiver (db)] query failed: ERROR: permission denied for relation ranger_masterkey

pg_dump: [archiver (db)] query was: LOCK TABLE public.ranger_masterkey IN ACCESS SHARE MODE



1 ACCEPTED SOLUTION

Accepted Solutions

Re: Issue backing up the Ranger KMS DB?

New Contributor

For those might find this down the road. I just realized I wasn't connecting to the rangerkms db with the correct user. To backup the database I used the rangerkms user (instead of rangeradmin as in my original post.)


sudo pg_dump -U rangerkms rangerkms > rangerkms.sql

1 REPLY 1

Re: Issue backing up the Ranger KMS DB?

New Contributor

For those might find this down the road. I just realized I wasn't connecting to the rangerkms db with the correct user. To backup the database I used the rangerkms user (instead of rangeradmin as in my original post.)


sudo pg_dump -U rangerkms rangerkms > rangerkms.sql