I had to, so I removed a service with docker service rm but I forgot to get the log files of the service. Now I am not able to find those. Can anyone help me or suggest to me if and how can I get those log files. I was using json-files driver for logging via yml.
1 Answer
There's no special feature to undelete files on the host provided by docker. So if you delete your files using docker, you are left with the same option as when you delete on Linux without using docker:
- Learn from your mistake and don't do it again (I'd recommend forwarding logs to an external log aggregator).
- Restore from backup.
- Do a forensic recovery of the hard drive contents.
/var/lib/docker/
), then using some recovery tools likeundelete
to restore them.