Got it

switch config - copy & paste

Created: Mar 20, 2020 14:47:18Latest reply: Mar 22, 2020 01:50:59 174 5 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi There, Can I copy and paste huawei switch config to switch console, will this work?

  • x
  • convention:

Featured Answers

Best answer

Recommended answer

Admin Created Mar 22, 2020 01:50:59 Helpful(0) Helpful(0)

Posted by MattR at 2020-03-21 03:38 Thanks Sohaib, How we can restore configuration from text file.
Yes, you can do like that.
Just copy the configuration from other device and paste in the CLI.
But you are recommended to do that between the same firmware versions, cause there might be some different commands between the different versions, which might cause error when import the configuration.
Also, carefully paste the passwords in the configuration, cause the passwords are stored in cipher charaters, you should edit them before importing.
And, also the RSA keys.
In one word, better to paste the common configuration, such as interface, traffic policy, eth-trunk, routing protocol, modifying the password and other private information before importing.
View more
  • x
  • convention:

All Answers
chenhui Admin Created Mar 20, 2020 14:52:31 Helpful(0) Helpful(0)

Hi @MattR,
Not exactly understand your meaning, can you please clarify the problem?

Thanks.

View more
  • x
  • convention:

MattR Created Mar 20, 2020 16:19:07
if i have configuration in a text file, can I console the new switch and paste the configuration?  
sohaib.ansar MVE Created Mar 20, 2020 15:36:58 Helpful(0) Helpful(0)

hi User,


If the device is damaged unexpectedly, the configuration file cannot be recovered. You can back up the configuration file in advance using one of the following methods:
  • Copy the content displayed on the screen.

  • Back up the configuration file to the storage device.

  • Back up the configuration file using FTP, TFTP, FTPS, SFTP, or SCP.

  • Run a command to back up the configuration file.

  • Run a command to back up the current running configuration in real time.

Procedure

  • Copy the content displayed on the screen.


    Run the display current-configuration command and copy all command outputs to a .txt file. The configuration file is backed up in the hard disk of the maintenance terminal.

    imgDownload?uuid=b16d5652a95545888a83d30

    If a configuration is too long, it may be displayed in two lines on the terminal screen, depending on the terminal software. When copying a two-line configuration from the screen to a .txt file, ensure that the configuration is displayed in only one line. Otherwise, configuration restoration will fail when the .txt file is used.


  • Back up the configuration file to the storage device.


    The current configuration file can be backed up immediately to the flash memory of the device. After the device starts, run the following commands to back up the configuration file to the flash memory of the device:

    <HUAWEI> save config.cfg
    <HUAWEI> copy config.cfg backup.cfg


  • Back up the configuration file using FTP, TFTP, FTPS, SFTP, or SCP.

    The device supports configuration file backup using FTP, TFTP, FTPS, SFTP, or SCP. Configuration file backup using FTP or TFTP is simple, but there are security risks. In scenarios with high security requirements, configuration file backup using FTPS, SFTP, or SCP is recommended. The following describes the configuration file backup process using FTP as an example. For details about TFTP, FTPS, SFTP, and SCP, see File Management.

  1. Start the FTP service when the device works as the FTP server.


    Enable the FTP server function on the device. Create an FTP user with the name huawei and password Helloworld@6789. The user is authorized to access the flash memory directory.

    <HUAWEI> system-view[HUAWEI] ftp server enableWarning: FTP is not a secure protocol, and it is recommended to use SFTP.Info: Succeeded in starting the FTP server.[HUAWEI] aaa[HUAWEI-aaa] local-user huawei password irreversible-cipher Helloworld@6789[HUAWEI-aaa] local-user huawei ftp-directory flash memory:[HUAWEI-aaa] local-user huawei service-type ftp[HUAWEI-aaa] local-user huawei privilege level 15


  2. On the maintenance terminal, initiate an FTP connection to the device.


    On the PC, run the following command to set up an FTP connection to the device using the FTP client. In this example, the device IP address is 10.110.24.254.

    C:\Documents and Setting\Administrator> ftp 10.110.24.254Connected to 10.110.24.254.
    220 FTP service ready.
    User (10.110.24.254:(none)): huawei331 Password required for huawei.
    Password:
    230 User logged in.


  3. Configure transfer parameters.


    If the FTP user is authenticated, the FTP client displays the prompt character of ftp>. Enter binary following the prompt character, and specify the path where the uploaded file is to be saved on the FTP client.

    ftp> binary200 Type set to I.
    ftp> lcd c:\tempLocal directory now C:\temp.


  4. Transfer the configuration file.


    On the PC, run the get command to load the configuration file to the specified path and save the file as backup.cfg.

    ftp> get flash:/config.cfg backup.cfg


  5. Check whether the config.cfg and backup.cfg files have the same size. If they have the same size, you have successfully backed up the configuration file.

Run a command to back up the configuration file.


Run configuration copy startup to file file-name

The startup configuration file is backed up to a specified file.

The file name extension of the specified destination file must be .cfg or .zip. The extensions of the destination and backup files must be the same.

If a file with the same name already exists, the system asks whether to replace the previous file. Press Y to replace the file or N not to do so.


Run a command to back up the current running configuration in real time.


In the system view, run undo configuration backup local disable.

The function of backing up the current running configuration is enabled.

If the configuration changes, the device will automatically back up the current running configuration to the device after two hours.

By default, the function of backing up the current running configuration to the device is enabled. To disable this function, run the configuration backup local disable command.

https://support.huawei.com/enterprise/en/doc/EDOC1000178166/a4d0a8db/backing-up-the-configuration-file

View more
  • x
  • convention:

MattR Created Mar 21, 2020 03:38:07 Helpful(0) Helpful(0)

Thanks Sohaib, How we can restore configuration from text file.
View more
  • x
  • convention:

chenhui Admin Created Mar 22, 2020 01:50:59 Helpful(0) Helpful(0)

Posted by MattR at 2020-03-21 03:38 Thanks Sohaib, How we can restore configuration from text file.
Yes, you can do like that.
Just copy the configuration from other device and paste in the CLI.
But you are recommended to do that between the same firmware versions, cause there might be some different commands between the different versions, which might cause error when import the configuration.
Also, carefully paste the passwords in the configuration, cause the passwords are stored in cipher charaters, you should edit them before importing.
And, also the RSA keys.
In one word, better to paste the common configuration, such as interface, traffic policy, eth-trunk, routing protocol, modifying the password and other private information before importing.
View more
  • x
  • convention:

Comment

Comment
You need to log in to comment to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

My Followers

Login and enjoy all the member benefits

Login

Huawei Enterprise Support Community
Huawei Enterprise Support Community
Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.