Yes, all the data on the drive is erased. If you cannot backup then you can try the following. But if it does not work then you will need to do the full erase and install.
Reinstall El Capitan or Later Without Erasing Drive
Please be sure you back up.
- Restart the computer. Immediately after the chime hold down the Command and R keys until the Utility Menu appears.
- Select Disk Utility and click on the Continue button.
- Select the indented (usually, Macintosh HD) volume entry from the side list.
- Click on the First Aid icon in the toolbar. Wait until the Done button activates, then click on it.
- Quit Disk Utility and return to the Utility Menu.
- Select Reinstall OS X and click on the Continue button.
Also, see this User Tip: Basic Steps for Upgrading OS X.