I managed to restore Moodle 3.4 from the database dump file, took option 1) from above.
Steps I used (perhaps could be simplified):
1. Restore the MYSQL dump in a database
2. Copy the newest Moodle (3.9) installation files and try to install Moodle, given the existing database
3. Moodle tries to upgrade the old Moodle to new Moodle version, but fails. But meanwhile gives you a hint what Moodle version was previously installed from the dump
4. Reinstall LAMP server using the exact PHP that is stated in the requirements in https://download.moodle.org/releases/legacy/. But I needed a newer version of MYSQL, which is evident from the first few lines of the dump file. The hard part is installing old (unsupported) versions of PHP and MYSQL, but Google is your friend here.
5. Restore dump file in MYSQL .
6. Reinstall Moodle (3.4 in my case), giving it the existing database (restored dump file).
7. Moodle updated just the minor release
8. Works, woo-hoo!