Backup CLI EAP documentation

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. As this is an EAP release, it is for testing purposes only and is not intended for production environments. We also do not guarantee the backup service’s availability.

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 product data to your own storage. It’s designed to enable you to archive your data, so you can protect against data loss in the event of accidental deletion or corruption.

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)

Importantly, a backup isn’t a snapshot of your product at the time the backup was started. Changes that are made while a backup is in progress may be included in the backup. To ensure consistency, it's best to avoid using your product while a backup is running.

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. To do this, follow the steps below.

Step 1 - Download the Backup CLI

When downloading the Backup CLI, you can choose between the:

  • Backup CLI jar (suitable for all operating systems)

  • Backup CLI binary (macOS and Linux versions provided)

We recommend using the Backup CLI jar, as it is the most stable version.

Step 2 - Configure your system

Follow the instructions for your version of the Backup CLI.

Backup CLI Jar

The Backup CLI jar requires JRE 11 to run. Download JRE 11 and install it.

Backup CLI binary for Linux

You need to set the executable attribute for the Backup CLI binary.

To do this:

  1. Open Terminal.

  2. Navigate to the folder containing the Backup CLI.

  3. To set the executable attribute, run

    chmod +x <buc filename>
Backup CLI binary for macOS

You need to set the executable attribute and remove the quarantine attribute from the Backup CLI binary.

To do this:

  1. Open Terminal.

  2. Navigate to the folder containing the Backup CLI.

  3. To set the executable attribute, run

    chmod +x <buc filename>
  4. To remove the quarantine attribute, run:

    sudo xattr -r -d com.apple.quarantine <buc filename>

Step 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 these domains are not blocked by security rules:

In addition, you should also 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 can start your backup. To do this, follow the steps below.

To interact with the Backup CLI application, you’ll need to use your operating system’s CLI. On Macs, this is called Terminal, and on Windows, this is called Command Prompt. To learn more about using these CLIs, see What is Command Line Interface (CLI).

Step 1 - 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 be changed in future versions.

To back up Confluence or Jira, you first need to connect it to the CLI. You don’t need to do this every time you create a backup. The CLI will remember the connection details for six months, after which you’ll need to repeat this step.

You must be a site admin to connect a product to the CLI. To do this:

  1. Open your operating system’s CLI (e.g.: Terminal on Macs, or Command Prompt on Windows)

  2. Navigate to the folder containing the Backup CLI.

  3. If using the jar, run:

    java -jar <buc filename>.jar product connect --product=<Confluence or Jira>

    If using the binary, run:

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

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

  6. Paste the Migrate from URL.

  7. Follow the remaining instructions.

If the Connect a product webpage didn’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.

Step 2 – Start a new backup

When entering the command to start a backup, you 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>

To start a new backup using the binary, run:

<buc filename> 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.

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 us.

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. For the:

  • Backup CLI jar add java -jar <buc filename>.jar

  • Backup CLI binary add <buc filename>

Command

Description

--help

Displays a list of commands for use in the CLI

--version

Displays the Backup CLI verson.

product connect --product=<Confluence or Jira>

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

product disconnect --product=<Confluence or Jira> --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=<Confluence or Jira> --name=<Product name>

Starts a new backup.

Last modified on Jul 27, 2022

Was this helpful?

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