It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I automate an import of xml backup?

Adam Flinton Jun 25, 2015

I would like to create a backup crowd server which simply downloads last night's XML backup from the "master" crowd server & imports so as to make the 2 in sync.

I can happily do this manually but was wondering if there is a way (rest or otherwise) of automating an XML import.

 

 

2 answers

0 votes
Renato Rudnicki Atlassian Team Jun 26, 2015

Hi Adam, 

 

You can do this from different ways, there isn't right or wrong but which way best fits your needs and environment. 

Basically, this will depends of what OS you are running Crowd. If you are running on Linux, you can do this by a Shell script and schedule this on crontab. Or also add a rsync command on crontab to get the xml backups. On windows, you can use the robocopy which is a kind of rsync (I'm not too familiar with Microsoft OS).

Another possibility would be you instead of use the xml backup, do a database replication (active-passive). 

 

However, if you want go beyond, did you already heard about Puppet? laugh

https://puppetlabs.com/puppet/what-is-puppet

 

Hope this helps. 

 

Cheers, 

Renato Rudnicki

0 votes
Adam Flinton Jun 28, 2015

I can do the download from where the xml files are stored etc.

We are using ansible which is similar to puppet


It is the automation of the "restore" part from xml I am looking for.
ATM I can only appear to do this via using the web app etc & then clicking submit etc.
looking @ the html it is calling:
<form id="import" class="aui" action="/crowd/console/secure/admin/restore!import.action" method="post">
& I am wondering if there is anyway to post the information from outside of crowd (e.g. curl) (or to call the java directly from within)

 

I.e. I would like to be able to "restore" my backup of crowd via an xml file every night @ 1.00AM.

i.e. to have a script call "import.action" in some manner (directly in java if need be or via an http post/rest call).

Clearly I can recreate the html form, find how to generate/acquire the relevant login perms etc. but I was wondering if there is a less screenscraper way of doing it.

 

Adam

 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Jira Software

Demo Den Ep. 5: Meet Jira Mobile

See how to use Jira on the go! Demo Den Episode 5 is here: meet Jira Mobile with  Jira  Product Manager Rayen Magpantay.  Demo Den is in our monthly series where a Jira PM demonstrates...

218 views 1 9
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you