Backup CLI with local storage

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

This documentation is for an Early Access Program (EAP) release of the Backup CLI for Jira and Confluence Cloud. This release isn't intended for production environments, it's for testing purposes only.

We're not enrolling any new customers to this EAP. 

 For any questions contact Atlassian support

On this page:

What is the Backup CLI?

The Backup CLI (command-line interface) is an application that you can use to download a copy of your Confluence or Jira Cloud product data to your own storage. It enables you to back up your data, so you can protect against data loss in the event of accidental deletion or corruption. Learn about Restore CLI

What data is included in a backup?

Your backup is a complete copy of your product data.

ProductBackup contents
Confluence
  • Users and group data

  • Space data (e.g. user-generated content such as pages, comments, and attachments)

  • Confluence global data (e.g. templates)

Jira
  • Users and group data

  • Project data (e.g. user generated content such as issues, descriptions, comments, and attachments)

A backup isn’t a snapshot of Confluence at the time the backup was started. This is because changes made to Confluence while a backup is in progress may be included in the backup.

If your product data includes restricted content, you may need to secure your backup. This is because your backup will contain this content without any restrictions, and anyone with access to your backup will be able to view it.

Set up the CLI

Before you can start a backup, you need to set up the CLI. The same CLI is used for both backup and restore. 

To set up your CLI:

  1. Download the Backup CLI jar from https://go.atlassian.com/backuptool.

  2. Configure your system. The Backup CLI jar requires JRE 11 to run. Download JRE 11 and install it.

  3. Prepare your firewall. To create a backup, the CLI needs to connect to a specific set of Atlassian domains. If these are blocked by a firewall or reverse proxy, the backup can fail. Before you begin a backup, make sure security rules do not block these domains:

In addition, make sure that the URL of your Confluence or Jira is not blocked.

Use the CLI to create a backup

Once you’ve set up the CLI, you need to connect your product to the CLI, then you can start your backup.

To interact with the Backup CLI application, you need to use your operating system’s CLI. Learn more about using Command Line Interface

Connect your product to the CLI

This step is built on our migration experience and some of the terminology in it reflects this. This terminology may be changed in future versions.

You don’t need to connect to the CLI every time you create a backup. The CLI will remember the connection details for 40 days, after which you’ll need to connect again.

You must be a site admin to connect a product to the CLI.

To connect Confluence or Jira:

  1. Open your operating system’s CLI.

  2. Navigate to the folder containing the Backup CLI and run:

    java -jar <buc filename>.jar product connect --product=<Confluence or Jira>
  3. From the output, copy the Migrate from URL.

  4. Switch to your browser, and then to the tab, Choose your destination cloud site. This tab should have opened automatically .

  5. Paste the Migrate from URL.

  6. Follow the remaining instructions.

If Connect a product doesn’t open automatically, check the Backup CLI output. It should include a URL you can use to open it directly.

Once you’ve connected your product, you can switch back to the Backup CLI.

Start a new backup

When you trigger a new backup, the CLI checks first if there is a backup in progress. If there is, the CLI resumes that backup. If there isn't, it asks whether to start a new backup, and you need to answer with y or N

When entering the command for backup, you need to include the <product>, which is either Confluence or Jira. You also need to include the <product name> of your Confluence or Jira. You can find this name by looking at its URL. For example, if the URL is myteam.atlassian.net/wiki, your product name is “myteam”.

To start a new backup using the jar, run:

java -jar <buc filename>.jar backup start --product=<Confluence or Jira> --name=<product name>

After the backup is finished, you’ll see a summary. This will include details about the backup, including how long it took and whether any spaces were skipped.

What to do if your Jira backup fails to authorize container token

If your Jira backup fails and the buc.log file has a Failed to authorize container token error message, then disconnect your Jira product and reconnect it, then start the backup again. If this still happens, contact Atlassian support.

How will I know if spaces were skipped during a back up?

If the Backup CLI is unable to download any spaces, it will display a warning when the backup is finished. This warning will include the number of spaces that were skipped and their names.

If spaces are skipped during one of your backups, contact Atlassian support.

Find data in your backup

In the root directory of your backup you’ll find a README. This file contains information such as the version of the Backup CLI that was used to create the backup, and instructions on how to find data within it.

Backup CLI commands

You need to add a prefix when entering these commands. Add the following before the command: java -jar <buc filename>.jar

In the following commands <product> is either Confluence or Jira, and <product name> is the name in your Confluence or Jira URL. For example, if the URL is myteam.atlassian.net/wiki, your product name is “myteam”.

Command

Description

--help

Displays a list of commands for use in the CLI

--version

Displays the Backup CLI version.

product connect --product=<product>

Adds your product to the CLI so it can be backed up.

product disconnect --product=<product> --name=<product name>

Removes your product from the CLI.

product list

Displays a list of all products that are connected to the CLI. You can use this command to check that your product is connected to the CLI, or to get the name of your Confluence or Jira to start a backup.

backup start --product=<product> --name=<product name>

Starts a new backup.

Last modified on Nov 13, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.