grot

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
CONFIGURATION FILES
REPORTING BUGS
DOWNLOADS
SEE ALSO
COPYRIGHT

NAME

grot − Gray’s Rotation Tool for MySQL binary logs

SYNOPSIS

grot [−vnh] [−H[NAME]] [−p[PASS]] [−P NUMBER] [−S PATH] [−u NAME]
[−−host=[NAME]] [−−password=[PASS]] [−−port=NUMBER]
[−−socket=PATH] [−−user=NAME] [−−verbose] [−−dry−run]
[−−no−flush] [−−keep=NUMBER] [−−help] [−−usage] [−−version]

DESCRIPTION

Grot rotates MySQL binary log files on replication master server. It works by first determining what slaves are connected to the server. Then it connects to each slave and determines what master log file it currently uses. Finally, it removes those logs on master that are older than the oldest of logs used by slaves.

Normally, grot is executed as a cron job. It is not necessary to run it on the master server, it may as well be run on any machine that can connect to the master SQL.

An account must be set up on master and each of the slaves for grot to operate. The account on master must have the SUPER, PROCESS and RELOAD privileges. However, the latter is not necessary if you use the −−no−flush command line option.

The slave accounts must be granted the REPLICATION CLIENT privilege.

Grot uses configuration files to obtain the connection parameters and account credentials of the master and slave servers. See below for a descripton of these.

OPTIONS

The following options modify the program’s behavior:
−v
, −−verbose

Increase verbosity level. Multiple instances of this option are allowed.

−n, −−dry−run

Do not actually rotate the logs, only print what would have been done.

−−no−flush

Do not flush logs after rotating.

−−keep=NUMBER

Keep NUMBER logs before the oldest one.

The following options set the connection and account parameters of the master server. They override the corresponding settings from the configuration files:
−H
, −−host[=NAME]

Set host name or IP address of the master MySQL server.

−p, −−password[=PASS]

Set password of the MySQL user.

−P, −−port=NUMBER

Set port number of the master MySQL server, if it differs from the default 3306.

−S, −−socket=STRING

Set socket file name.

−u, −−user=NAME

Set MySQL user name. This user must have the following privileges: PROCESS, SUPER.

Following are the informational options:
−h
, −−help

Give a concise help list.

−−usage

Give a short usage message.

−−version

Print program version.

CONFIGURATION FILES

Grot reads its configuration from the following files:
/etc/my.cnf

Default MySQL configuration file. Grot attempts to read master server configuration from sections grot and client.

/etc/grot.cnf

Site-wide grot configuration file. See grot.cfg(5).

~/.grot

Per-user configuration file. The tilde (~) here stands for the user home directory. See grot.cfg(5).

REPORTING BUGS

Report bugs to <gray@gnu.org.ua>.

DOWNLOADS

Grot is available for download from this location.

The latest version is grot-1.0.

Recent news, changes and bugfixes can be tracked from the project's development page.

SEE ALSO

grot.cfg(5).

COPYRIGHT

Copyright © 2009 Sergey Poznyakoff License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


Manpage server at Ulysses.gnu.org.ua.

Powered by mansrv 1.0