SRX

Expand all | Collapse all

Weekly Schedule configuration backup(auto)

Jump to Best Answer
  • 1.  Weekly Schedule configuration backup(auto)

    Posted 12-01-2017 02:02

    Hi,

     

    We have SRX240H2  with Junos 12.1 version in packet mode.

    We need to schedule auto weekly configuration backup of SRX. Backup will be store on FTP/TFTP.

    I gone through below procedure but could not finalize script.

    https://forums.juniper.net/t5/SRX-Services-Gateway/Scheduled-configuration-backups-from-SRX-with-hostname-and-Date/td-p/43512

     

    Thank you...



  • 2.  RE: Weekly Schedule configuration backup(auto)

    Posted 12-01-2017 03:20

    As per below, you will be able to schedule the backup every 2 days max..

     

    set system archival configuration transfer-interval 2880
    set system archival configuration archive-sites "ftp://admin@10.10.10.10/config" password "$9$WYbL-Vs24ZDiY2"

     

    as maximum interval supported is 2880 minutes on JUNOS 12.1.

     

    If you want to try another option, then you might configure "transfer-on-commit" command in place of transfer-interval.



  • 3.  RE: Weekly Schedule configuration backup(auto)
    Best Answer

     
    Posted 12-01-2017 08:34
    You can use event-options and achieve this .

    Generate an event every weekly :
    set event-options generate-event config-archival-event time-interval 604800

    Create event-policy for the above event to upload /config/juniper.conf.gz to ftp (this is your active config)

    set event-options policy config-archive-policy events config-archival-event
    set event-options policy config-archive-policy then upload filename /config/juniper.conf.gz destination myftp

    Specify the FTP/SCP server where you want to copy the file.

    set event-options destinations myftp archive-sites "ftp://admin@10.10.10.10/config" password "$9$UWiqPFnCBIc5QIcylLXUjH"


    set event-options generate-event config-archival-event time-interval 604800
    set event-options policy config-archive-policy events config-archival-event
    set event-options policy config-archive-policy then upload filename /config/juniper.conf.gz destination myftp
    set event-options destinations myftp archive-sites "ftp://admin@10.10.10.10/config" password "$9$UWiqPFnCBIc5QIcylLXUjH"
    _________________________________________________________________


  • 4.  RE: Weekly Schedule configuration backup(auto)

    Posted 05-22-2019 12:10
    Does the 604800 corresponds to 420days??


  • 5.  RE: Weekly Schedule configuration backup(auto)

    Posted 05-22-2019 16:26

    The time-interval value has to be specified in seconds:

     

    https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/time-inte...

     

    They used 604800 seconds which is equivalent to 7 days because they needed the backup to happen weekly.