Ubuntu – Daily compress log files not working

cronlogginglogrotate

This is the log file I am using to compress log files on a daily basis.

/home/ubuntu/logs/server.log {
    daily
    missingok
    rotate 1
    compress
    create
    dateext
    dateyesterday
    dateformat .%Y-%m-%d
    extension .gz
    postrotate
        mv /home/ubuntu/logs/*.gz /home/ubuntu/zip/
    endscript
}

When I run with the --force option, I don't see the zipped file. I can see only the date extension applied to the file. Here is the result of running the command

logrotate /home/ubuntu/conf/logrotate.conf --state /home/ubuntu/conf/logrotate.state --verbose --force

Result:

rotating pattern: /home/ubuntu/logs/server.log  forced from command line (1 rotations)
empty log files are rotated, old logs are removed
considering log /home/ubuntu/logs/server.log
  log needs rotating
rotating log /home/ubuntu/logs/server.log, log->rotateCount is 1
Converted ' .%Y-%m-%d' -> '.%Y-%m-%d'
dateext suffix '.2018-03-04'
glob pattern '.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]'
glob finding old rotated logs failed
renaming /home/ubuntu/logs/server.log to /home/ubuntu/logs/server.log.2018-03-04
creating new /home/ubuntu/logs/server.log mode = 0664 uid = 1000 gid = 1000
running postrotate script
mv: cannot stat '/home/ubuntu/logs/*.gz': No such file or directory
error: error running non-shared postrotate script for /home/ubuntu/logs/server.log of '/home/ubuntu/logs/server.log '

How do I ensure that the log file created yesterday is zipped off and a new, empty one is created for today?