SRX Services Gateway
Highlighted
SRX Services Gateway

Weekly Schedule configuration backup(auto)

‎12-01-2017 02:02 AM

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-hos...

 

Thank you...

4 REPLIES 4
SRX Services Gateway

Re: Weekly Schedule configuration backup(auto)

‎12-01-2017 03:20 AM

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.


*************************************
HTH.
Accept this as solution if it resolved your issue.
Kudos would be appreciated too.
SRX Services Gateway
Solution
Accepted by topic author Nik_MH
‎12-04-2017 03:55 AM

Re: Weekly Schedule configuration backup(auto)

‎12-01-2017 08:34 AM
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"
_________________________________________________________________
Thanks,
Suraj
Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too
SRX Services Gateway

Re: Weekly Schedule configuration backup(auto)

‎05-22-2019 12:10 PM
Does the 604800 corresponds to 420days??
SRX Services Gateway

Re: Weekly Schedule configuration backup(auto)

‎05-22-2019 04:26 PM

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.