How to copy files from replicaset to localhost?

In order to use “kubectl cp” the source container needs “tar”. Seems tar is not available and to install tar is also not possible (?).

Any solutions how to do that ?

1 Like

Hi @jamoser,

Which version of mongo you’re using? PSMDB 4.0 and 5.0 images have this problem (tar does not exist) but 4.2 and 4.4 should be fine.

1 Like

I am using MongoDB Operator with MongoDB 4.4 - and there is no tar. And also it’s not possible to install it on the fly.

1 Like

Could you share the exact image you’re using? I’ll share with the build team

1 Like

crVersion: 1.11.0
image: percona/percona-server-mongodb:4.4.10-11

Thanks
John

1 Like