Hi
Unfortunately, there is no recovery feature because it was identified as impacting security.
The only way to avoid this in the future is to make a backup of the latest "Startup Config" with a know password.
If the Password is lost you can then reset the controller to Factory Defaults and reload the saved configuration