Coder Social home page Coder Social logo

automatic-cloud-backup's Introduction

Introduction

This script can be used to automate backups of Atlassian Cloud JIRA and Confluence instances. It is based on Atlassian Labs' automatic-cloud-backup script:

This repository contains several fixes to the original backup.sh script, which is not even functional in it current state.

This fork was created because Atlassian Labs had ignored all community pull requests and issues for several months.

Configuration

You will need to create a configuration file for the script to work. To do this, copy backup.sh.vars.example to $HOME/.backup.sh.vars and edit it to match your environment.

Usage

Using the script is straightforward. To backup JIRA:

./backup.sh --source jira

To backup Confluence (wiki):

./backup.sh --source wiki

To backup JIRA without attachments:

./backup.sh --source jira --attachments false

Arguments overview:

  • -a, --attachments

    Set if attachments should be in the backup. Values are "true" (default) or "false".

  • -s, --source

    Set what backup should be created. Default source is Jira. Set the argument to "wiki" or "confluence" to backup Confluence.

  • -t, --timestamp

    Set if we should overwrite the previous backup or append a timestamp (default) to prevent just that. The former is useful when an external backup program handles backup rotation. Set the argument to "false" if there should be no timestamp in the filename.

Implementation

The script generates an authorization cookie using your Atlassian credentials if

  • a cookie does not exist, or
  • a cookie exists but is over 24 hours old

Atlassian Cloud only allows creation of one backup per day, counted separately for JIRA and Confluence. However, reuse of the cookie allows running the backup script several times in the row; if a new backup could not be created, then the previously created backup is fetched.

The authorization cookie is used for three things:

  • Triggering the creation of a new backup at the Atlassian Cloud end
  • Checking backup creation progress
  • Downloading the backup once it's ready

Contributing

If you find a problem please file an issue, or better yet, a pull request.

License

The license of the original script is unclear. All contributions by me (Samuli Seppänen) are licensed under the 2-Clause BSD License:

automatic-cloud-backup's People

Contributors

cmclaughlin avatar dszuksztul4atl avatar dzschille avatar kreinoee avatar mac2000 avatar mattock avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.