If you are upgrading a switch from Cumulus Linux 2.5.6 or later in the 2.y.z release train to Cumulus 3.y.z, you can use the Configuration File Migration Script with the
--backup option to create a backup archive of configuration files from the previous release train, copy them off the box, then install them on the new version switch.
Warning: Configuration files in Cumulus Linux 2.5.6+ typically migrate to version 3.y.z without any problems; however, there are certain known issues:
- Never migrate certain configuration files between versions or while replacing hardware. See Files to Never Migrate between Versions or Switches in the Cumulus Linux User Guide.
- Do not migrate
/etc/shadowto the new version directly. The examples and the Ansible script included with Configuration File Migration Script explicitly excludes these two files from the backup archive. You must change the default password for the cumulus user and add any locally created users to the new installation after the upgrade completes.
- You must completely upgrade
/etc/apt/sources.listwith a new 3.x repository and repository structure. Remove repositories from Cumulus Linux 2.5.6+. If there are any custom repositories on the switch, you must migrate them into the new
sources.listfile or the
- Version 2.5.6+ configurations are not guaranteed to work in Cumulus Linux 3.y.z. Be sure to test the restoration and proper operation of the Cumulus Linux 2.5.6+ configuration in Cumulus Linux 3.y.z on a non-production switch or in a Cumulus VX image; every deployment is unique.
The following example excludes
/etc/shadow from the backup archive.
- Back up the files from the previous release train (for example 2.5.6).
# Make a temp dir loc=$(mktemp -d) # Create a backup archive to the temp dir sudo ./config_file_changes --backup --backup_dir $loc --exclude /etc/apt,/etc/passwd,/etc/shadow # Copy the archive and log file to an external server sudo scp -r $loc/* user@my_external_server:.
Optional: Use the Ansible playbook included with the Configuration File Migration script to automate Cumulus Linux switch backup. The playbook creates a backup archive of the Cumulus Linux switch configuration files and retrieves them to a central server, automating backup for all deployed Cumulus Linux 2.5.6+ switches. This is a quick start to setting up automated configuration and control for your deployment.
Reinstall the files from the config file archive to the newly installed switch.
# On the switch, copy the config file archive back from the server: scp user@my_external_server:PATH/SWITCHNAME-config-archive-DATE_TIME.tar.gz . # Untar the archive to the root of the box sudo tar -C / -xvf SWITCHNAME-config-archive-DATE_TIME.tar.gz