• 0

download multiple device configs


Anyone know of or have a scipt to download multiple device configurations at once? I'm thinking of writing a script that will identify resources within a group and then download their configurations for a specific configsource instance. I can't be the first one to want this though so thought I'd check here.

Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 1


See lm-get-configs and the run-lm-get-configs wrapper.  There are a fair number of workarounds in the main script due to various problems with module behavior.  I am currently battling an apparent API bug where the query we use (basically, sort in reverse by version and provide the first result) triggers a bizarre "too many predicates" error. Sent that back to dev when they wanted to wash their hands of it because our API code is in Perl and is "unsupported".

To use the API module, you need a .lmapi file in the caller's home directly with one set of credentials per portal in YAML.  For example:

        access_id: '****'
        access_key: '****'

The wrapper runs the script and checks into git -- not necessary, but we want to track changes and have post-commit hooks to get email reports on what changed.  This was the original reason we wrote it, but it is also super helpful to be able to scan all configs at once with grep or with template-validation tools, etc.

Link to post
Share on other sites
  • 0
3 hours ago, Stuart Weenig said:

Just to be sure, you're not talking about downloading from the device to LM. You're talking about downloading from LM to your laptop.  I thought the first until I saw @mnagel's response.

You may be right, I just could not see how that would make sense given the way LM does it or why it would be useful :).

Link to post
Share on other sites
  • 0

I put this together.


Script is getGroupConfigs. It's working for Cisco and Palo Alto devices, potentially only a subset of each. I'm sure there are additional devices that can be added as well as additional functionality. @Stuart Weenig You'll recognize some bits from connectwise_manage. You know what they say, imitation (and outright thievery) is the sincerest form of flattery. 😉

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.