Switching

Expand all | Collapse all

How do I backup my switch settings?

Jump to Best Answer
  • 1.  How do I backup my switch settings?

    Posted 07-19-2019 08:01

    Hello,

     

    If I ftp to my switch, is there a particular file I can copy from it so I have a backup of the configuration?



  • 2.  RE: How do I backup my switch settings?

     
    Posted 07-19-2019 08:29

    Hi,

     

    You can try below.

     

    labroot@jtac-ex4200-8poe-r2002> start shell
    % cd /var/db/config/
    % ls -ltr
    total 184
    -rw-r----- 1 root wheel 903 Sep 13 06:55 juniper.conf.31.gz
    -rw-r----- 1 root wheel 898 Sep 13 10:06 juniper.conf.30.gz
    -rw-r----- 1 root wheel 921 Sep 14 04:24 juniper.conf.29.gz

     

    labroot@jtac-ex4200-8poe-r2002# show | display set | save /var/tmp/config.txt
    Wrote 37 lines of output to '/var/tmp/config.txt'

    {master:0}[edit]
    labroot@jtac-ex4200-8poe-r2002# run start shell
    % cd /var/tmp/
    % ls -ltr | grep config.txt
    -rw-r--r-- 1 labroot field 1984 Oct 28 06:39 config.txt

     

     



  • 3.  RE: How do I backup my switch settings?
    Best Answer

     
    Posted 07-19-2019 17:22

    The currently running configuration file is here

     

    /var/db/config/juniper.conf.gz

    The other files in the directory with the added numbers are rollback versions from previous commits.

     

    You can copy this off to save a backup.

     

    Another option is to configure archival to have Junos copy off the config file to an external scp or ftp server on commit or at a time interfval.

     

    https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/junos-software-system-management-router-configuration-archiving.html

     

    An open source option is Oxidized which will pull backups and keep a Git source change repository for each device so you can see the changes.

     

    https://github.com/ytti/oxidized

     

     



  • 4.  RE: How do I backup my switch settings?

    Posted 07-23-2019 10:19

    Thanks!