Jump to content

Tool:Dbreps

From Wikitech

Description

dbreps is the Tools component of en:Wikipedia:Database reports.

Usage

dbreps has no interactive elements.

Administration

The Tools component requires the Python modules oursql and wikitools. To install those, use become dbreps to switch to the tool account. Download oursql and wikitools, and use python setup.py install --user to install them to the tool account's local libraries.

To install or update the Tools component, use become dbreps to switch to the tool account. Then:

cd ~/src/database-reports &&
git pull --rebase &&
python setup.py install --user --install-scripts ~/bin &&
crontab crontab.tools

Copy settings.sample to ~/.dbreps.ini and fill in the configuration. Be sure that ~/.dbreps.ini and its backup files are only readable to the tool account itself (chmod 600 ~/.dbreps.ini*).

Usually, the update is done by a script run by User:Tim Landscheidt that also updates the Toolserver component, and should not be necessary on its own.

To disable the Tools component, use sudo -u local-dbreps crontab -r to clear the crontab for the tool account. It can be recreated from crontab.tools at any time.

If reports fail, log files are created in ~/var/log. Use find ~/var/log -type f -not -empty -exec less -XF \{\} \; -exec rm -i \{\} \; to display and possibly delete them (if a log file looks unfinished, make sure the job has really terminated before deleting it).