web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Automated backup for P...
Power Apps
Suggested Answer

Automated backup for Power Apps and Flows into GitHub

(0) ShareShare
ReportReport
Posted on by
I would like to have automated backups for all my Power Automate Flows and Power Apps and have them stored in GitHub. What would be the best way to accomplish this, and is there any existing documentation on the process? Thank you! 
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
     
    I suggest create a solution - add Power Automate flows, apps...
    Export the solution periodically. Use the Power Platform CLI to export the Solution - 
    pac solution export --name <solution-name> --path ./backups/solutions/<solution-name>.zip
     
    Automate the solution export using scripts or automation tools
     
    Set up a GitHub Actions workflow to run Power Platform CLI commands and push backups to the repository.
    name: Backup Power Platform Assets
    on:
      schedule:
        - cron: '0 2 * * *' # Runs daily at 2 AM UTC
    jobs:
      backup:
        runs-on: ubuntu-latest
        steps:
          - name: Checkout Repository
            uses: actions/checkout@v2
          - name: Set up Power Platform CLI
            run: |
              npm install -g pac-cli
          - name: Authenticate with Power Platform
            run: |
              pac auth create --url https://your-environment-url.crm.dynamics.com --username ${{ secrets.POWER_PLATFORM_USER }} --password ${{ secrets.POWER_PLATFORM_PASSWORD }}
          - name: Export Solutions
            run: |
              pac solution export --name <solution-name> --path ./backups/solutions/<solution-name>.zip
          - name: Commit and Push Backups
            run: |
              git add .
              git commit -m "Automated backup"
              git push
     
    Add your environment URL, username, and password as GitHub Secrets for secure authentication.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard