Skip to content

cameronwp/atlassian-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sync Atlassian server files with s3

See Jira backup suggestions and Confluence backup suggestions

Copies all files needed to restore Jira and Confluence. Files are saved to a "temporary" location and a "latest" location. Recommend setting s3 settings so that any files with a temp prefix expire at some later date to avoid being charged for storing old files. But the latest version should never disappear, so sync_latest.sh will move a "temp" file to a non-temp location to avoid expiration. Technically, you should be able to do this with the --expires flag, but in testing the flag did not seem to have an effect (and I gave up trying after about 5 mins because you can just as easily use the s3 console to get the same effect).

Dependencies

  • pg_dump (part of the postgres-client package)
    • use a .pgpass file to store db creds
  • awscli - instructions
    • make sure to aws configure with creds for a user who can access s3

Usage

Make sure you replace [BUCKET] in the scripts with the name of your s3 bucket.

The easiest thing to do is move these scripts to a crontab.

  1. Copy files to a location like /etc/cron.d/
  2. crontab -e

Current crontab configuration:

00 01 * * * /etc/cron.d/sync_jira.sh
00 01 * * * /etc/cron.d/sync_confluence.sh
# wait a bit to make sure s3 has the newest uploads before trying to copy them
00 02 * * * /etc/cron.d/sync_latest.sh

These scripts are set to run at 1am, 1am, and 2am.

Troubleshooting

If you cannot read the Jira and Confluence home dirs, make sure they have the right permissions. See here. You may(?) need to add yourself to the jira and confluence groups? Maybe?

About

Scripts to sync Jira and Confluence server with s3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages