I found some problem when I used docker exec and mysqldump in cronjob
I wanted to backup my database in container and tried this and it worked well
sudo docker exec -it --user root lemp_mariadb mysqldump -uroot -pxxxxxxx iot >/home/backup/backup_data.gz
But when I used this in crontab I got file output without anything and the file size is 0 byte
0 24 * * * docker exec -it --user root lemp_mariadb mysqldump -uroot -pxxxxxxx iot >/home/backup/backup_data.gz
What did I do wrong?