I'm doing this on my Debian server:
My crontab:
Code:
# Rotate bitcoin logs
0 8 * * * /usr/sbin/logrotate --state /home/gavin/.bitcoin/logrotate.state /home/gavin/bc_logrotate.conf
My bc_logrotate.conf file:
0 8 * * * /usr/sbin/logrotate --state /home/gavin/.bitcoin/logrotate.state /home/gavin/bc_logrotate.conf
Code:
#
# Rotate the bitcoin debug.log file
#
# This should be added to crontab to be run every day:
# /usr/sbin/logrotate /path/to/bc_logrotate.conf
#
compress
copytruncate
/home/gavin/.bitcoin/debug.log {
rotate 5
}
# Rotate the bitcoin debug.log file
#
# This should be added to crontab to be run every day:
# /usr/sbin/logrotate /path/to/bc_logrotate.conf
#
compress
copytruncate
/home/gavin/.bitcoin/debug.log {
rotate 5
}