Courseiva
SystemPrivileged EXEC

copy startup-config running-config

Copies the saved startup configuration (startup-config) into the active running configuration (running-config), effectively restoring the device to the state saved in NVRAM without a reboot.

Definition: copy startup-config running-config is a Cisco IOS privileged exec command. Copies the saved startup configuration (startup-config) into the active running configuration (running-config), effectively restoring the device to the state saved in NVRAM without a reboot.

Overview

The 'copy startup-config running-config' command is a fundamental IOS tool that merges the saved configuration stored in NVRAM (startup-config) into the active configuration in RAM (running-config). This command is essential when you need to revert to a previously saved configuration state without rebooting the device, which would cause network downtime. Unlike 'reload', which resets the entire device and applies the startup configuration from scratch, this command performs a live merge, adding or overwriting commands from the startup configuration into the running configuration.

It is particularly useful after making experimental changes that you want to discard, or when you have a known-good baseline configuration saved and need to restore it quickly. The command does not clear existing running-config commands that are not present in the startup-config; instead, it only applies the commands from the startup-config. This means that if the startup-config has 'ip route 0.0.0.0 0.0.0.0 10.0.0.1' and the running-config has 'ip route 0.0.0.0 0.0.0.0 10.0.0.2', the running-config will be overwritten with the static route to 10.0.0.1.

However, if the running-config has an interface configuration that is not in the startup-config, that interface configuration remains unchanged. This behavior can lead to unexpected results if the startup-config is outdated or incomplete. The command is executed from privileged EXEC mode (enable), and it prompts for confirmation before overwriting the running configuration.

It is important to note that the command does not affect the startup-config itself; it only reads from it. For a full restore, you would typically follow this with 'copy running-config startup-config' to save the restored state. In a troubleshooting workflow, this command is often used after a misconfiguration to quickly revert to a known working state, avoiding the need for a reboot.

It is also used during maintenance windows to apply a pre-staged configuration. The command is available on all Cisco IOS platforms, including routers and switches, and behaves consistently across versions. However, on some platforms, the command may be abbreviated as 'copy start run'.

Syntax·Privileged EXEC
copy startup-config running-config

When to Use This Command

  • After making temporary changes that you want to revert to the saved configuration without reloading the router.
  • When you have accidentally deleted or misconfigured the running configuration and need to restore the last saved configuration.
  • To synchronize the running configuration with the startup configuration after verifying that the startup config is correct.
  • During troubleshooting, to ensure the running configuration matches a known good baseline saved in startup-config.

Command Examples

Basic copy from startup-config to running-config

copy startup-config running-config
Destination filename [running-config]?

Building configuration...
[OK]

The command prompts for confirmation of the destination filename (default is running-config). Press Enter to accept. The router then builds the configuration and displays [OK] when successful.

Copy with explicit destination filename

copy startup-config running-config
Destination filename [running-config]? running-config

Building configuration...
[OK]

Typing 'running-config' explicitly confirms the destination. The output confirms the configuration was applied successfully.

Understanding the Output

The output is minimal. The prompt 'Destination filename [running-config]?' asks you to confirm the destination; pressing Enter accepts the default. 'Building configuration...' indicates the router is merging the startup config into the running config.

'[OK]' means the operation completed without errors. If there is a syntax error in the startup config, the command may still report [OK] but the invalid lines will be ignored (check with 'show running-config | include error'). A failure message like 'Invalid input detected' would indicate a problem with the source file.

Configuration Scenarios

Restore a router to a known-good configuration after a failed OSPF change

A network engineer made changes to OSPF timers on Router R1, causing neighbor flapping. The previous stable configuration was saved in startup-config. The engineer wants to revert the running configuration to the saved state without rebooting.

Topology

R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2

Steps

  1. 1.Step 1: Enter privileged EXEC mode on R1: R1> enable
  2. 2.Step 2: Verify the current running configuration has the problematic OSPF timers: R1# show running-config | section router ospf
  3. 3.Step 3: Copy the startup configuration to the running configuration: R1# copy startup-config running-config
  4. 4.Step 4: Confirm the overwrite when prompted: Destination filename [running-config]? [press Enter]
  5. 5.Step 5: Verify the OSPF configuration is restored: R1# show running-config | section router ospf
  6. 6.Step 6: Check OSPF neighbor status: R1# show ip ospf neighbor
Configuration
! Before: problematic OSPF config
router ospf 1
 network 10.0.12.0 0.0.0.3 area 0
 timers throttle spf 10 100 100
!
! After copy start run: restored config
router ospf 1
 network 10.0.12.0 0.0.0.3 area 0
 timers throttle spf 200 1000 5000

Verify: R1# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.0.12.2 1 FULL/DR 00:00:35 10.0.12.2 GigabitEthernet0/0

Watch out: If the startup-config is not the most recent stable configuration (e.g., it was saved before a critical change that is still needed), this command will remove those needed changes. Always verify the startup-config content before executing.

Apply a baseline switch configuration after a failed VLAN change

A junior engineer accidentally deleted all VLANs on a switch, causing connectivity loss. The startup-config contains the original VLAN configuration. The senior engineer needs to restore the VLANs without reloading the switch.

Topology

SW1(Gi0/1)---access port VLAN 10---PC1 SW1(Gi0/2)---trunk to upstream switch

Steps

  1. 1.Step 1: Enter privileged EXEC mode on SW1: SW1> enable
  2. 2.Step 2: Check current VLAN configuration: SW1# show vlan brief
  3. 3.Step 3: Copy startup-config to running-config: SW1# copy startup-config running-config
  4. 4.Step 4: Confirm the overwrite: Destination filename [running-config]? [Enter]
  5. 5.Step 5: Verify VLANs are restored: SW1# show vlan brief
  6. 6.Step 6: Check interface status: SW1# show interfaces status
