Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

How to backup all new relic settings (everything except metric data)



i’ve used the api in some basic shell and ruby scripts, but there are so many object types, dealing with the pagination, etc.

any shortcuts to dumping out everything short of iterating through all the object types, and doing all the GETs - then saving the (multi-page) json response documents?

New Relic edit

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


All the data sent back from the REST API comes as JSON (or XML if requested). Rather than dumping everything and sorting through it, consider using a JSON or XML parser library in your favorite language. In Python, for instance, you can “import json” and use that library to obtain only the data you want. Similar library functions exist for most major languages.

You will still have to manage the pagination, however, but the trick there is to read in the “Header” line and find out how many pages are being returned and then step through them by using the “?page=” query on the URL.


yes, thanks for that response.

i ended up doing just that - getting the application list, then iterating through the applications, then the server list, and iterating through all the servers, then through all the server metrics, then the alerts_policies, then all the alerts_policies_conditions.

quite a pain, actually. seems like something NR could provide actually. or would that make it easier to move away from NR?

i used ruby since i had some stuff already strung together. the pagination was kind of quirky - the header conditions for being on the last page are not really self-evident, but simple boolean conditions sufficed. kind of wish the total # of pages would be supplied, but that depends on item density, so understand why it is why it is.

the cursor stuff was actually simpler to digest, but a bit wonky. and the logic for pagination with a cursor is COMPLETELY different the pagination logic without a cursor - that seems kind of broken from a design perspective.

also wondering about the response expectation from this forum. 13d seems like a long time.


Hey @dcampbell! Thank you so much for providing all that helpful info about how you and @Limey were ultimately able to solve this!

I can see that you had to deal with a few pain points along the way, too—one being the time you had to wait to get an answer! Thanks for being patient while our Support Engineers took the time to troubleshoot behind the scenes in order to help you get to the best possible solution.

Your journey will definitely be helpful to others in this community! Thanks again for reaching out and sharing your solution with us! :blush:


i personally think you’re giving them too much credit, but at least someone got back eventually.

it seriously would not be that hard for NR to implement a selective data dump of exactly what i was asking for, in some kind of an admin panel.


I don’t think it would be hard either—just a matter of prioritization @dcampbell.

I have passed this thread along to the engineers that have the power to make this a bit less clunky, like you suggested. :thumbsup: Let us know what else you need!


I’d like to “+1” this requirement, did it actually make it onto the New Relic backlog?

The ability to manage a deployment configuration (in this case a set of monitoring rules) is a very typical requirement. In the current situation, if one of our NR users accidentally removes or changes a monitoring rule there is no way to recover from that.


Hi there @pvarnun -

This has not yet been implemented, unfortunately. That said, we’ve updated our feature idea process, so I added a poll to this and have re-entered it into our product team process. Please feel free to vote in the poll and share with others who may also want to share their opinions.



Great, can you post a link?


Poll is available at the top of this post! Let me know if you don’t see it.


A little late to the party, but… IBM Cloud Monitoring Team created a “New Relic CLI” and opensourced it with the Apache License. It is posted here: and has some helpful commands for backing up Synthetics, Alert and Insights config.

Take a look at some of the shell-samples


This is awesome, @mckennab, thank you for sharing! This is a great example of our customers taking advantage of the extensibility features New Relic provides, allowing product teams to focus on features that only they can implement.


Thanks Phil, but… export and import should really be a basic function provided by New Relic. As you can see by the repo, this is not straight forward. Still not 100% clean, but gets the basics. The API Explorer is a great help, but without a simple way to export and import, all of your users will have to try to figure out how to loop thru the different objects to retrieve all of the pieces they need, and of course, the objects vary based on what New Relic monitoring you are using, so users have to repeat the exercise for synthetics, apm, alerts, infrastructure…


You’re right @mckennab - APIs will always have limitations, and an out of the box solution would be ideal here. We do see a few feature requests like this one - all of which go to our product management team. This is the best way to get that in front of them. For now the existing APIs are the way to go, and the awesome work you and the IBM team did with this CLI will help others for now while out of the box options aren’t yet available.