User Submitted Backup & Restore Scripts

These scripts are user-submitted and should be used with caution as they are not covered by Atlassian technical support. If you have questions on how to use or modify these scripts, please post them to Atlassian Answers

Delete Old Backups - Wscript Script On Windows

This script examines backup filename and deletes them if necessary, it may need to be edited.

Delete Old Backups - Basic Bash Script For Linux

Old XML backups can be deleted automatically by inserting a nightly or weekly automation script or cron similar to the following:

Or, using the older form of the tail command if your system does not support the standard form:

Delete Old Backups - Advanced Bash Script For Linux

Old XML backups can be deleted automatically by inserting a nightly or weekly automation script or cron similar to the following. Set the BACKUP_DIR and DAYS_TO_RETAIN variables to appropriate values for your site. Between runs, more files than DAYS_TO_RETAIN builds up.

Manual Database & Home Backup - Bash Script For Linux

This backs up a mySQL database and the Confluence home directory.

Backup by Date - Postgres

Related Topics

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

5 Archived comments

  1. User avatar

    Guy Fraser

    The Backup Manager plugin is an easy way to set-up automatic pruning of your backups folder, etc.

    30 Jul 2008
  2. User avatar

    Brendan Patterson

    I adjusted the Linux script above to what I think is a bit more generic, readable and works on Mac and Linux. This one only backs up the confluence-home directory so you just have to add back the database export if you want that:

    23 Jul 2009
    1. User avatar

      David Cheney [Atlassian]

      23 Jul 2009
  3. User avatar

    Jonas Lindström

    I made this set of scripts for daily automatic as well as single manual backups in our environment. Might come in handy for others as well. They might not be the most elegant scripts in the world, but they work. Improvement suggestions are welcome! (smile)

    Environment: CentOS, MySQL, Confluence Standalone 3.4.9

    EDIT: Forgot to mention that all these scripts also assume Confluence is a system service as per this guide.

    Confluence backup script
     Click here to expand...
    Confluence backup script for install directory, data directory and database
    Confluence daily backup routine

    If you want to use the above script as a subroutine in a daily backup script, you can do so with the following cron script:

     Click here to expand...
    Confluence daily backup cron script
    Cleanup script

    In order to conserve storage space, I also made a script for cleaning up old backups.

     Click here to expand...
    Confluence cleanup script for old backups
    10 Jun 2011
    1. User avatar

      Hieu Le Trung

      These scripts work great for me. Just replace the pg_dump with mysqldump as following

      And create ~/.pgpass to allow the password to be entered automatically.

      The DATA is the confluence home directory.

      07 Jul 2013
Powered by Confluence and Scroll Viewport