Ubiquiti EdgeRouter [55/57] Manage the configuration file

Ubiquiti EdgeRouter [55/57] Manage the configuration file
52
Appendix A: Command Line InterfaceEdgeOS
User Guide
Ubiquiti Networks, Inc.
Manage the Configuration File
Typically, you use the save command to save the active
configuration to disk (config/config.boot’); however, you
can also save the active configuration to a different file or
remote server.
Enter save and press the ? key.
ubnt@RTR# save
Possible completions:
<Enter> Save to system
config file
<file> Save to file on
local machine
scp://<user>:<passwd>@<host>/<file> Save to file on
remote machine
ftp://<user>:<passwd>@<host>/<file> Save to file on
remote machine
tftp://<host>/<file> Save to file on
remote machine
[edit]
ubnt@RTR# save tftp://10.1.0.15/rtr-config.boot
Saving configuration to
‘tftp://10.1.0.15rtr-config.boot’...
############################################### 100.0%
Done
[edit]
Scenario: In the midst of the administrator changing an
IPsec tunnel into an OpenVPN tunnel, the administrator
had to revert the EdgeRouter to its previous configuration
with the IPsec tunnel.
1. Before making changes, the administrator saved a
backup configuration file with a working IPsec tunnel
configuration:
ubnt@RTR# save config.boot-ipsec
Saving configuration to ‘/config/config.boot-ipsec’...
Done
[edit]
Note: This is a backup; if the EdgeRouter were
rebooted, it would still boot from the default file:
/config/config.boot’
2. After the administrator deleted the IPsec configuration
and was configuring of the OpenVPN tunnel,
circumstances changed so that the IPsec tunnel was
required again. Consequently, the administrator
reverted the EdgeRouter to its previous configuration
with the IPsec tunnel.
ubnt@RTR# load config.boot-ipsec
Loading configuration from
‘/config/config.boot-ipsec’...
Load complete. Use ‘commit’ to make changes active.
[edit]
ubnt@RTR# commit
[edit]
ubnt@RTR# save; exit
Saving configuration to ‘/config/config.boot’...
Done
exit
ubnt@RTR:~$
To automatically make a remote backup after every
commit, use the commit-archive configuration option,
enter location, and press the ? key.
ubnt@RTR# set system config-management commit-archive
location
Possible completions:
<url> Uniform Resource Identifier
Detailed information:
“scp://<user>:<passwd>@<host>/<dir>”
“ftp://<user>:<passwd>@<host>/<dir>”
“tftp://<host>/<dir>”
ubnt@RTR# set system config-management commit-archive
location tftp://10.1.0.15/RTR
[edit]
ubnt@RTR# commit
Archiving config...
tftp://10.1.0.15/RTR OK
[edit]
On the remote tftp server, a copy with the hostname and
date is saved for each commit.
admin2@server://tftpboot/RTR$ ls -l
total 8
-rw------- 1 nobody nogroup 908 Aug 17 17:19
config.boot-RTR.20120817_171932
-rw------- 1 nobody nogroup 874 Aug 17 17:20
config.boot-RTR.20120818_002046
You can also keep a specified number of revisions
of the configuration file on the local disk. Use the
commit-revisions configuration option.
ubnt@RTR# set system config-management commit-revisions
50
[edit]
ubnt@RTR# commit
[edit]
Here is an example that uses the commit-revisions
command:
ubnt@RTR# set system login user joe authentication
plaintext-password secret
[edit]
ubnt@RTR# commit
[edit]
ubnt@RTR# save; exit
Saving configuration to ‘/config/config.boot’...
Done
exit
ubnt@RTR:~$ show system commit
0 2012-08-17 18:32:13 by ubnt via cli commit
1 2012-08-17 18:31:52 by ubnt via cli commit
2 2012-08-17 18:31:51 by root via init commit

Содержание

Похожие устройства

Скачать