{"id":21664004,"url":"https://github.com/datreeio/jira-backup-py","last_synced_at":"2025-08-04T16:40:56.127Z","repository":{"id":36920111,"uuid":"131822668","full_name":"datreeio/jira-backup-py","owner":"datreeio","description":"python script to create, download and upload to s3 your Jira or Confluence cloud instance backup","archived":false,"fork":false,"pushed_at":"2025-06-26T07:04:37.000Z","size":217,"stargazers_count":61,"open_issues_count":3,"forks_count":25,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-26T08:20:41.511Z","etag":null,"topics":["backup","confluence","jira"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datreeio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-02T08:40:20.000Z","updated_at":"2025-06-26T07:04:41.000Z","dependencies_parsed_at":"2025-01-16T02:12:39.090Z","dependency_job_id":"d84cb613-f61f-4283-b7e1-7276565599be","html_url":"https://github.com/datreeio/jira-backup-py","commit_stats":{"total_commits":33,"total_committers":7,"mean_commits":4.714285714285714,"dds":0.3939393939393939,"last_synced_commit":"ba67450c7231bd24974bc9d797793405200fb770"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datreeio/jira-backup-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fjira-backup-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fjira-backup-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fjira-backup-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fjira-backup-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datreeio","download_url":"https://codeload.github.com/datreeio/jira-backup-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datreeio%2Fjira-backup-py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268723203,"owners_count":24296568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","confluence","jira"],"created_at":"2024-11-25T10:30:20.718Z","updated_at":"2025-08-04T16:40:56.115Z","avatar_url":"https://github.com/datreeio.png","language":"Python","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# Jira Backup Python\n\n[![datree-badge](https://s3.amazonaws.com/catalog.static.datree.io/datree-badge-28px.svg)](https://datree.io/?src=badge)\n[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA Python-based backup tool for Atlassian Cloud Jira and Confluence instances with multi-cloud storage support and automated scheduling.\n\n## 🚀 Features\n\n- **Jira \u0026 Confluence Backups**: Create backups for both Jira and Confluence Cloud instances\n- **Multi-Cloud Support**: Stream backups directly to AWS S3, Google Cloud Storage, or Azure Blob Storage\n- **Local Download**: Option to download backup files locally\n- **Cross-Platform Scheduling**: Automatically create cron jobs (Linux/macOS) or scheduled tasks (Windows)\n- **Configuration Wizard**: Interactive setup for easy configuration\n- **API Token Authentication**: Secure authentication using Atlassian API tokens\n\n## 📋 Prerequisites\n\n- Python 3.7 or higher\n- Atlassian Cloud account (Jira and/or Confluence)\n- API token from [Atlassian](https://id.atlassian.com/manage/api-tokens)\n- (Optional) Cloud storage account: AWS, Google Cloud, or Azure\n\n## 🛠️ Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/yourusername/jira-backup-py.git\n   cd jira-backup-py\n   ```\n\n2. **Create a virtual environment**\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n   ```\n\n3. **Install dependencies**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Generate API token**\n   - Go to [Atlassian API Tokens](https://id.atlassian.com/manage/api-tokens) and create a token\n   \n5. **Configure the application**\n   - Create a `config.yaml` file with your settings (see Configuration section below)\n   - Or run the configuration wizard: `python backup.py -w`\n\n## ⚙️ Configuration\n\n### Configuration File Setup\n\nCreate a `config.yaml` file with your settings:\n\n```yaml\n---\nHOST_URL: \"your-instance.atlassian.net\"\nUSER_EMAIL: \"your.email@company.com\"\nAPI_TOKEN: \"your-api-token\"\nINCLUDE_ATTACHMENTS: false\nDOWNLOAD_LOCALLY: true\n\n# AWS S3 Configuration (optional)\nUPLOAD_TO_S3:\n  S3_BUCKET: \"my-backup-bucket\"\n  AWS_ACCESS_KEY_ID: \"your-access-key\"\n  AWS_SECRET_ACCESS_KEY: \"your-secret-key\"\n  AWS_S3_REGION: \"us-east-1\"\n\n# Google Cloud Storage Configuration (optional)\nUPLOAD_TO_GCP:\n  GCP_PROJECT_ID: \"my-project-id\"\n  GCS_BUCKET: \"my-backup-bucket\"\n  GCP_SERVICE_ACCOUNT_KEY: \"/path/to/service-account-key.json\"\n\n# Azure Blob Storage Configuration (optional)\nUPLOAD_TO_AZURE:\n  AZURE_ACCOUNT_NAME: \"mystorageaccount\"\n  AZURE_CONTAINER: \"my-backup-container\"\n  AZURE_CONNECTION_STRING: \"DefaultEndpointsProtocol=https;AccountName=...\"\n  # OR use AZURE_ACCOUNT_KEY instead of connection string\n  # AZURE_ACCOUNT_KEY: \"your-account-key\"\n```\n\n### Configuration Wizard\n\nFor interactive setup, run:\n```bash\npython backup.py -w\n```\n\nThis will guide you through setting up basic Jira credentials and S3 configuration.\n\n## 🚀 Usage\n\n### Manual Backup\n\n```bash\n# Backup Jira (default)\npython backup.py -j\n\n# Backup Confluence\npython backup.py -c\n\n# Run configuration wizard\npython backup.py -w\n```\n\n### Automated Scheduling\n\nSet up scheduled backups using system schedulers:\n\n```bash\n# Setup automated Jira backup every 4 days at 10:00 AM (default)\npython backup.py -s\n\n# Setup automated Confluence backup every 7 days at 2:30 PM  \npython backup.py -s --schedule-days 7 --schedule-time 14:30 --schedule-service confluence\n\n# Setup automated Jira backup every 2 days at 6:00 AM\npython backup.py -s --schedule-days 2 --schedule-time 06:00 --schedule-service jira\n```\n\nThis will create:\n- **Linux/macOS**: A cron job in your crontab\n- **Windows**: A scheduled task in Task Scheduler\n\n### Command Line Options\n\n| Option | Description |\n|--------|-------------|\n| `-j, --jira` | Backup Jira (default if no service specified) |\n| `-c, --confluence` | Backup Confluence |\n| `-w, --wizard` | Run configuration wizard |\n| `-s, --schedule` | Setup automated scheduled backup |\n| `--schedule-days` | Frequency in days for scheduled backup (default: 4) |\n| `--schedule-time` | Time for scheduled backup in HH:MM format (default: 10:00) |\n| `--schedule-service` | Service for scheduled backup (jira/confluence, default: jira) |\n\n## 🔧 Advanced Configuration\n\n### Minimal Configuration\n\nIf you only want to download backups locally without cloud storage:\n\n```yaml\n---\nHOST_URL: \"your-instance.atlassian.net\"\nUSER_EMAIL: \"your.email@company.com\"\nAPI_TOKEN: \"your-api-token\"\nINCLUDE_ATTACHMENTS: false\nDOWNLOAD_LOCALLY: true\n```\n\nSimply omit the `UPLOAD_TO_XXX` sections you don't need.\n\n### Multiple Cloud Providers\n\nYou can configure multiple cloud storage providers simultaneously - the script will upload to all configured destinations:\n\n```yaml\nUPLOAD_TO_S3:\n  S3_BUCKET: \"my-s3-bucket\"\n  # ... S3 config\n\nUPLOAD_TO_GCP:\n  GCS_BUCKET: \"my-gcs-bucket\"\n  # ... GCP config\n\nUPLOAD_TO_AZURE:\n  AZURE_CONTAINER: \"my-azure-container\"\n  # ... Azure config\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit issues and pull requests.\n\n## 📝 Changelog\n\n- **2025-06-24**: Added separate cron schedules for Jira and Confluence backups\n- **2025-06-24**: Made cloud storage configuration sections optional\n- **2025-06-24**: Added automated scheduling support for backup tasks\n- **2025-06-23**: Added Google Cloud Storage and Azure Blob Storage support\n- **2020-09-04**: Added Confluence backup support\n- **2019-01-16**: Updated to use API tokens instead of passwords\n\n## 📜 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Original concept inspired by [Atlassian Labs' automatic-cloud-backup](https://bitbucket.org/atlassianlabs/automatic-cloud-backup/)\n- Thanks to all contributors who have helped improve this project\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/yourusername/jira-backup-py/issues)\n\n---\n\n**Note**: This tool is not officially supported by Atlassian. Use at your own risk and always verify your backups are working correctly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatreeio%2Fjira-backup-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatreeio%2Fjira-backup-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatreeio%2Fjira-backup-py/lists"}