Skip to content

Does not rotate logs? #192

@sv3t0sl4v

Description

@sv3t0sl4v

Using logrotate on Ubuntu this could be achieved. I noticed clickhouse-mysql does not do it by itself.

Create file /etc/logrotate.d/clickhouse-mysql and add

/path/to//your/log/from/config { 
    daily
    create 0644 root root
    rotate 7
    compress
    postrotate
        service clickhouse-mysql restart
    endscript
}

Make sure to record MySQL binlog position in a file on disk, so it can resume from where it was.
By default Ubuntu runs logrotate every day at 6:25 AM.
Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions