Hi varanusp,
Do you mean that you do not want to change the configuration, but do not want to perform undo commands one by one, so you want to overwrite the changed configuration with the previous configuration file?
If so, once the switch configuration is changed, it will take effect immediately, that is, you can only perform undo operations one by one.