Reinstallation and Restoration from database backup how?

I have installed new OS Ubuntu 17 version and my version of ERPNext is 8.0 version.

The system was working on 15 version of Ubuntu , know I have changed the ubuntu version 17.0.

I have the ERP NExt and Frappe files as back up and also Database file/

I want to replace and restore the database back up.

Please explain the process for the reinstalling the system.