Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
shubhamdebnath
New Member

Restoration of On-premise gateway using powershell: How to restore datagateway on a new server

Hi,

 

Restoration of datagateway on a new server is working perfectly using the on-premise datagateway software GRAPHICALLY.

 

But we want to restore it in an automated way using powershell cmdlet or any other way, so that after redeployment of a new server we can automate the restoration process as well like registration using add-datagatewaycluster cmdlet.

 

Is there a way to achieve the goal via command line? PLease suggest.

13 REPLIES 13
Sorin15384
New Member

@shubhamdebnath @shubhamdebnathh  Any chance you found a script to recovery/restore PowerBI gateway?

 

we have similar situation. We are hosting gateway on EC2 instance. Occasionally there are changes that causes EC2 instance to rebuild when pipeline runs (for example, new AMI ID). When this happens we have to manually recovery the on premise gateway on the EC2 instance as described here: https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-migrate. We have been able to script majority other things on the server, it's just this restore/recovery of gateway we cannot figure. Would appreciate any insight!

 

We are hosting gateway on EC2 instance. Occasionally there are changes that causes EC2 instance to rebuild when pipeline runs (for example, new AMI ID). When this happens we have to manually recover the on premise gateway on the EC2 instance as described here: https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-migrate. We have been able to script majority other things on the server, it's just this restore/recovery of gateway we cannot figure. Is there a cmdlet that allows recovery or restore gateway? We can pass the recovery key through… just need a way to actually recovery. Would appreciate any insight! Thank you.
lbendlin
Super User
Super User

How are you planning to make the required configuration changes for the proxy settings and the performance tuning?

For datagateway installation & configuration we are using Ansible. lineinfile moudle is adding the proxy details in the respective datagateway configuration files.

Restoration requires you to use the cmdlet with the -OverwriteExistingGateway flag.

With -OverwriteExistingGateway flag it is throwing "Add-dataGatewayCluster: gateway gateway-name already exist" in the new server.

I would call that a bug.

 

You can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues . If you have a Pro license you can consider raising a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi

Thanks for the info.

 

By the way isn't the Flag -OverWriteExistingGateway to overwrite the existing gateway configuration in the server where datagateway has already been configured?

 

Can this be used for restoration using recovery key? 

Don't fully understand your question.  Yes, it will overwrite the machine association of the gateway cluster member.  and yes, you need to specify the recovery key as well.  Very much the same process as you would do in the UI.

When I'm using "-OverwriteExistingGateway" on the server where datagateway has already been configured/registered, it is working.

 

But on a complete new server(After terminating that earlier server) or on the same server after reinstalling on-premise datagateway software when using "-OverwriteExistingGateway" it is complaining "gateway already exist".

 

Is -OverwriteExistingGateway suppose to work on new server as well for restoraion?

Explain what you mean by "terminate". Delete the entry in the service?

Terminate=server deletion


We are using AWS EC2 instance.

Deleting the physical server means nothing. You need to take care of the metadata - the configuration definitions held in the service.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.