Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not rotate logs? #192

Open
sv3t0sl4v opened this issue Feb 13, 2021 · 0 comments
Open

Does not rotate logs? #192

sv3t0sl4v opened this issue Feb 13, 2021 · 0 comments

Comments

@sv3t0sl4v
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant