nbalonso.com

Backup and Restore Munkireport-php

| Comments

Here’s a little tip of how I backup my mr-php MySQL database

1
bash-3.2$ mysqldump -u root -p munkireport | bzip2 -c > ${HOME}/dbdump_`date +%d-%m-%Y`.bz2

This command will prompt for the MySQL root password and generate a compressed backup of the database in your home folder.

For restoring it, this command will uncompress it and restored to the munkireport database.

1
bash-3.2$ bzcat ~/dbdump_21-07-2014.bz2 | mysql -u root munkireport

These are just two examples. You can use any user account that has access to the database and your database might not be called munkireport

Comments