Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
in Q2A Core by
What options should i tick so that q2a database will be backed up correctly and safely.
Q2A version: 1.53

2 Answers

+1 vote

It is very simple.

Go to your phpMyAdmin select the question2answer database and you will find export navigation link at the top

Than from dropdown selectoin list select SQL and hit GO and save sql file on your local machiine.


+4 votes
edited by

In addition to what pixelngrain said, you should choose the custom options when backing up, and select the appropriate tables. As noted in the Security section of Q2A docs, you don't need these tables: qa_cache, qa_contentwords, qa_iplimits, qa_posttags, qa_sharedevents, qa_tagwords, qa_titlewords, qa_userevents, qa_userlimits, qa_words.

So select the other tables besides these. Some other options I often use:

  • Set the file name template to include the date, e.g. "@DATABASE@_%Y%m%d" would give something like "q2asite_20121015.sql"
  • Use compression. This makes it much easier to upload a backup (to your local server or just restoring a backup) because the file size is much smaller.
  • Tick the option "Disable foreign key checks" which prevents key errors (e.g. if the posts table is added before the users table, it would give an error because the userid of the post doesn't exist).
  • Tick the "Add DROP TABLE" option. This means your backup will now fully overwrite the existing database instead of trying to add the rows to the database.