3.13. Backups — Bugzilla Harmony documentation

# 3.13. Backups

## 3.13.1. Database

Here are some sample commands you could use to backup your database, depending on what database system you’re using. You may have to modify these commands for your particular setup. Replace the $VARIABLEs with appropriate values for your setup.

### 3.13.1.1. MySQL

mysqldump --max-allowed-packet=32M -u $USERNAME -p $DATABASENAME > backup.sql

The value for max-allowed-packet should be the value you’ve set in your MySQL configuration file, and should be larger than the largest attachment in your database. See the mysqldump documentation for more information on `mysqldump`.

### 3.13.1.2. PostgreSQL

pg_dump --no-privileges --no-owner -h localhost -U $USERNAME > bugs.sql

## 3.13.2. Bugzilla

The Bugzilla directory contains some data files and configuration files which you would want to retain. A simple recursive copy will do the job here.

cp -rp $BUGZILLA_HOME /var/backups/bugzilla

To report bugs in and suggest updates for this documentation, please file them on our bug tracker.