cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sam_deason
Helper I
Helper I

How To keep Production and Development PBIRS on prem in sync. Move all RDL and PBIX files

The subject is basically it. I would like to find a way to Copy all PBIX, RDL, Excel and PDF files from Production into a development. 

 

Powershell or C# would be prefered/

 

Thanks,

Sam

10 REPLIES 10
d_gosbell
Super User
Super User

I would suggest you look at the ReportingServicesTools powershell module (see https://github.com/microsoft/ReportingServicesTools)

 

You should be able to use out-rsfoldercontent to copy everything from prod to a drive somewhere, then use write-rsfoldercontent to put those files back up to dev

I've tried to use Out-RsFolderContent, but  this is skipping Power Bi Files. Is there something I'm missing?

I've also tried Out-RsRestFolderContent which appear to download PBIX files, but errors out on a linked report or anything that isn't in this list:

 

We only support items which are of type Report, DataSet, DataSource, Mobile Report or Power BI Report


@sam_deason wrote:

I've also tried Out-RsRestFolderContent which appear to download PBIX files, but errors out on a linked report or anything that isn't in this list:

 

We only support items which are of type Report, DataSet, DataSource, Mobile Report or Power BI Report


Sorry I checked our code and it was the out-rsrestfoldercontent cmdlet that we are using. But I also forgot that I actually manually patched our version so that it only writes a warning, not an error when it comes across an unsupported type.

 

if you are interested I've attached the file I patched where altered lines 85-94 to add a try/catch block. This file lives in the ReportingServicesTools\Functions\CatalogItems\Rest folder where ever you've installed the module.

Thanks I'll give that a shot later today. 

Finally had some time and it's looking closer, but the updated version doesn't handle linked reports.

 

I would like to have those, but it would be ok if those are skipped. 

Yes, I just skipped the linked reports. There is no actual file format for those they, are just a record in the database. You could possibly look at building your own file by writing the data out as xml or json, but I'm not aware of anyone having done this already.

Sorry I meant to say, when I get to a a folder with a linked report the script fails.

 

Just in case here's what I'm using:

#Out-RsRestFolderContent -RsFolder / -ReportPortalUri 'https://reports.site.com/Reports' -Destination C:\_TestingPBIRS -Recurse

 

Here's the error message:

Unsupported item type! We only support items which are of type Report, DataSet, DataSource, Mobile Report or Power BI Report

 

Thanks,

Sam

I've found a way to skip linked reports, it's ugly though and I doubt they would want what I did on the github, but that brought up a new issue. 

 

Do you by chance know of a Recurse way to upload. Looks like I have to go to each folder individually. 

Thanks, I'll check it out. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!