A Python-based backup tool for Atlassian Cloud Jira and Confluence instances with multi-cloud storage support and automated scheduling.
- Jira & Confluence Backups: Create backups for both Jira and Confluence Cloud instances
- Multi-Cloud Support: Stream backups directly to AWS S3, Google Cloud Storage, or Azure Blob Storage
- Local Download: Option to download backup files locally
- Cross-Platform Scheduling: Automatically create cron jobs (Linux/macOS) or scheduled tasks (Windows)
- Configuration Wizard: Interactive setup for easy configuration
- API Token Authentication: Secure authentication using Atlassian API tokens
- Python 3.8 or higher
- Atlassian Cloud account (Jira and/or Confluence)
- API token from Atlassian
- (Optional) Cloud storage account: AWS, Google Cloud, or Azure
pip install jira_backup-
Clone the repository
git clone https://github.com/datreeio/jira-backup-py.git cd jira-backup-py -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install this project with its dependencies
pip install .
- Go to Atlassian API Tokens and create a token.
- See the Configuration section below.
jira_backuplooks for aconfig.yamlfile in the working directory.- You can pass a config file explicitly with
-C /path/to/config.yamlor--config /path/to/config.yaml. - You can generate a config file using the wizard.
- For source checkouts, you can start from the example file:
cp config.example.yaml config.yaml
- The config file is loaded with
yaml.safe_loadand validated with Pydantic before any backup starts. - Keys are case-insensitive.
- Unknown keys are rejected.
- The YAML loader will discard duplicate keys. Only the last occurrence is kept.
- Booleans must be real YAML booleans (
trueorfalse), not quoted strings. host_urlmust be a valid Atlassian hostname without a scheme or other URL components.
---
host_url: "your-instance.atlassian.net"
user_email: "your.email@company.com"
api_token: "your-api-token"
include_attachments: false
download_locally: true
# AWS S3 Configuration (optional)
upload_to_s3:
aws_endpoint_url: ""
aws_region: "us-east-1"
s3_bucket: "my-backup-bucket"
s3_dir: "Atlassian/"
aws_access_key: "your-access-key"
aws_secret_key: "your-secret-key"
aws_is_secure: true
# Google Cloud Storage Configuration (optional)
upload_to_gcp:
gcp_project_id: "my-project-id"
gcs_bucket: "my-backup-bucket"
gcs_dir: "Atlassian/"
gcp_service_account_key: "/path/to/service-account-key.json"
# Azure Blob Storage Configuration (optional)
upload_to_azure:
azure_account_name: "mystorageaccount"
azure_container: "my-backup-container"
azure_dir: "Atlassian/"
azure_connection_string: "DefaultEndpointsProtocol=https;AccountName=..."
azure_account_key: ""
# Custom Filename (optional)
# Supports placeholders:
# - {timestamp} - Current timestamp (DDMMYYYY_HHMM)
# - {date} - Current date (YYYY-MM-DD)
# - {time} - Current time (HHMM)
# - {uuid} - UUID from backup URL
# - {type} - Backup type (jira/confluence)
custom_filename:
jira: "jira.{timestamp}"
confluence: "confluence.{timestamp}"For interactive setup, run:
python -m jira_backup -wThis will guide you through setting up basic Jira credentials and S3 configuration.
# Backup Jira (default)
python -m jira_backup -j
# Backup Confluence
python -m jira_backup -c
# Run configuration wizard
python -m jira_backup -wSet up scheduled backups using system schedulers:
# Setup automated Jira backup every 4 days at 10:00 AM (default)
python -m jira_backup -s
# Setup automated Confluence backup every 7 days at 2:30 PM
python -m jira_backup -s --schedule-days 7 --schedule-time 14:30 --schedule-service confluence
# Setup automated Jira backup every 2 days at 6:00 AM
python -m jira_backup -s --schedule-days 2 --schedule-time 06:00 --schedule-service jiraThis will create:
- Linux/macOS: A cron job in your crontab
- Windows: A scheduled task in Task Scheduler
Scheduled tasks store an absolute config path.
If you do not pass -C or --config,
the scheduler uses config.yaml from the directory where you ran the scheduling command.
| Option | Description |
|---|---|
-j, --jira |
Backup Jira (default if no service specified) |
-c, --confluence |
Backup Confluence |
-C, --config |
Path to the config file (default: config.yaml in the current directory) |
-w, --wizard |
Run configuration wizard |
-s, --schedule |
Setup automated scheduled backup |
--schedule-days |
Frequency in days for scheduled backup (default: 4) |
--schedule-time |
Time for scheduled backup in HH:MM format (default: 10:00) |
--schedule-service |
Service for scheduled backup (jira/confluence, default: jira) |
If you only want to download backups locally without cloud storage,
simply omit the upload_to_xxx sections:
---
host_url: "your-instance.atlassian.net"
user_email: "your.email@company.com"
api_token: "your-api-token"
include_attachments: false
download_locally: trueYou can configure multiple cloud storage providers simultaneously - the script will upload to all configured destinations:
upload_to_s3:
s3_bucket: "my-s3-bucket"
# ... S3 config
upload_to_gcp:
gcs_bucket: "my-gcs-bucket"
# ... GCP config
upload_to_azure:
azure_container: "my-azure-container"
# ... Azure configContributions are welcome! Please feel free to submit issues and pull requests.
- 2025-06-24: Added separate cron schedules for Jira and Confluence backups
- 2025-06-24: Made cloud storage configuration sections optional
- 2025-06-24: Added automated scheduling support for backup tasks
- 2025-06-23: Added Google Cloud Storage and Azure Blob Storage support
- 2020-09-04: Added Confluence backup support
- 2019-01-16: Updated to use API tokens instead of passwords
This project is licensed under the MIT License - see the LICENSE file for details.
- Original concept inspired by Atlassian Labs' automatic-cloud-backup
- Thanks to all contributors who have helped improve this project
- Issues: GitHub Issues
Note: This tool is not officially supported by Atlassian. Use at your own risk and always verify your backups are working correctly.