Consistent MySQL dump and home directory backup?

Dennis Benzinger | hybris GmbH September 7, 2011

How can I create a consistent backup of a MySQL database and the home directory of an Atlassian program with as little downtime as possible? For example of Confluence or Jira.

2 answers

1 vote
Dennis Benzinger | hybris GmbH October 4, 2011

Dumping the database and archiving the home directory is not the problem. I was looking for a way to get a consistent state of both together.

Confluence and MySQL run on a Linux server.

EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 4, 2011

That will get you a consistent state of both together, so long as they are run together... We take it a step further and subsequently add the sql to the compressed archive for a single file that represents the full state of the application at the time it was captured.

We have used that method to migrate servers and restore backups without problem.

Dennis Benzinger | hybris GmbH October 4, 2011

But not if you want to keep Confluence running during the backup...

EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 4, 2011

"with as little downtime as possible"

That process takes all of 2 minutes for us. In reality there is no way to backup a live application and ensure that data was not missed, unless you want to make the application read-only for brief periods, which is not yet implemented. https://jira.atlassian.com/browse/CONF-6390

BY the way, this should all be comments to my answer, and not an answer of its own. Showing multiple answers for your question will reduce the likelyhood someone else will jump in.


Dennis Benzinger | hybris GmbH October 4, 2011

Do you shutdown Confluence during the backup or do you just block HTTP access?

0 votes
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2011

A simple cron job is likely the best option, unless you want to write a simple plugin that leverages the scheduler service.

mysqldump database -uusername ppassword

can create a backup of a full DB in very little time

tar -czf /path/to/archive/backup_date.tar.gz path/to/home

can create a compressed tarball of the home directory


but to get a real answer you might provide the OS your using, if you have java or shell experience, whether you are looking to purchase or build, etc.

Otherwise just turn on the daily backups in confluence and trust the XML backups are working - eek!

Suggest an answer

Log in or Sign up to answer