SUMMARY:
The information below describes the steps to backup and restore JUNOS configuration file to an FTP server.
PROBLEM OR GOAL:
CAUSE:
SOLUTION:
JUNOS Command Line interface allows the user to export the configuration file into an FTP server and to import it back to the switch. The information below describes the steps to backup and restore JUNOS configuration file on FTP server.
- Backup configuration file on FTP.The following configuration sample shows how to backup the JUNOS configuration file on FTP server. On every commit applied on CLI, the EX switch will transfer a copy of the configuration file to an ASCII file on FTP server. The filename created on the FTP server contains hostname, date and time signature.
system {
archival {
configuration {
transfer-on-commit;
archive-sites {
"ftp://username:password@172.30.36.59";
}
}
}
}
- To backup the config file on time interval, you can also replace the ‘transfer-on-commit’ statement with the statement ‘transfer-interval’ with specifying interval in range of 15 to 2880 minutes.NOTE: Check the specific settings of the FTP server for ASCII text files, after you backup your config verify that the file is readable with a text editor and that no extra characters are added during the backup process, such as end-of-line character.
- To restore configuration file from FTP serverThe following configuration sample shows how to restore the JUNOS configuration from an ASCII configuration file that was previously stored on FTP server
[edit]
user@switch# edit system archival configuration[edit system archival configuration]
user@switch# load merge ftp://username:password@172.30.36.59/switch_juniper.conf.gz_20080304_141543
load complete[edit system archival configuration]
user@switch#The content on the ASCII file on the FTP server will be merged with the existing configuration on the switch. To replace the config file on the switch with the loaded file, use the ‘replace’ statement instead of ‘merge’.
No comments:
Post a Comment