SRX

Expand all | Collapse all

Backup Config

Jump to Best Answer
  • 1.  Backup Config

    Posted 06-26-2018 23:51

    Hello,

    i have SRX gateways & switches.

    i have a management & monitoring system that execute scripts to devices, i want to ccreate a script that do the following:

    save xxx
    exit
    start shell
    tftp 10.240.60.100
    put xxx

    i have to assign the file name instead of xxx, my question which keyword or serverd syntax to the device can use its hostname and the current date time for the filename?

    thanks



  • 2.  RE: Backup Config

     
    Posted 06-27-2018 00:39
    You have shell or python script? I would recommend you post this in Automation discussions.


  • 3.  RE: Backup Config

     
    Posted 06-27-2018 03:13

    If you managment system has an ftp or scp server setup Junos has a feature that can automatically copy a backup to that server.  This can be done on a time interval or on commit of changes.

     

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

     



  • 4.  RE: Backup Config

    Posted 06-27-2018 05:44

    Hello,

    thank you for your reply.

    i have solarwinds NCM module, so my question can i do the save to be automatically saved with the devices hostanme? and how?

     

    thanks



  • 5.  RE: Backup Config

     
    Posted 06-28-2018 03:11

    I've never used solarwinds so I don't know what options are in there.

     

    This function works by transfering a copy of the configuration via ftp or scp to a destination server.  So the Solar winds server would enable one of those.  I see that solarwinds offers scp software on their site as a tool.

     

    To link them up in the solarwinds mgmt console you would need some function there to point to the repository of backups.

     



  • 6.  RE: Backup Config

    Posted 06-28-2018 04:07

    thank you for your reply.

    Forget the management application issue, my question is regarding the "save" command.

    when we issue a save command we have to type the filename, so my question if i want to replace the filename command with a reserved or special expression so the device can save the file with the hostname to be the filename instaed typing the filename?

     

    thanks



  • 7.  RE: Backup Config
    Best Answer

     
    Posted 06-29-2018 02:46

    Sorry for the confustion, I don't know the answer to your save question.

    I am suggesting that instead of having your management system run a script logging into the device you add these configuration lines to the device and it will automatically transfer a copy of the configuration every day to the server you configure.

     

    set system archival configuration transfer-interval 1440

    set system archival configuration archive-sites scp://user@host:/path password userpassword

    scp / ftp  both are supported

     

    file is automatically named with host date and time

    hostname_20180629_054625

     



  • 8.  RE: Backup Config

    Posted 06-29-2018 03:08
    Many thanks for your valuable information. Yes my question was for the save command. Anyway, for sure i will try your method.
    Thanks again