Backing up codeBeamer installation
Daily backups
Daily back up of your codeBeamer installation should consist of two parts:
Complete codeBeamer database backup
If you are using MySQL database with codeBeamer then you can dump the complete codeBeamer database (including stored procedures) with the following command:
mysqldump --protocol=tcp -u [user] -p[passord] --single-transaction --routines --max_allowed_packet=[packet_size] --default-character-set=[char_set_type] [database] > [dump_file]
Where [user], [password], [packet_size], [char_set_type], [database], [dump_file] is substituted accordingly. See some specific examples:
Example 1:
mysqldump --protocol=tcp -u cbroot -pcbpassword --single-transaction --routines --max_allowed_packet=1024M --default-character-set=utf8 codebeamer > cb.sql
Example 2:
mysqldump --protocol=tcp -u cbroot -pCbPassword01! --single-transaction --routines --max_allowed_packet=1024M --default-character-set=utf8mb4 codebeamer > cb.sql
If other databases - like Oracle - is being used please back up your database using the database specific commands.
In any case it is important to ensure that:
- The database is backed up using a consistent snapshot (the --single-transaction does this in the script above for MySQL).
- The BLOB data is exported too (the --max_allowed_packet setting ensures this: if your BLOBs are bigger than this then please adjust the packet size accordingly)
- The data is exported in UTF-8 data format and your import procedure and the database should be configured properly (--default-character-set=utf8 does this in our MySQL example). Especially watch for this setting when using Oracle.
- All stored procedures must be backed up and restored (see --routines switch).
It is also recommended that backup and restore is reviewed regularly to ensure that backed up data can really be restored!
For more information about databases see: Preparing MySQL Database for Installation and Preparing Oracle Database for Installation
codeBeamer installation directory backup
The best practice is to back up the complete codeBeamer installation directory daily. That makes restores must easier, because you don't have to worry about lost settings or finding codeBeamer binaries or similar.
The most important directory of to back up is the $CB_HOME/repository directory. That contains the documents, SCM repositories, Wiki documents and similar files. So in any case ensure that this directory is completely backed up. For details see Important Files and Directories
Backups for investigation purposes
You can create smaller dump files (i.e. for investigation purposes) by excluding some non-essential tables from the export. To do so, please add the following parameters (beside the ones listed above) to your dump command:
--ignore-table=[database].release_team_stats --ignore-table=[database].document_cache_data_blobs --ignore-table=[database].tomcat_session --ignore-table=[database].tomcat_session_blobs
Where [database] is the database name of your codeBeamer installation.
Example:
mysqldump --protocol=tcp -u cbroot -pcbpassword --single-transaction --routines --ignore-table=codebeamer.release_team_stats --ignore-table=codebeamer.document_cache_data_blobs --ignore-table=codebeamer.tomcat_session --ignore-table=codebeamer.tomcat_session_blobs --max_allowed_packet=1024M --default-character-set=utf8 codebeamer > cb.sql
Sharing backups
It is highly recommended to compress (i.e. using zip or gzip) the database dump before sharing it to significantly reduce its size.
Please refer How to Use Codebeamer SFTP Server how to upload the (compressed) dump to an Intland ftp server.
Other best practices and hints