Errors running backup-yamls.sh - Error: unknown command "yq" for "yq"
search cancel

Errors running backup-yamls.sh - Error: unknown command "yq" for "yq"

book

Article ID: 228120

calendar_today

Updated On:

Products

DX Operational Intelligence

Issue/Introduction

Running the backup-yamls.sh script is reporting the following error for each yaml encountered

 

Getting yaml file for deployment/doi-incidentmanagement
Error: unknown command "yq" for "yq"
Run 'yq --help' for usage.

 

Environment

Release : 21.3

Component :

Cause

The script calls the yq utility via docker but is sensitive to the version of this image that is used - it must be version 3 - the latest is now version 4 which is not compatible with the syntax in which the script currently calls it.

Resolution

Edit the backup-yamls.sh and change line 123 from
 
 docker run --rm -i -v ${PWD}:/workdir:z <name>/yq yq $@
 
 to 
 
 docker run --rm -i -v ${PWD}:/workdir:z <name>/yq:3 yq $@

Then re-run the script