Configuration restore with force option

Prerequisites
Back up the configuration using traditional copy config or cfg-backup commands.
Procedure
  1. Execute the show config files command. By default, the config file provides all the associations.
    switch(config)# show config files
    
    Configuration files:
    
     id | act pri sec | name
     ---+-------------+-------
      1 |  *   *   *  | config
      2 |             | file1
      3 |             | file2
      4 |             |
      5 |             |
    
  2. Use cfg-restore flash file1 force command to see the configuration of file1.
    switch(config)# cfg-restore flash file1 force
    As the file1 configuration requires a reboot, a system reboot occurs. When the switch comes up, file1 is the new active configuration.
    switch(config)# sh config files
    
    Configuration files:
    
     id | act pri sec | name
     ---+-------------+---------
      1 |      *   *  | config
      2 |  *          | file1
      3 |             | file2
      4 |             |
      5 |             |
    
    NOTE:

    During a configuration restore with reboot, the association changes. To make the configuration as a default configuration for subsequent system reboots, use startup-default [<primary|secondary>] config FILENAME command.

    For startup-default config file1:
    switch(config)# show config files
    
    Configuration files:
    
    id | act pri sec | name
     --+-------------+---------
     1 |             | config
     2 |  *   *   *  | file1
     3 |             | file2
     4 |             |
     5 |             |