New to Kestra?
Use blueprints to kickstart your first workflows.
Automatically export all Kestra namespaces, flows, files, and KV pairs to GitLab on a schedule, then cut releases and open merge requests for GitOps backup.
Treat Git as the single source of truth for your entire Kestra instance. This blueprint discovers every namespace, then exports its flows, namespace files, and key-value (KV) store entries into a GitLab repository on a recurring schedule. It solves a real operational gap: Kestra resources created or edited through the UI and API live in the platform's database, so without a versioned export you have no audit trail, no peer-reviewable history, and no clean disaster-recovery path. With this flow, every namespace lands in Git as structured, diffable files, and stable states can be promoted through GitLab releases and merge requests.
get_namespaces task runs a io.kestra.plugin.core.flow.Subflow (get-all-namespaces) to enumerate every namespace dynamically.for_each_namespace, a io.kestra.plugin.core.flow.ForEach with concurrencyLimit: 1, iterates over each namespace and runs a Parallel block per namespace.kv_storing branch calls the Kestra API via io.kestra.plugin.core.http.Request to list KV keys (get_keys) and fetch each value (retrieve_values).pushes branch commits resources to GitLab: push_files (io.kestra.plugin.git.PushNamespaceFiles) under _files/<namespace> and push_flows (io.kestra.plugin.git.PushFlows) under _flows/<namespace>.set_wd (WorkingDirectory) assembles a kvStore.json from the retrieved KV pairs and stages it with io.kestra.plugin.core.namespace.UploadFiles.push_kv commits the KV export with another PushNamespaceFiles, then delete_stored_kv (DeleteFiles) cleans up the temporary namespace files.make_new_release is set, make_release POSTs to the GitLab Releases API; when release_name equals Latest, create_pull_request opens a merge request from the kestra branch into main.weekly_saves io.kestra.plugin.core.trigger.Schedule trigger runs the whole export on cron 0 0 7,14,21,28 * *.main.GitLab can store and review your exports, but its own CI scheduler cannot reach into Kestra to enumerate namespaces, read the KV store, and serialize flows. Kestra drives that export end to end: event-aware Schedule triggers, automatic retries on transient API or Git failures, full execution lineage across the parallel and per-namespace branches, and everything declared in version-controlled YAML. You get the backup orchestration GitLab pipelines cannot express on their own.
kestra_local_uri).your_git_repository) and project ID (your_project_id).get-all-namespaces subflow available in your namespace.GITLAB_API_TOKEN: authenticates the Git pushes, releases, and merge requests.KESTRA_API_TOKEN: authorizes the Kestra API calls that list and read KV pairs.GITLAB_API_TOKEN and KESTRA_API_TOKEN secrets.your_git_repository, kestra_local_uri, and your_project_id variables.get-all-namespaces subflow exists.make_new_release set to false to validate the export.weekly_saves schedule take over, or trigger releases as needed.weekly_saves cron for daily or nightly backups.ForEach values.