Author Topic: Best way to backup and restore the database.  (Read 2750 times)

JasonM

  • Newbie
  • *
  • Posts: 1
Best way to backup and restore the database.
« on: April 17, 2008, 01:18:51 AM »
Hi,

The docs say the database can be backed up with qbadmin supervisor --backup, which creates backup files in /var/spool/qube/backup.  Then goes onto say that recover, just copy the contents of that folder to the mysql directory (/var/lib/mysql).

However, is there more to it than that?  Because there also log files, if you restored from a backup of say a week ago, there would be a conflict between the database and the logs.  For example, say the database went bad at job 550.  The latest backup was everything up to job 500.  So you restore the database from that backup and restart qube.  The next job would then be 501, but there was already a job 501 created before the database went bad complete with log files ,so there are now two different 501's, which will cause a problem when using the Qube GUI or other means to get the output for that job.  This problem did happen here a while back when we re-installed the database from scratch but didn't delete all the logs.

So in short, what is the proper method to recover qube if the database goes bad?

Thanks.
Jason

eric

  • Hero Member
  • *****
  • Posts: 229
Re: Best way to backup and restore the database.
« Reply #1 on: May 28, 2008, 01:35:03 AM »
This procedure is mostly intended to backup and restore a database for the purposes of transfer from one host to another, not for disaster recovery. If you are attempting to protect the integrity of the Supervisor, here is a list of files that need to be backed up.

  • supervisor_logfile: /var/spool/supelog
  • supervisor_logpath: /var/spool/qube
  • qb_directory: /usr/local/pfx/qube
  • /etc/my.conf
  • /etc/qb.conf
  • /etc/qbwrk.conf
  • /etc/init.d/supervisor
  • innodb_data_home_dir: /var/lib/mysql