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.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But not if you want to keep Confluence running during the backup...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you shutdown Confluence during the backup or do you just block HTTP access?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.