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

Announcements

News and Announcements icon
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 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard