My approach when things like this happen is I start my DR (disaster recovery) process. Restore the last known good backup to a test system and then copy the data from the test system to live.
If the ONLY backup of the database is in your onedrive, then use that, but I'd be looking at a better long term storage solution. I wouldn't use onedrive for backups as onedrive is tied to a user account. If that user account is deleted, the content in that onedrive is only good for 90 days before Microsoft deletes it permanently. Onedrive, and SharePoint, are not tools I would use for database backup storage. They are document control systems.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.