Product SiteDocumentation Site

2.10. Backups

It is strongly recommended to backup your MantisBT database on a regular basis. The method to perform this operation depends on which RDBMS you use.
Backups are a complex subject, and the specificities of implementing and handling them for each RDBMS are beyond the scope of this document. For your convenience, the section below provides a simple method to backup MySQL databases.
You should also consider implementing backups of your MantisBT code (which includes your configs and possibly customization), as well as issue attachments (if stored on disk) and project documents.


You should always backup your system (code and database) before upgrading !

2.10.1. MySQL Backups

MySQL databases are easy to backup using the mysqldump command:
mysqldump -u<username> -p<password> <database name> > <output file>
To restore a backup you will need to have a clean database. Then run:
mysql -u<username> -p<password> <database name> < <input file>
You can also perform both of these tasks using phpMyAdmin
A good idea is to make a backup script and run it regularly through cron or a task scheduler (for Windows see WinCron ). Using the current date in the filename can prevent overwriting and make cataloguing easier.