Skip to content

Instantly share code, notes, and snippets.

@hunzo
Last active May 6, 2025 08:21
Show Gist options
  • Save hunzo/69fb3060b67993c8721856f2394ee691 to your computer and use it in GitHub Desktop.
Save hunzo/69fb3060b67993c8721856f2394ee691 to your computer and use it in GitHub Desktop.
backup and restore kong
#/bin/bash
# Install decK
curl -sL https://github.com/kong/deck/releases/download/v1.47.0/deck_1.47.0_linux_amd64.tar.gz -o deck.tar.gz
tar -xf deck.tar.gz -C /tmp
sudo cp /tmp/deck /usr/local/bin/
export KONG_ADMIN_URL=http://localhost:8001
# backup
# deck gateway dump -o backup-file.yaml
# restore
# deck gateway sync backup-file.yaml
# Check Docker Network
# docker network ls
# restore decK docker
# docker run --rm -v .:/files -w /files -e DECK_KONG_ADDR=http://kong-gateway:8001 --network kong_kong-net kong/deck gateway sync backup-kong-20250506.yaml
# backup decK docker
# docker run --rm -v .:/files -w /files -e DECK_KONG_ADDR=http://kong-gateway:8001 --network kong_kong-net kong/deck gateway dump -o backup-kong.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment