Forum Discussion

Felix4356's avatar
Felix4356
Frequent Visitor
1 year ago
Solved

Using Power Automate to backup .pbix files within same Powerbi.com workspace

I have found this article about exporting pbix and rdl files to sharepoint using power automate: https://community.fabric.microsoft.com/t5/Service/Automated-export-of-PBIX-and-RDL-files-from-workspa...
  • v-kathullac's avatar
    1 year ago

    Hi Felix4356 ,

     

    Thank you for reaching out to Microsoft Fabric Community Forum.

    Can you please try with the below possibilites and let us know if you need any assistance,

     

    1) If your models are developed using Power BI Desktop and then published:

    Save .pbix files in OneDrive or SharePoint.
    Use deployment pipelines to manage and version reports.
    Write a script (e.g., using PowerShell + Power BI REST API) to export the .pbix from your local/dev environment and back it up daily.

    2) Alternative Approach:
    Prerequisites :
    • Store the original `.pbix` file in a SharePoint document library
    e.g., https://yourcompany.sharepoint.com/sites/PowerBI/Shared Documents/Master/SemanticModel.pbix
    • Create a backup folder in SharePoint
    e.g., https://yourcompany.sharepoint.com/sites/PowerBI/Shared Documents/Backups/
    • Have access to Power Automate to create and manage flows

    Steps to Create Daily PBIX Backup Flow :

    Step 1: Create Scheduled Flow
    • Open Power Automate
    • Go to Create > Scheduled cloud flow
    • Name the flow: Daily PBIX Backup
    • Set:
    - Start date and time (as per your preference)
    - Repeat every 1 day
    • Click Create

    Step 2: Get PBIX File Content
    • Click + New step
    • Action: Get file content using path (from SharePoint)
    • Configure:
    - Site Address: https://yourcompany.sharepoint.com/sites/PowerBI
    - File Path: /Shared Documents/Master/SemanticModel.pbix

    Step 3: Create Backup File
    • Click + New step
    • Action: Create file (from SharePoint)
    • Configure:
    - Site Address: Same as above
    - Folder Path: /Shared Documents/Backups/
    - File Name:
    SemanticModel_@{formatDateTime(utcNow(),'yyyy-MM-dd')}.pbix
    - File Content: Use output from previous step (Get file content)

     

    Attaching the similar link for your reference : https://community.fabric.microsoft.com/t5/Service/Backing-up-Power-BI-dataflows-as-json-file/m-p/4055781?utm_source=chatgpt.com

     

    Regards,

    Chaithanya.