save

In standalone mode:

Use save file-url [ all | slot slot-number ] to save the running configuration to a configuration file, without specifying the file as a next-startup configuration file.

Use save [ safely ] [ backup | main ] [ force ] to save the running configuration to a file in the root directory of the default storage medium. This command automatically saves the file on each MPU and specifies the file as a next-startup configuration file.

In IRF mode:

Use save file-url [ all | chassis chassis-number slot slot-number ] to save the running configuration to a configuration file, without specifying the file as a next-startup configuration file.

Use save [ safely ] [ backup | main ] [ force ] to save the running configuration to a file in the root directory of the default storage medium. This command automatically saves the file on each MPU and specifies the file as a next-startup configuration file.

Syntax

In standalone mode:

save file-url [ all | slot slot-number ]

save [ safely ] [ backup | main ] [ force ]

In IRF mode:

save file-url [ all | chassis chassis-number slot slot-number ]

save [ safely ] [ backup | main ] [ force ]

Views

Any view

Predefined user roles

network-admin

mdc-admin

Parameters

file-url: Saves the running configuration to the specified file, without specifying the file as a next-startup configuration file. The file name must use the extension .cfg and can include path information. If you specify the all keyword or an MPU slot, the file path cannot include a chassis or slot number. If the file path includes a folder name, the folder must already exist.

all: Saves the running configuration to each MPU. If you do not specify this keyword or the slot slot-number option, the command saves the running configuration only to the active MPU on an HPE 7910 or HPE 7910 TAA switch. (In standalone mode.)

all: Saves the running configuration to all MPUs. If you do not specify this keyword or the chassis chassis-number slot slot-number option, the command saves the running configuration only to the global active MPU in the IRF fabric. (In IRF mode.)

slot slot-number: Specifies the MPU by its slot number. The slot number is fixed at 0. (In standalone mode on an HPE 7904 or HPE 7904 TAA switch.)

slot slot-number: Specifies the standby MPU by its slot number. If you do not specify the standby MPU or the all keyword, this command saves the running configuration only to the active MPU. (In standalone mode on an HPE 7910 or HPE 7910 TAA switch.)

chassis chassis-number slot slot-number: Specifies a global standby MPU on an IRF member device. The chassis-number argument represents the member ID of the IRF member device. The slot-number argument represents the slot number of the global standby MPU. If you do not specify a global standby MPU or the all keyword, this command saves the running configuration only to the global active MPU in the IRF fabric. (In IRF mode.)

safely: Saves the configuration file in safe mode. If you do not specify this keyword, the device saves the configuration file in fast mode. Safe mode is slower than fast mode, but more secure. As a best practice, specify the safely keyword for the command.

backup: Saves the running configuration to a configuration file, and specifies the file as the backup next-startup configuration file. If you do not specify this keyword or the main keyword, the command specifies the saved file as the main next-startup configuration file.

main: Saves the running configuration to a configuration file, and specifies the file as the main next-startup configuration file. If you do not specify this keyword or the backup keyword, the command specifies the saved file as the main next-startup configuration file.

force: Saves the running configuration without prompting for confirmation. Without this keyword, the system prompts you to confirm the operation. If you do not confirm the operation within 30 seconds, the system automatically aborts the operation. If you enter Y within the time limit, you can continue the save process and change the next-startup configuration file during this process.

Usage guidelines

If the file specified for this command does not exist, the system creates the file before saving the configuration. If the file already exists, the system prompts you to confirm whether to overwrite the file. If you choose to not overwrite the file, the system cancels the save operation.

This command saves the running configuration to an .mdb binary file as well as a .cfg text file. The two files use the same file name. An .mdb file takes less time to load than a .cfg file.

In safe mode, the system saves configuration in a temporary file and starts overwriting the target next-startup configuration file after the save operation is complete. If a reboot, power failure, or out of memory event occurs during the save operation, the next-startup configuration file is retained.

In fast mode, the device directly overwrites the target next-startup configuration file. If a reboot, power failure, or out of memory event occurs during this process, the next-startup configuration file is lost.

Examples

# Save the running configuration to backup.cfg, without specifying the file as the next-startup configuration file.

<Sysname> save backup.cfg
The current configuration will be saved to flash:/backup.cfg. Continue? [Y/N]:y
Now saving current configuration to the device.
Saving configuration
flash:/backup.cfg. Please wait...
Configuration is saved to flash successfully.

# Save the running configuration to the main next-startup configuration file without any confirmation required.

<Sysname> save force
Validating file. Please wait....
Configuration is saved to device successfully.

# (In standalone mode.) Save the running configuration to a file in the root directory of the flash memory, and specify the file as the main next-startup configuration file on an HPE 7910 or HPE 7910 TAA switch.

<Sysname> save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
Slot 11:
Save next configuration file successfully.

# (In IRF mode.) Save the running configuration to a file in the root directory of the flash memory, and specify the file as the main next-startup configuration file on an HPE 7910 or HPE 7910 TAA IRF fabric.

<Sysname> save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
Chassis 1 Slot 11:
Save next configuration file successfully.

Related commands

display current-configuration

display saved-configuration