binlogstreamer

command module
v0.0.0-...-e9e03f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 12 Imported by: 0

README

binlogstreamer

Tool for creating streamed binlog backup with mysqlbinlog utility

Usage

binlogstreamer [-cfg binlogstreamer.cfg]

Config file

The application uses the following config file

mysqlhost   = mysqlhost
mysqluser   = user.with.replication.client.rights
mysqlpass   = password
mysqldb     = db.to.connect
binlogdir   = /path/to/binlogs
mysqlbinlog = /path/to/mysqlbinlog
keep_days   = 0 # if zero, no binlogs will be cleaned up

How it is works

After application is started it connects to the remote mysql instance, and with

mysql> show binary logs;

gets the list of the binary logs which exists on the server. It also takes a look to the local directory where the binlogs will be kept, and compares all the locally existing binlogs with the remotely available binlogs. The script compares the filename and the file size of the logs, and if they are not the same, it will rename the local file to _incomplete. The script will invoke mysqlbinlog utility to stream the binlogs from the remote server from the first one which is not existing locally.

Documentation

Overview

+build linux darwin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL