1) Upload the files.
2) Point the library/config.php file to the existing database.
3) Manually create the internal_data/install-lock.php file. The content of the file doesn't matter as long as the file exists.
Note that you will have lost all avatars and attachments because those are stored in the file system.