<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Qlik Sense Repository Backup Automation in Management &amp; Governance</title>
    <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38765#M711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the .pgpass file needs to be in the user's profile doing the pg_dump command. Reference: &lt;A href="https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html" title="https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html"&gt;https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PowerShell, this style of approach should work:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cd $env:userprofile\AppData\Roaming\postgresql\&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if (Test-Path $env:userprofile\AppData\Roaming\postgresql\pgpass.conf) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;} else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "localhost:4432:$([char]42):postgres:INSERTYOURSUPERUSERPASSWORD" | set-content pgpass.conf -Encoding Ascii&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Feb 2018 20:22:38 GMT</pubDate>
    <dc:creator>Levi_Turner</dc:creator>
    <dc:date>2018-02-16T20:22:38Z</dc:date>
    <item>
      <title>Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38764#M710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been looking to automate the QS repository backup process using PS. So far I have found some really helpful posts here (&lt;A href="https://community.qlik.com/docs/DOC-16985"&gt;Automating a Qlik Sense Site backup&lt;/A&gt; ) that has worked for people. I have tried that approach but I am stuck at the authentication to the postgres. I get the following error - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"pg_dump: [archiver (db)] connection to database "QSR" failed: fe_sendauth: no password supplied" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone else having or had this issue that you have managed to resolve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created the "pgpass.conf" in "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin\" as per below - &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;localhost:4432:QSR:postgres:[superuserpassword]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also created "pg_hba.conf" in "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\share" as per below -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Allow any user on the local system to connect to any database with&lt;/P&gt;&lt;P&gt;# any database user name using Unix-domain sockets (the default for local&lt;/P&gt;&lt;P&gt;# connections).&lt;/P&gt;&lt;P&gt;#&lt;/P&gt;&lt;P&gt;# TYPE&amp;nbsp; DATABASE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADDRESS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; METHOD&lt;/P&gt;&lt;P&gt;local&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; all&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; all&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trust&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My PS script look as per below - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$Today = Get-Date -UFormat "%Y%m%d_%H%M"&lt;/P&gt;&lt;P&gt;$StartTime = Get-Date -UFormat "%Y%m%d_%H%M"&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;$PostGreSQLLocation = "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$PostGresBackupTarget = "C:\Qlik_Backups"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Shared Persistance Folder&lt;/P&gt;&lt;P&gt;$SenseProgramData = "...."&lt;/P&gt;&lt;P&gt;$Today = Get-Date -UFormat "%Y%m%d_%H%M"&lt;/P&gt;&lt;P&gt;$StartTime = Get-Date -UFormat "%Y%m%d_%H%M"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write-host "Stopping Qlik Services ...."&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;stop-service QlikSenseProxyService -WarningAction SilentlyContinue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;stop-service QlikSenseEngineService -WarningAction SilentlyContinue&lt;/P&gt;&lt;P&gt;stop-service QlikSenseSchedulerService -WarningAction SilentlyContinue&lt;/P&gt;&lt;P&gt;stop-service QlikSensePrintingService -WarningAction SilentlyContinue&lt;/P&gt;&lt;P&gt;stop-service QlikSenseServiceDispatcher -WarningAction SilentlyContinue&lt;/P&gt;&lt;P&gt;stop-service QlikSenseRepositoryService -WarningAction SilentlyContinue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write-host "Backing up PostgreSQL Repository Database ...."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cd $PostGreSQLLocation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.\pg_dump.exe -h localhost -p 4432 -U postgres -w -F t -f "$PostGresBackupTarget\QSR_backup_$Today.tar" QSR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write-host "PostgreSQL backup Completed"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help with this would be much appreciated. or a solution as to how we can automate the repository backup process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 12:23:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38764#M710</guid>
      <dc:creator>s_kabir_rab</dc:creator>
      <dc:date>2018-02-16T12:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38765#M711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the .pgpass file needs to be in the user's profile doing the pg_dump command. Reference: &lt;A href="https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html" title="https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html"&gt;https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PowerShell, this style of approach should work:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cd $env:userprofile\AppData\Roaming\postgresql\&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if (Test-Path $env:userprofile\AppData\Roaming\postgresql\pgpass.conf) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;} else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "localhost:4432:$([char]42):postgres:INSERTYOURSUPERUSERPASSWORD" | set-content pgpass.conf -Encoding Ascii&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 20:22:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38765#M711</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2018-02-16T20:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38766#M712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for this. I looked at the %APPDATA% and since there were no postgres folder created there, I thought the postgres version used for Qlik perhaps been modified to use the folder structure confidence with-in the Qlik installation directory. This worked like a charm. Thank you again for the prompt response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Feb 2018 23:37:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38766#M712</guid>
      <dc:creator>s_kabir_rab</dc:creator>
      <dc:date>2018-02-17T23:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38767#M713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Levi, your answer solved my problem too.&lt;/P&gt;&lt;P&gt;I was having a similar issue using the QlikSenseUtil inside a powershell: even if I passed all the necessary parameter in the call, once I scheduled on Task Manager the execution of the script, it would stop waiting for the password (as a fact, running manually the script would work smoothly)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again many thanks,&lt;/P&gt;&lt;P&gt;Riccardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 May 2018 20:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38767#M713</guid>
      <dc:creator>rzenere_avvale</dc:creator>
      <dc:date>2018-05-06T20:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38768#M714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Levi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read your comment and tried it and yes it is working fine but I have three concern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Do I need to run your below code in POWERSHELL script every time &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;cd $env:userprofile\AppData\Roaming\postgresql\&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;if (Test-Path $env:userprofile\AppData\Roaming\postgresql\pgpass.conf) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;} else {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "localhost:4432:$([char]42):postgres:INSERTYOURSUPERUSERPASSWORD" | set-content pgpass.conf -Encoding Ascii&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 13px; font-style: inherit; font-weight: inherit;"&gt;2. After &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px;"&gt;Implementing, If I am taking the backup manually,it is not asking me for superuserpassword, It is taking directly from pgpass.conf, how can i change it as it was before ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;3. The Doc which made me to land this page, it is asking for pg_hba.conf in "bin' folder but my backup is getting generated without it, how it is possible ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;Please add your inputs asap&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;Rohit &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 11:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38768#M714</guid>
      <dc:creator>rohitk1609</dc:creator>
      <dc:date>2018-06-04T11:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38769#M715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;1. Do I need to run your below code in POWERSHELL script every time&lt;/P&gt;