Configuration
! Before: VLANs missing
SW1# show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi0/1, Gi0/2

! After copy start run: VLANs restored
SW1# show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi0/1, Gi0/2
10   Engineering                      active    Gi0/1
20   Marketing                        active    Gi0/2

Verify: SW1# show vlan brief VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi0/1, Gi0/2 10 Engineering active Gi0/1 20 Marketing active Gi0/2

Watch out: The command does not remove VLANs that are in the running-config but not in the startup-config. If the running-config had extra VLANs, they will remain. To fully revert, you may need to manually delete those extra VLANs or use 'delete vlan' commands.

Troubleshooting with This Command

When troubleshooting network issues, the 'copy startup-config running-config' command is a powerful tool to quickly revert to a known-good configuration state. However, it should be used with caution because it merges configurations rather than replacing them entirely. Healthy output from this command is simply a confirmation message: 'Destination filename [running-config]?' followed by 'OK' after pressing Enter.

There is no verbose output showing what changed. To understand what the command will do, you should first compare the startup and running configurations using 'show startup-config' and 'show running-config'. Common symptoms that indicate a need for this command include: unexpected routing behavior after a configuration change, interface flapping due to misconfigured parameters, or loss of connectivity after a failed ACL or VLAN modification.

A step-by-step diagnostic flow would be: 1) Identify the symptom (e.g., OSPF neighbors down). 2) Check the running configuration for recent changes using 'show running-config | include <parameter>' or 'show running-config | section <feature>'. 3) Compare with the startup configuration using 'show startup-config | section <feature>'. 4) If the startup configuration is known to be good, execute 'copy startup-config running-config'. 5) Verify the symptom is resolved (e.g., 'show ip ospf neighbor'). 6) If the symptom persists, the issue may be elsewhere (e.g., physical layer). Correlating this command's output with other show commands is crucial: after the copy, use 'show running-config' to confirm the expected changes, and use feature-specific commands like 'show ip route' or 'show vlan' to verify functionality. Note that the command does not affect dynamic states like OSPF adjacencies or STP topology; it only changes the configuration.

If the issue is due to a software bug or hardware failure, this command will not help. Also, be aware that the command may cause a brief disruption if the configuration change affects interfaces (e.g., changing IP address or shutting/no shut). In such cases, plan for a maintenance window.

Finally, always ensure you have a backup of the current running configuration before reverting, in case the startup configuration is also corrupted.

CCNA Exam Tips

1.

CCNA exam tip: The 'copy startup-config running-config' command merges the startup config into the running config; it does NOT replace the running config entirely. Existing commands not in startup-config remain unless overwritten.

2.

CCNA exam tip: Unlike 'reload', this command does not cause downtime; it applies the saved configuration immediately.

3.

CCNA exam tip: If the startup config is corrupted or empty, the command may fail or produce an empty running config. Always verify with 'show running-config' afterward.

4.

CCNA exam tip: The command is often used in labs to reset a device to a known state without rebooting.

Common Mistakes

Mistake 1: Confusing 'copy startup-config running-config' with 'copy running-config startup-config' — the latter saves the current config to NVRAM, the opposite direction.

Mistake 2: Assuming the command replaces the entire running config — it merges, so old settings may persist if not explicitly overwritten.

Mistake 3: Forgetting that the command does not validate the startup config syntax; invalid lines are silently ignored, leading to unexpected behavior.

copy startup-config running-config vs reload

Both 'copy startup-config running-config' and 'reload' are used to apply the saved startup configuration to the device, but they differ significantly in execution: one merges the config into memory without rebooting, while the other restarts the device entirely. This distinction often causes confusion when deciding how to restore or update the running configuration.

Aspectcopy startup-config running-configreload
ScopeCopies entire startup config into running configReboots and reloads startup config from NVRAM
PersistenceAffects running config only; startup config unchangedStartup config remains; running config is replaced after reboot
PrecedenceMerges with existing running config (adds/overwrites)Replaces running config entirely with startup config
Typical useApply saved config without service interruptionRecover from misconfiguration or apply boot changes
DisruptionNon-disruptive; no outageCauses network outage during reboot

Use copy startup-config running-config when you need to apply the saved configuration to the device without interrupting network services.

Use reload when you need to reboot the device to apply boot configuration changes, recover from a severe misconfiguration, or ensure a clean initial state from NVRAM.

Platform Notes

On Cisco IOS-XE (e.g., Catalyst 9000 switches), the command syntax is identical: 'copy startup-config running-config'. However, IOS-XE uses a different file system structure; the startup-config is stored in 'nvram:' or 'flash:' depending on the platform. The command behaves the same.

On NX-OS (e.g., Nexus switches), the equivalent command is 'copy running-config startup-config' to save, but to restore from startup-config to running-config, the command is 'copy startup-config running-config' as well, though NX-OS also has 'configure replace' for more granular rollback. On ASA firewalls, the command is 'copy startup-config running-config' and works similarly, but ASA uses a different configuration hierarchy. On IOS-XR, the concept is different; configurations are committed in a two-phase model (commit confirmed), and the equivalent of copying startup to running is 'load' and 'commit' from the candidate configuration.

There is no direct 'copy startup-config running-config' in IOS-XR. In older IOS versions (12.x), the command may prompt for confirmation differently, but the behavior is consistent. In IOS 15.x and 16.x, the command remains unchanged.

Always use the full command to avoid ambiguity; abbreviations like 'copy start run' are accepted but not recommended in scripts.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions