How to backup Confluence and Confluence database

How to backup Confluence and Confluence database

Step 1:  Create script to backup database and Confluence data.

cat /opt/backupconfluence.sh
#!/bin/sh
export PGPASSWORD=xxxxxxxx
/opt/PostgreSQL/9.0/bin/pg_dump confluence -U confuser > /tmp/Backup/confluence_db_$(date +%Y-%m-%d) 
tar -cvf /tmp/Backup/confluence-data_$(date +%Y-%m-%d).tar /var/confluence-home/attachments/ /var/confluence-home/confluence.cfg.xml /var/confluence-home/index/ /var/confluence-home/config/ 

Step 2: Create crontab to run automatically everyday. (working days)

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

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

 

Tags:  

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>