4

So I have been tasked with swapping an older Cisco router with a Juniper Mx80. I have a copy of the config from the Cisco device. The Mx80 was being used before so I want to wipe it and setup with the same setting the Cisco device had. Before I do that I would like to export the config from the Mx80 so I have it just in case.

Not really familiar with Juniper so how do I export the config off the device so I have it saved locally?

1
  • Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Dec 23, 2021 at 21:12

2 Answers 2

5

You have a few options. First, you can simply output everything to the terminal and copy/paste into a text file. For this, you would run:

show configuration | no-more for stanza formatted configuration. This is usually easier to read given you can see the hierarchy.

and/or

show configuration | display set | no-more for "set" format, which may be a bit easier to put back on to a box for some.

Alternatively, you can save the same outputs to a file on the router by using | save $filename (for example: show configuration | display set | save /var/tmp/config-backup.txt and copy it off of the device with the file copy command. Junos is actually a modified version of FreeBSD, so you can also originate the copy request from your machine as well via scp if you have IP connectivity. Dealer's choice really.

0

ssh user@mx-80 "show configuration | no-more" > config.txt

Will dump out the config in one command to your local file system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.