If you are unable to restore your company file using the backup file (.qbb) because of QuickBooks Error 6123, you will need to repair the actual company file. To repair the company file, you can use QuickBooks File Doctor and Rebuild Data Utility. Get more info about the troubleshooting procedure through the article linked here.