How to play Project M using a backup on USB?

It's not possible to play backups with Riivolution, as the development team is concerned about issues with piracy. Using USB loader GX instead, it can be done with their built-in Ocarina cheat support. I had difficulty finding any good guides for this now that the PMDev team has stopped working on the project, but generally the procedure is identical to using any other Brawl mods with USB loader GX. However, getting the Wii to read games from your drive in the first place is somewhat tricky.

You will most likely need to update your IOS functions; often people patch the IOS 249 or IOS 250 function stubs using custom IOS files. You can see e.g. this page for more details: https://code.google.com/archive/p/usbloader-gui/wikis/Installation.wiki

Note that messing with the IOS functions may or may not be illegal in your country and probably constitutes a violation of Nintendo's End User License Agreement.