&lt;P&gt;cd $env:userprofile\AppData\Roaming\postgresql\&lt;/P&gt;
&lt;P&gt;if (Test-Path $env:userprofile\AppData\Roaming\postgresql\pgpass.conf) {&lt;/P&gt;
&lt;P&gt;} else {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "localhost:4432:$([char]42):postgres:INSERTYOURSUPERUSERPASSWORD" | set-content pgpass.conf -Encoding Ascii&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a conditional, so it checks whether it exists and creates it if it is needed. It would be wise to use that at the beginning but so long as the pgpass.conf file exists in the profile of the user executing the pg_dump, then you would not need a new pgpass.conf file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;2. After Implementing, If I am taking the backup manually,it is not asking me for superuserpassword, It is taking directly from pgpass.conf, how can i change it as it was before ?&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove $env:userprofile\AppData\Roaming\postgresql\pgpass.conf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;3. The Doc which made me to land this page, it is asking for pg_hba.conf in "bin' folder but my backup is getting generated without it, how it is possible ?&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What doc are you referring to? The pg_hba.conf file specifies the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;What user accounts are allowed to logon to PostgreSQL&lt;/LI&gt;&lt;LI&gt;From what network address are those accounts permitted to logon&lt;/LI&gt;&lt;LI&gt;What authentication mechanism those accounts are configured to use&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It basically is the server side configuration which can necessitate the usage of the pgpass.conf to pass the password for a silent backup.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 14:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38769#M715</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2018-06-04T14:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38770#M716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Few points below, Please correct me if I am wrong:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;userprofile\AppData\Roaming\postgresql\' doesn't exists, we need to create "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;postgresql&lt;/SPAN&gt;" folder and then run the powershell script then it will create the pgpass.conf file. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;2. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;Remove $env:userprofile\AppData\Roaming\postgresql\pgpass.conf means if I run above script with removal of it then it will again start asking password when I will create backup manually.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;3. I do create pgpass.conf then put it to \bin folder and pg_bha.conf into 9.6/share folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;4. My policy for running the power shell script is&amp;nbsp; &lt;/SPAN&gt; &lt;EM style="color: #222222; font-family: Georgia, Times, 'Times New Roman', serif; font-size: 16px;"&gt;RemoteSigned.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;EM style="color: #222222; font-family: Georgia, Times, 'Times New Roman', serif; font-size: 16px;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;EM style="color: #222222; font-family: Georgia, Times, 'Times New Roman', serif; font-size: 16px;"&gt;Please correct me if I am wrong.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 17:10:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38770#M716</guid>
      <dc:creator>rohitk1609</dc:creator>
      <dc:date>2018-06-04T17:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38771#M717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Levi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I removed the path from you code &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;Remove $env:userprofile\AppData\Roaming\postgresql\pgpass.conf&amp;nbsp; and my new code is :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if (Test-Path ) {&lt;/P&gt;&lt;P&gt;} else {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "localhost:4432:QSR:postgres:QlikSecure" | set-content pgpass.conf -Encoding Ascii&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but still it is not becoming as it was, means it is still not asking the password when I am doing backup manually&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 04:56:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/38771#M717</guid>
      <dc:creator>rohitk1609</dc:creator>
      <dc:date>2018-06-05T04:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/1589657#M13855</link>
      <description>&lt;P&gt;An alternative method is to use Task Scheduler to run 2 batch files, eg:&lt;/P&gt;&lt;P&gt;&lt;U&gt;DatabaseBackup.bat&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ren "D:\Qlik\Backups\1st_Of_Month" "1st_Of_Month_bak"&lt;/P&gt;&lt;P&gt;mkdir "D:\Qlik\Backups\1st_Of_Month\Database"&lt;/P&gt;&lt;P&gt;C:\"Program Files"\Qlik\Sense\Repository\Util\QlikSenseUtil\QlikSenseUtil.exe -backup -f -databaseHostname="Localhost" -databasePassword="CHANGEME" -path="D:\Qlik\Backups\1st_Of_Month\Database" -rootPath="\\SERVERNAME\SHAREDFOLDERNAME"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;QVD&amp;amp;QlikShareBackup.bat&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mkdir "D:\Qlik\Backups\1st_Of_Month\QlikShare"&lt;/P&gt;&lt;P&gt;xcopy "D:\QlikShare" "D:\Qlik\Backups\1st_Of_Month\QlikShare" /Y /H /E /F /I&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;mkdir "D:\Qlik\Backups\1st_Of_Month\QVD"&lt;/P&gt;&lt;P&gt;xcopy "D:\Qlik\QVD" "D:\Qlik\Backups\1st_Of_Month\QVD" /Y /H /E /F /I&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;rmdir "D:\Qlik\Backups\1st_Of_Month_bak"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;exit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*This method only keeps a record of the last month, but you can tweak the logic to match more/less frequent requirements, or use folder names linked to the date using:&lt;/P&gt;&lt;P&gt;%date:/=-%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 15:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/1589657#M13855</guid>
      <dc:creator>insightbristol</dc:creator>
      <dc:date>2019-06-07T15:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Repository Backup Automation</title>
      <link>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/1742932#M16648</link>
      <description>&lt;P&gt;Late to the party, but here's my contribution to this topic.&lt;/P&gt;&lt;P&gt;Basically the same as Kabir's, but extended for multi-node Sense clusters, as well as starting and stopping Sense services remotely on all the nodes. Also added the logging service to the list of services stopped/started.&lt;/P&gt;&lt;P&gt;Adapt to your specific situation, put the script in a .ps1 Powershell script and schedule using the Windows Scheduler, and you have a pretty solid backup solution for the QSEoW repository and Log databases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;# Script should be executed on the server where the Postgres repository database is running.
# The script will connect to Sense servers as specified below, shutting down Sense services before doing the db backup.
# Once backup is done the Sense services will be started again.


# Automatic execution of this script assumes there is a pgpass.conf file present in the roaming profile of the user 
# executing the script. For user joewest this would mean 'C:\Users\joewest\AppData\Roaming\postgresql\pgpass.conf'
#
# To create that file, execute the following while in the C:\Users\joewest\AppData\Roaming\postgresql (in the case of user joewest) directory:
# "localhost:4432:$([char]42):postgres:ENTER_POSTGRES_PASSWORD_HERE" | set-content pgpass.conf -Encoding Ascii


# Regarding firewalls. The following ports must be allowed inbound on the various Sense servers where Qlik Sense services are running, to allow those services to be stopped/started:
# TCP port: 80,139,443,445,5985,5986
# UDP port: 137,138
# Ephemeral ports: (TCP 1024-4999, 49152-65535)
#
# In Windows Server firewall two rules will be needed, one for TCP and one for UDP. Make sure not to open the firewall more than necessary!

$Today = Get-Date -UFormat "%Y%m%d_%H%M"
$StartTime = Get-Date -UFormat "%Y%m%d_%H%M"
$PostgresLocation = "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin"
$PostgresBackupTarget = "C:\Qlik_Backups"


# Servers where QSEoW services are running. Only host names should be listed beloew, not FQDNs
$servers = @(
  "senseserver1",
  "senseserver2"
)


# Loop over all servers in the QSEoW cluster, shutting down all services on each.
foreach($server in $servers) {
    write-host ""
    write-host "Stopping Qlik Services on $server...."

    # Suffix the Stop-Service comand with "-WarningAction SilentlyContinue" to suppress warning messages when a service takes long to stop
    Get-Service -ComputerName $server -Name QlikSenseProxyService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseEngineService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseSchedulerService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSensePrintingService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseServiceDispatcher | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseRepositoryService | Stop-Service -Verbose
    Get-Service -ComputerName $server -Name QlikLoggingService | Stop-Service -Verbose
}


cd $PostgresLocation
write-host ""
write-host "Backing up PostgreSQL Repository Database ...."


.\pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "$PostgresBackupTarget\QSR_backup_$Today.tar" QSR

write-host "Backing up PostgreSQL Log Database ...."
.\pg_dump.exe -h localhost -p 4432 -U postgres -b -F t -f "$PostgresBackupTarget\QLogs_backup_$Today.tar" QLogs


write-host ""
write-host "PostgreSQL backup Completed"


# Loop over all servers in the QSEoW cluster, shutting down all services on each.
foreach($server in $servers) {
    write-host ""
    write-host "Starting Qlik Services on $server...."

    Get-Service -ComputerName $server -Name QlikSenseProxyService | Start-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseEngineService | Start-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseSchedulerService | Start-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSensePrintingService | Start-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseServiceDispatcher | Start-Service -Verbose
    Get-Service -ComputerName $server -Name QlikSenseRepositoryService | Start-Service -Verbose
    Get-Service -ComputerName $server -Name QlikLoggingService | Start-Service -Verbose
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 17:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Qlik-Sense-Repository-Backup-Automation/m-p/1742932#M16648</guid>
      <dc:creator>mountaindude</dc:creator>
      <dc:date>2020-09-10T17:40:40Z</dc:date>
    </item>
  </channel>
</rss>

