I recently encountered a few errors when trying to backup & restore my site. I backed up one of my site, with .sql, private & public files (in tar.gz).
Not sure about this. Somebody more knowledgeable should be able to chip in soon.
But do try the git branch bit. The underlying problem could be the same: that you are trying to restore a develop branch on master or a master branch on develop.
Thanks for your suggestions, they are everything is in master branch. But i will try to reinstall with the official erpnext & frappe again, since this is my customized version.
I wonder if different version would make a difference. The erpnext i backup with is v7, but slightly older.
Try running a bench update from the source machine and then do a backup and restore. This will ensure version synchronization between the source and the target systems.
Customizations can definitely break the restore. Try and park all your customizations into an App.
Are the ERPNext & Frappe versions different, from your site to the VM? If they are, ideally you update to match. I’ve encountered similar issues due to different versions.