Backing Up Labs
- Last Updated: 08/10/2018
Before and after each lab, you will have to back up the configuration of your VMs as well as your switch and router. Make sure to do this or else the next group might overwrite your changes!
Backing up and resetting switch and router¶
To backup the configuration, log into the switch or router and do a "show run" to see the current configuration. Press the spacebar to go through the whole thing. Copy down the entire configuration and paste it into a text file on your computer. Save that someplace you won't lose it.
Now we can reset the router and switch:
trainswitch# write erase trainswitch# reload
This will factory reset and reboot the router.
Backing up and resetting KVM hosts¶
To back up the kvm guests execute these commands and follow the prompts:
root@richweb-host 10:31:23 > ~ # cd /opt/rwtrainer/kvm_scripts_pristine/ root@richweb-host 10:31:31 > /opt/rwtrainer/kvm_scripts_pristine # ./reset_env.py
All the hosts are now archived.
Restoring all settings¶
To restore the switch and router, just console in, go into configure mode, and paste the saved configuration in. It is now just as you had it before.
To restore the virtual machines you had before, execute these commands:
root@richweb-host 10:31:23 > ~ # cd /opt/rwtrainer/kvm_scripts_pristine/ root@richweb-host 10:31:31 > /opt/rwtrainer/kvm_scripts_pristine # ./restore_env.py