Change library_path to point to some folder on your local drive.
set migrated to True
Now copy your recovered metadata.db to the folder you specified earlier as well as all the actual ebook folders/files
Now run calibre
Note that library_path sets the location of the calibre library, not database_path, which is on there for legacy reasons