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

Option to add files to the statefile without force #57

Open
sastorsl opened this issue Sep 8, 2016 · 1 comment
Open

Option to add files to the statefile without force #57

sastorsl opened this issue Sep 8, 2016 · 1 comment
Labels

Comments

@sastorsl
Copy link

sastorsl commented Sep 8, 2016

There should be an option to add files to the state file without running force / actually rotation.

This would help when preparing log rotation during daytime, without having to do a rotate at once.

  1. Edit config file
  2. Run "logrotate --update-state-file -f my-logrotate.cfg"
  3. Files will be rotated the next time logrotate runs at night.
@kdudka
Copy link
Member

kdudka commented Sep 8, 2016

It sounds useful. The example is slightly confusing though. --update-state-file is something that one would expect from logrotate to do by default. Should we name it --update-state-file-only instead?

Why are you using -f together with --update-state-file? -f tells logrotate to force the rotation whereas --update-state-file should tell logrotate to skip any rotations. Am I missing anything?

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

No branches or pull requests

2 participants