top of page

Backing up Atlassian OnDemand

Reason

When somebody wants to backup either the JIRA or Confluence onDemand databases.

Context

Atlassian onDemand does not currently have any features for automating a backup of either JIRA or Confluence.  To get around this we can trigger a backup from Atlassian and then automatically download the resulting file to a location of our choosing.  We can take this a step further by automating this processes with a cron job on Mac or Unix, or by using Windows Task Scheduler.

Disclaimer

These scripts were based on one given for Jira by Marlon Aguiar of Atlassian, the original can be found here.  Some minor modifications were made and a separate script for Confluence was created from the resulting code.


Guide

Jira

  • Create a bash script with the following code, filling in your Atlassian username and password.  Save it as “JiraBackup.sh”.


  • Make the script executable with

chmod +x JiraBackup.sh
  • Execute the script with

./JiraBackup.sh

Confluence

  • Create a bash script with the following code, filling in your Atlassian username and password.  Save it as “ConfluenceBackup.sh”.


  • Make the script executable with

chmod +x ConfluenceBackup.sh
  • Execute the script with

./ConfluenceBackup.sh

The scripts will trigger a backup and automatically download the resulting file to a specially created Backups folder located in the same directory where the script is.

Automating

Windows

Windows users are able to automatically trigger the script by using Windows Task Scheduler.  It is very easy to set up and more information can be found here http://technet.microsoft.com/en-us/library/bb726974.aspx

Mac/Unix

The easiest way to automatically trigger this at regular intervals is to set up a cron job.

  • In the terminal, open your crontab

crontab -e
  • Press i to enter vim’s insert mode

  • Enter your jobs.  The following example will trigger the jobs every 3 days

00 00 3 * *
/BackupJira.sh
00 00 3 * *
/ConfluenceBackup.sh
  • Press [ESC] to exit insert mode

  • Type ZZ (Must be capitals)

  • You can verify the new entries with

crontab -l

Recent Posts

See All
Dependency Chain modelling

<p>A dependency chain is where you have a number of functions that all need to do some part of a piece of work in order to fully deliver it. These functions complete their part and then pass it along

 
 
 
Quick and dirty dependency map automation

<p>After some of my recent articles on building a dependency map, a few people got in touch asking for tips on actually creating them. Here&#8217;s a quick way to get started. You might have noticed t

 
 
 
Sieve of Eratosthenes

<p>I was rummaging around in some old directories and found an implementation of the Sieve of Eratosthenes that I&#8217;d thought I&#8217;d share.  I thought I&#8217;d share it because of the simplici

 
 
 
bottom of page