There may be situations when you need to use logrotate without having root
access to the server that you’re dealing with. In these situations you can
logrotate at a state file in your home directory.
First, create your logrotate configuration file with something like:
and then save to
~/logrotate.conf. Next, touch your state file:
and then you can run logrotate either via SSH or via cron:
/sbin/logrotate —state ~/.logrotate-state ~/.logrotate.conf
This is useful for providers that don’t give access to
but the binary is present to use.