How do I automatically backup Confluence CLOUD instance?
Asked by Heikki Lahtela:

I see you have updated your "unofficial" backup script: <https://bitbucket.org/atlassianlabs/automatic-cloud-backup/src/083d9da6f8aea40da073e44455a93b39c1c1dcac?at=master>

Does it backup Confluence Cloud and if not, how can we do that?

Currently I can't find any information regarding this and I find it unimaginable as backups ought to be a mission critical feature of any SaaS.

Thanks in advance!


Answers:
author: Rob Woodgate
body: Heikki,

As per the page that James linked to, your Cloud application is backed up every 24 hours and stored for 7 days. You are right that it wouldn't protect you from a user or a hacker "deleting or altering precious data and \[only\] noticing after 2 weeks", but it is still a "real backup". Backups come in different forms; this is a disaster recovery backup, not a long term archive backup (which, given the number of customers Atlassian has, the size of the instances, and the number of backups they'd have to store for each customer, would be prohibitively expensive and passed on to Cloud customers in the form of increased costs). A disaster recovery backup service such as the one Atlassian offers is indeed "a standard mission critical feature" for their SaaS offering

If you're concerned about data loss due to user mistakes (or malice), you can take your own full site backups for both Confluence (instructions [here](https://confluence.atlassian.com/confcloud/create-a-site-backup-724765526.html)) and JIRA (instructions [here](https://confluence.atlassian.com/adminjiraserver070/backing-up-data-749383438.html)). The other option is to pay the extra money for a hosted instance, which should include the kind of long term backups and archive services you want, although you will pay much, much more for a hosted instance, partly for the reasons I mentioned above.

It comes down to what you're willing to pay: Not very much for Cloud, quite a bit to host your own, a lot to have it hosted by someone else. Each option has pros and cons.

comments: author: Heikki Lahtela
body: Thank you for the answer. Is it possible to create a script that makes a long term archive backup automatically? From what I can tell, the current Powershell script only makes a JIRA Cloud backup and not Confluence?


author: Scott Ramshaw
body: Just to clarify, the linked page <https://confluence.atlassian.com/jirakb/how-to-automate-backups-for-jira-cloud-applications-779160659.html> does _not_ state that backups occur automatically. It merely gives suggestions on how to automate them.

* Keep in mind that backups **can only** be performed every 24 hours and are stored only for 7 days, so schedule it accordingly.


author: RJ Gazarek
body: Hi everyone! I'm one of the product managers with Atlassian focused on Data Management, which encompasses backup \& restore. Good news is, we're looking at really improving our backup/restore capabilities, with a way to create automatic backups on our list. I'll be starting a group soon, that everyone can join, to help provide us feedback as we build this over the next couple of quarters, and make sure we're building the right thing for you.

When that's ready, I'll come back to this forum to post a link to sign up so you can help shape our future for you.

In the meantime, yes we do have some best-effort scripts provided to help with these backups on your own, but we do know an easy-to-run, automatic way, to schedule backups and download to your own servers is not readily available. We're working on it!

You can also watch this ticket too for updates if you're not interested yet in joining our group: <https://jira.atlassian.com/browse/CLOUD-6498>

comments: author: Andreas Sumper
body: Good news! How can we join the group? Will you provide some link?


author: RJ Gazarek
body: Hi [@Andreas Sumper](/t5/user/viewprofilepage/user-id/3551979) - hopefully this week, I'm working to get the private feedback group setup, and then will start sending links to posts like this, for people to provide feedback. We're still early stages of design and prototyping, and the goal is to have something tangible (MVP) for the group to test by the end of this half of the year (June) at the latest. Subject to change of course.


author: Andreas Sumper
body: Hi [@RJ Gazarek](/t5/user/viewprofilepage/user-id/3516856) ! Sounds great! I would really appreciate to be part of that group!


author: Maria Utseth Ouff
body: [@RJ Gazarek](/t5/user/viewprofilepage/user-id/3516856) Any update on the process of the automatic backup for cloud? I would really like to have this feature. Thanks!


author: RJ Gazarek
body: Hi [@Maria Utseth Ouff](/t5/user/viewprofilepage/user-id/4431571) - not yet. It'll be some time before we get there, as we have a lot of foundation work to do first. You can follow our progress and plan in this group: <https://community.atlassian.com/t5/Backup-Restore/gh-p/backupandrestore>


author: David Gabriel
body: Hi guys,  

since none of the proposed solutions worked for me (or where lacking features), and the scripts provided by atlassian are pretty bare-bones, I created a bash script implementation that is able to back up confluence, jira and bitbucket. you can find it here:  

<https://github.com/b2cc/shellscripts/tree/master/atlassian-backup>  

best,  
david

comments: author: Steve Shipway
body: Thanks for this, I'm going to wrap it up into a container on Azure and have it drop the backups into object storage.


author: Rob Woodgate
body: Hi Heikki,

I haven't done this, but apparently it is possible. See these pages for examples:

<https://confluence.atlassian.com/doc/user-submitted-backup-restore-scripts-195767.html>

<https://answers.atlassian.com/questions/38058285>

(I did a Google search for "script to automatically backup Confluence", and these were 2 of the first results, but there were others you might want to check out.)


author: Heikki Lahtela
body: Yes, I read it, thank you for your help. For what I can tell it does not offer me a real backup, only a disaster recovery one.

This does not protect me from myself (or from a hacker) deleting or altering precious data and noticing it after 2 weeks.

So it seems Confluence Cloud does not provide real backups?


author: James Dellow
body: Have you seen this FAQ about data storage (and backups) on Atlassian Cloud?

<https://confluence.atlassian.com/cloud/data-storage-faq-744721620.html>


author: Steffen M?ller
body: I just created a CLI tool with Opsgenie integration to manage Atlassian cloud backups. It creates, downloads and manages (as in "removes old") your backups and is configured with an easy config file. If things go wrong, Opsgenie alerts are created (optional).

It's open source of course and I'd be happy if it helps you as well, take a look at <https://bitbucket.org/addcraftio/atlascloud-backup>

I wrote it to scratch my own itch because I wanted to have Opsgenie monitoring and backup rotation on our offsite Synology NAS -- and got carried away a little. The tool is used in production for all our [addcraft](https://addcraft.io/) cloud instances.


author: Eyar Zilberman
body: and if someone is looking for a python version of a script that can backup Confluence Cloud - I added this capability to my Jira Cloud backup (python) script:

<https://github.com/datreeio/jira-backup-py>

comments: author: elhiboy
body: Thanks, was very helpful! ?? I hooked your script up with Serverless


author: James Dellow
body: It might be worth bearing in mind that pages and attachments are versioned and if actually deleted completely by a user, they end up in the space's trash first - the space admin can restore this content. You can also use permissions to control the ability to delete content in the first place.

However, if you do want to try to automate some kind of complete site backup, you might want to take a look at the Confluence Command Line Interface (CLI) <https://marketplace.atlassian.com/plugins/org.swift.confluence.cli/cloud/overview> as a way to make this easier to achieve.

If you want to write your own process, you'll need to work the Atlassian Connect API. One approach might be to create some custom webhooks when pages, comments and attachments are created / updated that captures the content. This might be more efficient that a complete site capture.


Tags: automation

backup

cloud

confluence-cloud