Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Issue backing up the Ranger KMS DB?

avatar
Explorer

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

avatar
Explorer

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

View solution in original post

1 REPLY 1

avatar
Explorer

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