Multiple log rotate entries in oc_jobs table

When in the process of moving my data directory and following the steps in the admin manual, I noticed that I have multiple entries for class <OC\Log\Rotate> in the oc_jobs table. Most of them with different arguments (2 are identical).

Is it safe to delete these entries from oc_jobs? The argument value for these records are old directories which are no longer in use for ownCloud.

Am I right in assuming only one record of class <OC\Log\Rotate> should exist, and that this should point to the log directory for ownCloud?

Yes, there should be only one line - as you wrote - pointing to your log file location. This is an escaped string of /path/to/your/data/dir/owncloud.log unless you had set a custom path using the logfile property in config.php, e.g.:

| id | class          | argument               |
| 18 | OC\Log\Rotate  | "\/data\/owncloud.log" |

You safely may remove other entries. When I changed the logfile property in config.php a second entry was added, so I guess this is a minor bug.

1 Like