API for Plugin Vendors To Hook When Space Gets Backed Up/Restored


"Need Atlassian-provided API For Plugin Vendors To Use For Serialization of a Page/Space-related Plugin Data"

When a space gets backed up, and restored, it can lose external plugin vendor data, like "this gliffy image goes here". It would be cool if there was an interface that would allow plugin vendors to store that data and retrieve it for the backup/restore process.

The goal is the space/page is restored 100% like it was before backup.

Lemme try my lame agile skills in story lingo:

"As a 3rd party plugin-developer, I'd like to expose a hook that will get called when a Space is being backed up, to allow me to serialize out my plugin-specific context data for the Space being backed up. I'd also like that data to get used to call me to restore it when the Space gets restored."


1 answer

This widget could not be displayed.

Yes. There are 2 kind of exports: Global backup and Space export. The same classes are used by both, so the following method should work for space too.

First, you need to download the source of Confluence, because you'll need it. You can do so at http://my.atlassian.com if you've bought at least a starter license ($10).

Then have a look at FileXmlExporter#backupPluginData(). Any plugin which declares <backup-restore key="..." class="... something implementing BackupRestoreProvider"/> will be run during the back-ups.

A good example is ActiveObjects (source available on BitBucket). It saves data during export:

&lt;backup-restore key="activeObjectsBackupRestoreProvider" class="com.atlassian.activeobjects.confluence.backup.ActiveObjectsBackupRestoreProvider" public="true"/&gt;

Don't forget the public=true, so Confluence can see it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

447 views 5 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you