User Macros import-export

KPAH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2013

Due to Confluence limitations, I had to create lots of user macroses, and I mean over 9000 of them. I think I would be better off writing my own wiki instead of tweaking somebody's else work.

Anyway, is there a way to export these precious macros without paid (!!!) plugins?

Thanks in advance.

3 answers

1 accepted

1 vote
Answer accepted
Amalia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2013

Which version of Confluence are you using now? I believe that the user macros are stored in the BANDANA table. Example, in Confluence 4.3:

SELECT bandanavalue 
FROM bandana 
WHERE bandanacontext = '_GLOBAL' AND bandanakey = 'atlassian.confluence.user.macros';

If the format is not too different between these two Confluence versions, then I believe you can copy these data and import them into the new Confluence version (after that, try to restart or flush cache).

KPAH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2013

Brilliant, thanks!!

KPAH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2013

Hi, thanks for quick reply. It is 4.3 standalone.

I've used Database Browser to connect to my db, which is MySQL. The transact above returns just "bandanavalue"
"(BLOB)"

Am I missing something?

Amalia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2013

usually, you will be able to double click the BLOB to see the data. Otherwise, use the MySQL command line instead

0 votes
pdr July 31, 2015

To export this in an importable way, use mysqldump:

mysqldump -t confluence BANDANA --where="bandanacontext = '_GLOBAL' AND bandanakey = 'atlassian.confluence.user.macros'" > usermacros.sql

You'll then need to shutdown your new instance, then from mysql do:

delete from BANDANA where BANDANACONTEXT='_GLOBAL' AND bandanakey = 'atlassian.confluence.user.macros';

Then import the record from the other instance before starting up confluence again:

mysql confluence < usermacros.sql

 

 

0 votes
Matthew J. Horn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2013

9000 macros?! I thought *I* used alot of macros. Wow!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events