/var/log/atop/atop.log {
    daily
    dateext
    dateformat _%Y-%m-%d_%H-%M-%S
    maxsize 10M
    missingok
    nocompress
    nocreate
    nomail
    rotate 10
    prerotate
        # stop the service
        systemctl stop atop.service
    endscript
    postrotate
        # start atop service again
        systemctl start atop.service
    endscript
}