Skip to content

Instantly share code, notes, and snippets.

View dargmuesli's full-sized avatar
🎧
https://creal.jonas-thelemann.de

Jonas Thelemann dargmuesli

🎧
https://creal.jonas-thelemann.de
View GitHub Profile
@dargmuesli
dargmuesli / backup-docker-secrets.sh
Last active September 8, 2026 23:59 — forked from kwonghung-YIP/backup-docker-secrets.sh
Shell script for export all secrets defined in docker swarm
#!/bin/bash
# Dumps every swarm secret into a tar by mounting them all into a throwaway service.
# The tar holds plaintext secrets: encrypt it before moving it off this host.
set -euo pipefail
umask 077
service_name="backup-all-secrets"
out_dir="${1:-.}"
tar_file="backup_$(date +"%Y%m%d-%H%M%S").tar"