Sometimes it happens that an upgrade fails and you forgot to make a backup. It's not the worst thing that could ever happen. And it can easily be fixed.
1. Make note of which version of the upgrade patches that halted. In this example, we will assume 2.0.sql was the patch that halted with an error during upgrade.
2. Start by deleting all patches before the failing patch prior to (in this case) 2.0. All prior patches should have been successfully processed until this one, and should not be applied again. If it was the .php patch that failed, you can safely delete the .sql patch, as the SQL patch is always processed before the php patch.
3. Edit the failing patch 2.0.sql and remove all commands before the failing command that halted the process, as they are already applied. Once more, we do not want to apply the successful commands again.
4. Solve the cause for why the command halted. Usually it's due to conflicting data in the database.
5. Resume your upgrade by pressing F5. Or go to upgrade.php again if you accidentally closed the window.