How to take Kafka topics backup into a text file

Hi All,

I’m running Kafka broker in docker container using rancher stack, Each Kafka topic Backup maintaining 7days but every time I use the consumer command to see the Backup (Consuming data)

I want to store each data in Kafka topic in a text file and maintained like a log file in streaming of data.

I even tried connect-file-sink properties, it is not working for me.

Can anyone help me?