Switching

last person joined: 20 hours ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  Automatically backup config to scp or tftp when “wr me”

    Posted 08-02-2018 17:15
     
    In Cisco, I can automatically backup config using scp or tftp to other location every time I issue “wr me”
    How to achieve the same in other brand?
     
    CISCO:
    archive
    path scp://root:eve@10.0.10.70/$h
    write-memory
     
     
    JUNIPER:
     


    #HP
    #fortinet
    #ruckus
    #cisco


  • 2.  RE: Automatically backup config to scp or tftp when “wr me”
    Best Answer

    Posted 08-02-2018 17:31

    You configure this in Junos under system archival.  You can have this occur on regular intervals or every time a commit is done on the device.

     

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

     



  • 3.  RE: Automatically backup config to scp or tftp when “wr me”

    Posted 08-03-2018 01:28

    link above almost perfect with 1 caveat, which is ssh target host must exist in known host

    look at this explanation

    https://forum.ivorde.com/junos-system-configuration-archival-is-not-working-over-scp-t19351.html

     

    I also found one bug in archival

    BUG

    let say I show here
    # edit system archival configuration archive-sites
    # show
    "scp://ftp@10.0.10.107:22" password "$9$F5oA69p1RSyeW"; ## SECRET-DATA
    "scp://ftp@10.0.10.107" password "$9$sYgoGHqf5z6"; ## SECRET-DATA

    {master:0}[edit system archival configuration archive-sites]

     

    then I want to delete the first one
    root# delete "scp://ftp@10.0.10.107:22" password "$9$F5oA69p1RSyeW"

    {master:0}[edit system archival configuration archive-sites]

     

    it's not properly deleted
    root# show
    "scp://ftp@10.0.10.107:22";
    "scp://ftp@10.0.10.107" password "$9$sYgoGHqf5z6"; ## SECRET-DATA

    {master:0}[edit system archival configuration archive-sites]

     

    I need to delete one more time
    root# delete "scp://ftp@10.0.10.107:22"

    {master:0}[edit system archival configuration archive-sites]

     

    then it will be ok
    root# show
    "scp://ftp@10.0.10.107" password "$9$sYgoGHqf5z6"; ## SECRET-DATA



  • 4.  RE: Automatically backup config to scp or tftp when “wr me”

    Posted 08-03-2018 03:00
    then I want to delete the first one
    root# delete "scp://ftp@10.0.10.107:22" password "$9$F5oA69p1RSyeW"
    {master:0}[edit system archival configuration archive-sites]
    
     it's not properly deleted
    root# show
    "scp://ftp@10.0.10.107:22";
    "scp://ftp@10.0.10.107" password "$9$sYgoGHqf5z6"; ## SECRET-DATA
    
    {master:0}[edit system archival configuration archive-sites]

    The thing to note is that the Junos configuration is NOT a flat file single line but a hierarchy.

    delete "scp://ftp@10.0.10.107:22" password "$9$F5oA69p1RSyeW"

    This deletes the PASSWORD only since the password is under the url hierarchy.  this is called a leaf object the command only deletes the leaf.

    delete "scp://ftp@10.0.10.107:22" 

    This will delete the url and everything under it including the password

     

    The first connect will prompt to save the host key and this when accepted becomes part of the configuration.  You can also pre add this to the configuration.