Running the restore from the WUI works sometimes and not at others dependent on whether a full restore has been done before or not.
That doesn’t stop the line that @bbitsch flagged up.
being incorrect. It should still be changed from a -d test to a -f test because it should be looking for the existence of a file called ${name}.ipf not for the existence of a directory called ${name}.ipf