[Spacewalk-list] Documentation error and backup question

Matt Bayliss aarrgghh765 at gmail.com
Thu Dec 18 10:38:49 UTC 2014


Hi,

I'm trying to take a backup of the spacewalk db to flat file so that I can
backup with another tool.

I've found the documentation for backing up a postgresql based installation
here <https://fedorahosted.org/spacewalk/wiki/SpacewalkBackup> however the
instruction says;


   1. stop spacewalk services (service-spacwalk stop)
   2. Issue command to backup db


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].

With the postgresql service started, I get a problem with the documented
backup command:

# su - postgres -c  'pg_dumpall >
/var/lib/pgsql/backups/full_postgres_backup-`date +%Y%m%d`.sql'
        pg_dump: [archiver (db)] connection to database "template1"
failed: FATAL:  no pg_hba.conf entry for host "[local]", user
"postgres", database "template1", SSL off
pg_dumpall: pg_dump failed on database "template1", exiting

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
avail.

Any tips on how I can avoid this error and get a nice hot backup for my dinner?

Regards,

Matt



[1]

# spacewalk-service stop
Shutting down spacewalk services...
Stopping RHN Taskomatic...
Stopped RHN Taskomatic.
Stopping cobbler daemon:                                   [  OK  ]
Stopping rhn-search...
Stopped rhn-search.
Stopping MonitoringScout ...
[ OK ]
Stopping Monitoring ...
[ OK ]
Shutting down osa-dispatcher:                              [  OK  ]
Stopping httpd:                                            [  OK  ]
Stopping tomcat6:                                          [  OK  ]
Terminating jabberd processes ...
Stopping s2s:                                              [  OK  ]
Stopping c2s:                                              [  OK  ]
Stopping sm:                                               [  OK  ]
Stopping router:                                           [  OK  ]
Stopping postgresql service:                               [  OK  ]
Done.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20141218/14ec312d/attachment.htm>


More information about the Spacewalk-list mailing list