This article describes the different ways in which users can take backup of a configuration automatically.
Below are the different ways in which users can take configuration backup automatically:
Backing up configuration on every commit:
user@device# show system archival { configuration { transfer-on-commit; archive-sites { "ftp://[email protected]:21/directorylocation" password "$ABC123"; ## SECRET-DATA } } }
Transferring a file after a specific interval (maximum interval: 48 hours):
user@device# show system archival { configuration { transfer-interval 15; archive-sites { "ftp://[email protected]:21/directorylocation" password "$ABC123"; ## SECRET-DATA } } }
Creating an event to take backup at a specific time:
user@device# run show configuration event-options generate-event { test_jtac_event time-of-day "12:18:00 +0530"; <<<<< Create an event for a specific time. } policy policy_jtac { events test_jtac_event; then { upload filename /config/juniper.conf.gz destination ftp_server; <<<<< Create an event-policy for the above event to upload /config/juniper.conf.gz to ftp (this is your active config). } } destinations { ftp_server { archive-sites { "ftp://[email protected]:21/directorylocation" password "$ABC123"; ## SECRET-DATA <<< Specify the FTP/SCP server where you want to copy the file. } } }
Note: SCP, SFTP, and HTTP can also be used in place of FTP.Note: If you use the system archival approach and specify more than one archive site, the device attempts to transfer files to the first archive site in the list, moving to the next site only if the transfer fails.
2022-01-14: Added link to Juniper website and added HTTP to the list of supported protocols; made some minor corrections