Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
2.6 GA
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
Description
The command described in our documentation 5.5 Backup procedures , i.e.:
oc cp $(oc get pods -l 'deploymentConfig=system-redis' -o json | jq '.items[0].metadata.name' -r):/var/lib/redis/data/dump.rdb ./system-redis-dump.rdb
adds also the Evicted pods. Example:
$ oc get pods -l 'deploymentConfig=system-redis' NAME READY STATUS RESTARTS AGE system-redis-1-lk2xx 0/1 Evicted 0 23d system-redis-1-xabgn 0/1 Evicted 0 1d system-redis-1-x6p32 1/1 Running 0 23h
In order to list only the running pods, the oc get pods command should include the status or use dc/dc-name, for example:
oc get pods -l 'deploymentConfig=system-redis' --field-selector status.phase=Running -o json | jq '.items[0].metadata.name' -r
The request is to update the documentation with the best approach.
NOTE: adding --field-selector status.phase=Running to any oc get pods commands in the backup/restore guide should be considered.