Command line restore

Does anyone know how to do a command line restore in 2.2
The old restore-aah command is no longer functional.

I was hoping I could do it by passing arguments to whatever php script the web page calls when it does the restore but this was all a bit beyond me.

So I can have a hot spare that I will configure for automatic failover.

Many thanks in advance,