<div dir="ltr"><div><div><div><div><div>Hi,<br><br>I'm trying to take a backup of the spacewalk db to flat file so that I can backup with another tool.<br><br></div>I've found the documentation for backing up a postgresql based installation <a href="https://fedorahosted.org/spacewalk/wiki/SpacewalkBackup">here</a> however the instruction says;<br><br></div><ol><li>stop spacewalk services (service-spacwalk stop)</li><li>Issue command to backup db</li></ol></div><br></div>I don't know too much about postgresql but it seems that you need it running to use the pg_dumpall command, a bit like mysqldump.  This has been stopped when I issued the spacewalk-service stop command [1].<br><br></div>With the postgresql service started, I get a problem with the documented backup command:<br><br><pre class=""># su - postgres -c  'pg_dumpall > /var/lib/pgsql/backups/full_postgres_backup-`date +%Y%m%d`.sql'<br>        pg_dump: [archiver (db)] connection to database "template1" failed: FATAL:  no pg_hba.conf entry for host "[local]", user "postgres", database "template1", SSL off<br>pg_dumpall: pg_dump failed on database "template1", exiting<br><br></pre><pre class=""><span style="font-family:arial,helvetica,sans-serif">I'm guessing that the installer modified the pg_hba.conf file in some way which makes the template db unbackupable (a new word which I've just invented, so there). I've tried replacing the all/all line to no<br>avail.<br></span></pre><pre class=""><span style="font-family:arial,helvetica,sans-serif">Any tips on how I can avoid this error and get a nice hot backup for my dinner?<br></span></pre><pre class=""><span style="font-family:arial,helvetica,sans-serif">Regards,<br><br>Matt<br></span></pre><div><br><br>[1]<br><br><span style="font-family:monospace"># spacewalk-service stop<br>Shutting down spacewalk services...<br>Stopping RHN Taskomatic...<br>Stopped RHN Taskomatic.<br>Stopping cobbler daemon:                                   [  OK  ]<br>Stopping rhn-search...<br>Stopped rhn-search.<br>Stopping MonitoringScout ...<br>[ OK ]<br>Stopping Monitoring ...<br>[ OK ]<br>Shutting down osa-dispatcher:                              [  OK  ]<br>Stopping httpd:                                            [  OK  ]<br>Stopping tomcat6:                                          [  OK  ]<br>Terminating jabberd processes ...<br>Stopping s2s:                                              [  OK  ]<br>Stopping c2s:                                              [  OK  ]<br>Stopping sm:                                               [  OK  ]<br>Stopping router:                                           [  OK  ]<br><span style="background-color:rgb(255,255,0)">Stopping postgresql service:                               [  OK  ]</span><br>Done.<br></span><br></div></div>