RestoreSPSite gave no clear indication of what went wrong until I browsed through ulsviewer.exe. There I found:
Could not deserialize site from C:\\somefolder\\sharepoint.backups\\wss_content_xyz.bak . Microsoft.SharePoint.SPException: Schema version of backup 15.0.4787.1000 does not match current schema version 15.0.4797.1000 at Microsoft.SharePoint.SPSite.Restore(String filename, Boolean isADMode, Boolean& readOnlyMode, Boolean& hadWriteLock)
I constantly have come across this issue due to servers upgrading at different times. to temporarily get over this, i changed the version on the database record to trick it into matching. This likely will not work if the schema version changes involves significant differences. either way, the best approach would be to update the servers to match the same versions.
Here’s the reference to the db line change:
Don’t forget to restart system (or restart the services to pick up the change).