Edge Router Yedekleme ve Yedekten Yukleme

1. Enter configuration mode.

[email protected]:~$ configure
2. Save the configuration to a different local file.

[edit]
[email protected]# save ?

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

[edit]
[email protected]# 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]
[email protected]# 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]
[email protected]# 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.

[email protected]:~$ configure
2. Save the configuration to a remote machine using either TFTP, SCP, FTP or SFTP.

[edit]
ub[email protected]# 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]
[email protected]# 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.

[email protected]:~$ configure
2. Load the backup configuration from a local or a remote file.

[edit]
[email protected]# 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]
[email protected]# 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]
[email protected]# compare
4. Commit the changes

[edit]
[email protected]# commit
5. Save the active configuration to the startup/boot configuration.

[edit]
[email protected]# 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.

[email protected]:~$ configure
2. Automatically send committed configurations to a TFTP, SCP or FTP server:

[edit]
[email protected]# set system config-management commit-archive location ?

Possible completions:
Uniform Resource Identifier

Detailed information:

“scp://:@/


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

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

[edit]
[email protected]# 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.

[email protected]:~$ configure
2. Specify the amount of revisions to keep.

[edit]
[email protected]# set system config-management commit-revisions 10
3. Commit the changes.

[edit]
[email protected]# commit
4. Test the feature by enabling a random service.

[edit]
[email protected]# set service telnet port 23

[email protected]# compare
[edit service]
+telnet {
+ port 23
+}

[edit]
[email protected]# commit

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

[email protected]:~$ 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]
[email protected]# delete service telnet

[edit]
[email protected]# commit comment removed-telnet

[edit]
[email protected]# 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]
[email protected]# 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]
[email protected]# 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.