Edge Router Yedekleme ve Yedekten Yukleme

1. Enter configuration mode.

ubnt@edgerouter:~$ configure
2. Save the configuration to a different local file.

[edit]
ubnt@edgerouter# save ?

Possible completions:
Save to system config file
Save to file on local machine

[edit]
ubnt@edgerouter# save backupconfig.boot

Warning: saving configuration to non-default location ‘/config/backupconfig.boot
3. Verify that the backup file is saved to the config directory and optionally verify its contents.

[edit]
ubnt@edgerouter# ls -l /config/
-rw-rw—- 1 root vyattacf 2874 Apr 1 22:24 config.boot
-rw-rw-r– 1 root vyattacf 2757 Apr 2 13:43 backupconfig.boot

[edit]
ubnt@edgerouter# cat /config/backupconfig.boot
firewall {
all-ping enable
broadcast-ping disable
<...output shortened...>
If you wish to save the active configuration to a remote device, follow the steps below:

CLI: Access the Command Line Interface.
1. Enter configuration mode.

ubnt@edgerouter:~$ configure
2. Save the configuration to a remote machine using either TFTP, SCP, FTP or SFTP.

[edit]
ubnt@edgerouter# save ?

Possible completions:
scp://:@/ Save to file on remote machine
sftp://:@/ Save to file on remote machine
ftp://:@/ Save to file on remote machine
tftp:/// Save to file on remote machine

[edit]
ubnt@edgerouter# save tftp://192.168.1.10/config.boot

Warning: saving configuration to non-default location ‘tftp://192.168.1.10/config.boot’…
######################################################################## 100.0%
Done
If you wish to load a backup configuration from a remote device, follow the steps below:

CLI: Access the Command Line Interface.
1. Enter configuration mode.

ubnt@edgerouter:~$ configure
2. Load the backup configuration from a local or a remote file.

[edit]
ubnt@edgerouter# load ?

Possible completions:
Load from system config file
Load from file on local machine
scp://:@/ Load from file on remote machine
sftp://:@/ Load from file on remote machine
ftp://:@/ Load from file on remote machine
http:/// Load from file on remote machine
tftp:/// Load from file on remote machine

[edit]
ubnt@edgerouter# load backupconfig.boot

Loading configuration from ‘/config/backupconfig.boot’…

Load complete. Use ‘commit’ to make changes active.
3. Compare the differences between the backup/working configuration and the active configuration.

[edit]
ubnt@edgerouter# compare
4. Commit the changes

[edit]
ubnt@edgerouter# commit
5. Save the active configuration to the startup/boot configuration.

[edit]
ubnt@edgerouter# save

Saving configuration to ‘/config/config.boot’…

Commit Revisions and Archival
Back to Top

Instead of manually backing up and maintaining backup files, EdgeOS also supports an automatic remote backup feature. The commit-archive command allows you to automatically backup the configuration after each commit.

CLI: Access the Command Line Interface. You can do this using the CLI button in the GUI or by using a program such as PuTTY.
1. Enter configuration mode.

ubnt@edgerouter:~$ configure
2. Automatically send committed configurations to a TFTP, SCP or FTP server:

[edit]
ubnt@edgerouter# set system config-management commit-archive location ?

Possible completions:
Uniform Resource Identifier

Detailed information:

“scp://:@/


“ftp://:@/
“tftp:///

[edit]
ubnt@edgerouter# set system config-management commit-archive location tftp://192.168.1.1/archive
3. Commit the changes.

[edit]
ubnt@edgerouter# commit

Archiving config… tftp://192.168.1.1/archive OK
You can also keep a specified number of commit revisions (configuration files) on the local device by using the commit‑revisions statement.

1. Enter configuration mode.

ubnt@edgerouter:~$ configure
2. Specify the amount of revisions to keep.

[edit]
ubnt@edgerouter# set system config-management commit-revisions 10
3. Commit the changes.

[edit]
ubnt@edgerouter# commit
4. Test the feature by enabling a random service.

[edit]
ubnt@edgerouter# set service telnet port 23

ubnt@edgerouter# compare
[edit service]
+telnet {
+ port 23
+}

[edit]
ubnt@edgerouter# commit

[ service telnet ]
Starting the telnet service. Check /var/log/messages.
5. Verify the commit revision list.

ubnt@edgerouter:~$ show system commit
0 2018-04-02 22:07:58 by ubnt via cli
commit
1 2018-04-02 22:07:50 by ubnt via cli
commit
2 2018-04-02 22:07:50 by root via init
commit

NOTE: The currently active configuration is commit revision 0.
The following commands allow you to compare the different commit files.

show system commit List all the current commit revisions
show system commit diff Compare the difference between this commit and the previous commit.
show system commit file
Display the contents of this commit configuration file.
It is possible to add comments to commits to easily see which revision added which feature:

[edit]
ubnt@edgerouter# delete service telnet

[edit]
ubnt@edgerouter# commit comment removed-telnet

[edit]
ubnt@edgerouter# run show system commit
0 2018-04-02 22:18:07 by ubnt via cli
removed-telnet
1 2018-04-02 22:17:17 by ubnt via cli
commit
2 2018-04-02 22:17:08 by ubnt via cli
commit
Lastly, you can restore a previous configuration revision by using the rollback command.

[edit]
ubnt@edgerouter# rollback ?

Possible completions:
Rollback to revision N (currently requires reboot)

Revisions:
0 2018-04-02 22:18:07 ubnt by cli
1 2018-04-02 22:17:17 ubnt by cli
2 2018-04-02 22:17:08 ubnt by cli
3 2018-04-02 22:07:58 ubnt by cli
4 2018-04-02 22:07:50 ubnt by cli
5 2018-04-02 22:07:50 root by init

[edit]
ubnt@edgerouter# rollback 2

Proceed with reboot? [confirm][y]

The system is going down for reboot NOW

Bir cevap yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.