TIL Series #1 – Anacron Tutorial

TIL Series #1 – Anacron Tutorial

Back-story: My dad usually asks us to send the public IP (Home network) to him daily (don’t ask me why) and like always I usually forget to and it occurred to me I could just set up a script to do that.

So while looking cron up, I wondered what would happen if my system was down and it missed it’s scheduled job. Looked  it up and I found that cron does not run said job at boot up. This is where Anacron comes in. Unfortunately you can only run it once a day. But that was good enough for what I wanted to do.

TL;DR Version:

  1. Open /etc/anacrontab
  2. Say I want to run everyday then the entry would be  1       5       dad.daily       /bin/sh /home/anna/
    The first column is for the frequency of execution of the job, the second is for the delay before the job begins, the third column is the name you assign to the job and the fourth column is for the command to be executed.


Blueprint update – Configuration Groups

So work on the blueprint has been kind of slow lately since I had to disappear for a while.

Some things brought up in the last blueprint meeting dealt with:

  • Using Configuration Groups API to control logging
  • Alternative to os.stat to find the log’s modification time
  • Log Encryption
  • How would this exactly work for a cluster
  • Who has access to the logs – Since there would be no way to block the admin from accessing them from the Swift container but we can block unauthorized users using a Swift ACL

Configuration Groups:

A configuration group is a collection of settings that can be saved and applied to one or more instances in Cloud Databases.

And a single setting or option for that datastore is known as a parameter.

A few of the log related parameters are:


slow_query_log – Enable or disable slow query log

general_log – Enable or disable general log

log_error – Set the location of the error log

log_warnings – Enable or disable writing additional warning messages to the error log

log_bin – Binary logs

Some of these variables are static so a restart is required before the changes can take effect.

But of course this only works if the datastore supports configuration groups, have to figure out something else for the ones that don’t.



Update: Save yourself the trouble and set it up in Arch or Fedora

© 2018 Anna Philips

Theme by Anders NorénUp ↑