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).
pg_dump
(part of thepostgres-client
package)- use a
.pgpass
file to store db creds
- use a
- awscli - instructions
- make sure to
aws configure
with creds for a user who can access s3
- make sure to
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.
- Copy files to a location like
/etc/cron.d/
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.
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?