New to Kestra?
Use blueprints to kickstart your first workflows.
Back up Kestra flows to GitHub on a daily schedule with the Git plugin. Push versioned YAML snapshots with timestamped commits for recovery and audit.
Back up every Kestra flow in a namespace to a GitHub repository automatically, on a daily schedule, with full version control. This blueprint exports your flows as YAML, commits them with a timestamped message, and pushes them to a Git branch so that every change is tracked, recoverable, and auditable. It solves the problem of flows living only inside the Kestra instance: with GitOps backups, a deleted or broken flow can be restored from history in seconds, and reviewers can diff changes commit by commit.
io.kestra.plugin.core.trigger.Schedule trigger named daily_backup fires every day at
02:00 UTC using the cron expression 0 2 * * *.push_flows task (io.kestra.plugin.git.PushFlows) reads all flows from the namespace
given in the source_namespace input and pushes them to the main branch of the repository
at url.includeChildNamespaces is set to true, so flows in nested namespaces are backed up too.git_directory input, and each
run stamps a commit message with the current date and time via commitMessage and
now() | date('yyyy-MM-dd HH:mm').authorName and authorEmail so the backup history is
clearly identified.Git itself has no scheduler and no concept of your live orchestration state. Kestra closes that gap: a declarative YAML flow exports the running flows from the instance, pushes them on an event or cron trigger, retries on transient Git or network failures, and records full execution lineage for each backup. You get an auditable, observable backup pipeline instead of a fragile cron job and a shell script.
main branch and write access.GITHUB_REPO_URL: the HTTPS clone URL of the target repository.GITHUB_USERNAME: the GitHub username used to authenticate.GITHUB_TOKEN: a personal access token with write permission to the repository.GITHUB_AUTHOR_EMAIL: the email used to attribute backup commits.source_namespace to the namespace you want to back up.git_directory to control where flows land in the repository.errors block or a Slack notification task to alert on failed backups.main to snapshot dev, staging, and prod separately.io.kestra.plugin.git.SyncFlows to
restore flows from the repository back into Kestra.