Skip to content

Backing up a cloud Jira instance to an AWS S3 bucket via Lambda using NodeJS

License

Notifications You must be signed in to change notification settings

tcbeatie/jira-backup-aws-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jira-backup-aws-nodejs

Introduction

Use case

Jira Cloud being used by an organization with an AWS infrastructure

Requirements / Conditions

  1. Cloud-to-cloud backup (Jira Cloud -> AWS S3)
  2. Jira Cloud does not allow backups within 48h of last backup
  3. Separate monthly and daily retention policies
  4. Don't store private keys in backup script

Solutions / Setup

  1. Use AWS Lambda to run backup
    1. Stores backup file in virtual Lambda /tmp before copying to AWS S3
  2. Use hourly cron job via AWS CloudWatch to run script
    1. Script compares start time to epoch time, and aborts if within 48h of last backup
  3. Set up AWS S3 with two directories under one bucket
    1. Daily retention expires after 2 weeks
    2. Monthly retention expires after 6 months
  4. Private data is stored in and retrieved from AWS Secrets Manager
    1. Jira Cloud URL
    2. Jira API key
    3. Jira API user
    4. AWS S3 bucket name

AWS workflow