ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

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.

 

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.

Environment

Release : 21.3

Component :

Resolution

Edit the backup-yamls.sh and change line 123 from
 
 docker run --rm -i -v ${PWD}:/workdir:z mikefarah/yq yq [email protected]
 
 to 
 
 docker run --rm -i -v ${PWD}:/workdir:z mikefarah/yq:3 yq [email protected]

Then re-run the script