Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mwanders
Partner - Creator
Partner - Creator

Backup repository with CMD but don't know how to enter password

Hello,

Today I have to migrate Qlik to another server and I'm have the password for super user repository. The instruction at the website is pretty clear. I must create a backup of the repository database and I use this instruction below:

Produce a dumpfile for the repository database (that is, a single file for the entire database):

    1. cd "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\<database version>\bin"
    2. pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QSR_backup.tar" QSR

If you are prompted for the PostgreSQL super user password, enter the password that was given during the installation of Qlik Sense.

If I enter the lines and press enter, I get the message "Permission denied", see attachment. I am not prompted to enter a password.

How can I enter my password?

Thank you in advance.

Greeting from Martijn Wanders

7 Replies
anderseriksson
Partner - Specialist
Partner - Specialist

That is strange, normally you would be prompted for the password next.
There are other ways of supplying the password when using pg_dump.exe

It can be supplied in a file and in a environment variable.
Perhaps something of this is in effect?

Do a search for pg_dump.exe and password.

mwanders
Partner - Creator
Partner - Creator
Author

Hi Anders,

Thank you for your reply. On internet I found material about RSM for backup. I tried this and there is a backup now. But I have to restore it so I don't know if everything is alright.

mwanders
Partner - Creator
Partner - Creator
Author

Hi Anders,

Todat I'm at another customer and here I'm prompted for the password but I can not enter this. I read about other solutions such as pgpass etc. but i don't have the knowledge for CMD coding.

How can I implemt such thing in this line?

pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QSR_backup.tar" QSR

anderseriksson
Partner - Specialist
Partner - Specialist

First issue the set command below;

set PGPASSWORD="yourpassword"

Then issue your backup command;

pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "c:\QSR_backup.tar" QSR

mwanders
Partner - Creator
Partner - Creator
Author

I found the answer about entering password. If I enter the password I don't see the code in the screen and it seems that nothing is happening. But that is not the case. You can enter the code and press enter. It works.

p.s: i'm not a CMD specialist 😉

mwanders
Partner - Creator
Partner - Creator
Author

Ah ok. I have to enter the codes seperately. Thanks for clarifying.

kathrinespang
Partner - Contributor III
Partner - Contributor III

I know this is an old thread but I just had the same problem and the solution (when finally figured out) was rather simple. At least in the environment I'm working.

When opening the cmd right click and Run as Admininstrator and after that it worked.