copy running-config startup-config
Saves the active running configuration to the startup configuration file so that it persists after a reload.
Overview
The 'copy running-config startup-config' command is a fundamental Cisco NX-OS command used to save the current active configuration (running-config) to the non-volatile startup configuration file (startup-config). This ensures that all configuration changes made during the current session persist across system reloads or power cycles. In Cisco NX-OS, the running configuration is stored in memory and is volatile; without saving, any changes are lost upon reboot. The startup configuration is stored in the bootflash file system, typically as 'startup-config'. This command is analogous to 'copy run start' in Cisco IOS or 'write memory' in older IOS versions. It is essential for network engineers to use this command after any configuration change that needs to be permanent, such as interface settings, VLANs, routing protocols, or security policies. In troubleshooting workflows, saving the configuration before making experimental changes allows rollback by reloading the device. The command is executed in EXEC mode and requires no additional parameters. On Nexus switches, the process is atomic; the system writes the entire configuration to a temporary file and then renames it to 'startup-config' to prevent corruption. This command is safe to use at any time and does not disrupt network operations.
copy running-config startup-configWhen to Use This Command
- After making configuration changes that need to survive a reboot.
- Before performing a disruptive upgrade or maintenance to ensure the current config is saved.
- When deploying a new switch to save the initial configuration.
- As a routine step before reloading the device to avoid losing changes.
Command Examples
Basic save of running configuration
copy running-config startup-configCopy complete, now saving to disk (please wait)... Copy complete.
The command copies the active running configuration to the startup configuration file. The output confirms the copy is complete and saved to disk.
Using the abbreviated form
copy run startCopy complete, now saving to disk (please wait)... Copy complete.
The abbreviated form 'copy run start' is equivalent to the full command. Output is identical.
Understanding the Output
The output of 'copy running-config startup-config' is minimal. It first displays 'Copy complete, now saving to disk (please wait)...' indicating the configuration is being written to the persistent storage (bootflash). Then 'Copy complete.' confirms the operation finished successfully. There are no fields to interpret; any error message (e.g., 'Permission denied' or 'No space left on device') would indicate a problem. A healthy output is the two-line success message. If the command fails, common errors include insufficient disk space or file system corruption.
Configuration Scenarios
Saving Configuration After Initial Setup
A new Nexus 9000 switch has been configured with VLANs, interfaces, and OSPF. The engineer wants to save the configuration before connecting it to the production network.
Topology
N/ASteps
- 1.Connect to the switch via console or SSH.
- 2.Enter EXEC mode (default).
- 3.Type 'copy running-config startup-config' and press Enter.
- 4.Verify the output shows 'Copy complete.'
! No configuration block needed; command is executed in EXEC mode.
Verify: Use 'show startup-config' to confirm the saved configuration matches the running configuration.
Watch out: If the bootflash is full, the copy will fail. Check available space with 'dir bootflash:' before saving.
Troubleshooting with This Command
When troubleshooting configuration persistence issues, the 'copy running-config startup-config' command is the first step to ensure changes are saved. If after a reload the configuration is missing, verify that the command was executed and completed successfully. Common failure reasons include insufficient disk space on bootflash, file system corruption, or permission errors. To check disk space, use 'dir bootflash:' and look for available bytes. If the file system is corrupted, you may need to reformat bootflash (caution: erases all files). Another issue is that the command may appear to succeed but the startup-config file is not updated due to a bug; in that case, use 'show startup-config' to compare with 'show running-config'. If they differ, re-issue the copy command. In high-availability (HA) setups, ensure both supervisors have the same startup-config; use 'copy running-config startup-config' on the active supervisor, and the standby will synchronize automatically. If synchronization fails, check the HA status with 'show system redundancy status'.
CCNA Exam Tips
Remember that 'copy running-config startup-config' is the NX-OS equivalent of 'write memory' or 'copy run start' on IOS.
On Nexus switches, the startup configuration is stored in a file called 'startup-config' in bootflash.
Always verify the copy succeeded by checking the output; a missing 'Copy complete' line indicates failure.
Common Mistakes
Forgetting to save after making changes, causing loss of configuration after reload.
Using 'copy startup-config running-config' instead, which overwrites the running config with the startup config (opposite effect).
Assuming the command is 'write memory' (which works on IOS but not on NX-OS; NX-OS uses 'copy running-config startup-config').
Platform Notes
On Cisco NX-OS, the 'copy running-config startup-config' command is the standard way to save configuration, unlike Cisco IOS where 'write memory' or 'copy run start' are also common. NX-OS does not support 'write memory'; the only valid command is 'copy running-config startup-config'. On Nexus platforms, the startup configuration file is located in bootflash:/startup-config. The command can be abbreviated as 'copy run start'. In NX-OS versions prior to 6.x, the command might behave slightly differently, but the syntax remains the same. On other platforms like Cisco IOS XR, the equivalent is 'commit' after configuration changes. For NX-OS, there is no 'commit' model; changes are immediate and must be saved explicitly. When upgrading NX-OS, it is recommended to save the configuration before and after the upgrade.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions