Note that the final output of recovering a database file is normally a.gramps or .gpkg file. Then you can import that into a new, blank tree.
It is important to note that the database only has filename & path pointers (some may be relative, some may be absolute, some may be internet URLs)… the database does NOT store the actual media objects.
So your recovery process must include restoring the recovered file to the original machine. Then you can make a backup INCLUDING media.
This backup file WILL include the media objects (but NOT the Internet URL media) for transport to a different machine. (You could used the DownloadMedia tool addon to harvest copies of the Internet URL media to local files.)
If some of the media objects use Absolute filepaths instead of the Relative paths, there may be a littering of additional directories. Some file management housekeeping work might be needed.
After re-organizing the file, use the Media Verify tool addon to resolve the new locations.