I am quite new in docker and I don't know if this has been asked before. Is it possible to backup all docker container logs without using volumes for each container? We are using docker on a remote machine (mostly using jenkins)
Right now I am running multiple containers and multiple docker-compose on my remote machine. I want to save the logs (with a retention period of 7 days) for future use.
Is there any available images that can help me with this one? We initially use elk-stack + filebeat but they consume too much resources. Now we are just use dozzle to view logs remotely.
After some deliberation, I just did the following commands to backup my logs:
Now I am running this script via jenkins pipeline as a daily cron job