Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 11, 2020 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/ed799dc49557cf11e75ca166839abfd9 to your computer and use it in GitHub Desktop.
Save velotiotech/ed799dc49557cf11e75ca166839abfd9 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Save marathon configs in json format for all marathon apps
# Usage : saveMarathonConfig.sh
for service in `dcos marathon app list --quiet | tr -d "/" | sort`; do
dcos marathon app show $service | jq '. | del(.tasks, .version, .versionInfo, .tasksHealthy, .tasksRunning, .tasksStaged, .tasksUnhealthy, .deployments, .executor, .lastTaskFailure, .args, .ports, .residency, .secrets, .storeUrls, .uris, .user)' >& $service.json
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment