Comware Based
cancel
Showing results for 
Search instead for 
Did you mean: 

Upload and replace startup.cfg file on HPE switch A5120 JG236A

 
SOLVED
Go to solution
Highlighted
Advisor

Upload and replace startup.cfg file on HPE switch A5120 JG236A

HI,

 

i would like to replace the startup.cfg file on switch HP A5120 JG236A from the CLI .

i would like to do it with TFTP , but i don't know the procedure.

can someone help me?

 

thank you

7 REPLIES 7
Highlighted
HPE Pro

Re: Upload and replace startup.cfg file on HP switch A5120 JG236A

Hello Grenzo!

 restore startup-configuration
Use restore startup-configuration to download a configuration file from a TFTP server and specify
it as the main next-startup configuration file.


Syntax
restore startup-configuration from tftp-server src-filename


Views
User view

Parameters
tftp-server: Specifies a TFTP server's IPv4 address or host name. The host name is a
case-insensitive string of 1 to 253 characters. Valid characters include letters, digits, hyphens (-),
underscores (_), and dots (.).
src-filename: Specifies the name of the configuration file to be downloaded. The file name must be a
string of 5 to 195 characters suffixed with the .cfg extension, and can include path information.


Usage guidelines
This command is not supported in FIPS mode.
Before restoring the configuration file for the next startup, make sure the following requirements are
met:
The server is reachable.
The server is enabled with TFTP service.
You have read and write permissions to the server.
This command provides an easy method for configuration file restoration by automatically
performing all operations required for restoring the main next-startup configuration file.
The command downloads the configuration file to the root directory of the default storage medium on
each member device and specifies the file as the main next-startup configuration file. If a partitioned
USB disk is used as the default storage medium, the configuration file is saved on the first partition.
Make sure all IRF members use the same type of default storage medium. If a subordinate device
uses a different type of default storage medium than the master, the command cannot propagate the
configuration file to the subordinate device. For example, the subordinate device uses a USB disk,
but the master uses a flash memory. In this situation, you must manually restore the main
next-startup configuration file on the subordinate device.

Examples
# Download config.cfg from the TFTP server at 2.2.2.2 and specify the file as the main next-startup
configuration file.
<Sysname> restore startup-configuration from 2.2.2.2 config.cfg
Restoring the next startup-configuration file from 2.2.2.2. Please wait...finished.
Now restoring the next startup-configuration file from main board to backup board. Please
wait...finished.

More information about this command can be found in Fundamentals Configuration Guide and Fundamentals Command Reference Guide for respective platform.

Hope this helps!

 

I am an HPE employee

Accept or Kudo

Highlighted
Advisor

Re: Upload and replace startup.cfg file on HP switch A5120 JG236A

HI,

thank you very much for your reply.

i've tried what you told me , but it doesn't work.

i'm connected into the switch trought console ,i've launched tftp (172.0.0.1), selected the correct folder where there is startup.cfg file.

then entered the command :

<Sysname> restore startup-configuration from 172.0.0.1 startup.cfg

but it say : 

restore failed , TFTP error!

why?

thank you 

Highlighted
HPE Pro

Re: Upload and replace startup.cfg file on HP switch A5120 JG236A

Possibilities are many, let's start with the most probable ones:

1. There is no network connectivity between switch and the TFTP server
2. TFTP server is not started.
3. TFTP server is not configured correctly, e.g. it doesn't know how to find 'startup.cfg' file
4. startup.cfg file doesn't exist in the TFTP server's root directory.
5. Host-based firewall on the TFTP server is blocking the connection

 

I am an HPE employee

Accept or Kudo

Highlighted
Advisor

Re: Upload and replace startup.cfg file on HP switch A5120 JG236A

now it works , it was the Host-based firewall.

now the problem is that i've upload the file and replaced the startup.cfg file , then i saved and reboot.

but the configuration still remain the previously.

why?

thank you

 

Highlighted
HPE Pro

Re: Upload and replace startup.cfg file on HP switch A5120 JG236A

Why? The answer is in your description:

now the problem is that i've upload the file and replaced the startup.cfg file , then i saved and reboot.

You have replaced the startup.cfg by downloading from the TFP server, then you SAVED current-configuration to that file replacing that file with your initial configuration. 

Now repeat the tftp transfer again and then reboot WITHOUT SAVING THE CONFIGURATION! Please, pay attention what the switch prompts you during the reboot. Do not blindly press Y or N and everything will be fine.

 

I am an HPE employee

Accept or Kudo

Highlighted
Advisor

Re: Upload and replace startup.cfg file on HP switch A5120 JG236A

ok , it works.

thank you very much for your help.

last question , what is the command to reset on factory default the switch without long procedure?

thank you again.

 

 

Highlighted
HPE Pro
Solution

Re: Upload and replace startup.cfg file on HP switch A5120 JG236A

The command is 'reset saved-configuration' then reboot WITHOUT saving the configuration. 

 

I am an HPE employee

Accept or Kudo