How to perform a db2 redirected restore

Sometimes you need to restore db2 databases on a different machine. For example during on prem to cloud migrations, or when moving database servers during an upgrade for Connections. In most cases some of the paths will be different. The LOGPATH is gonna be your main issue. Goal of this post is to show you how to restore the database and change the LOGPATH setting inside the database you are restoring on the fly.
This is a companion discussion topic for the original entry at https://blog.ramsit.com/how-to-perform-a-db2-redirected-restore/