Category IT Applications

How to backup JIRA and JIRA database

How to backup JIRA and JIRA database

Step 1: Create script for backup.

cat /opt/backupjiradb.sh

#!/bin/sh
export PGPASSWORD=xxxxxxxxx
/opt/PostgreSQL/9.0/bin/pg_dump jira -U jirauser > /tmp/Backup/jira_db_$(date +%Y-%m-%d) 
tar -cvf /tmp/Backup/jira-data_$(date +%Y-%m-%d).tar /opt/jira/data/ 

Step 2: Create cronjob for that script to run everyday.

crontab -l

00 00 * * 1-5 /opt/backupjiradb.sh

That’s all. Thanks for using ithelpblog.com.

Read More