Mydumper 0.6.2 installation, the DBA must have the necessary backup tools to master

Source: Internet
Author: User
Tags time zones unix domain socket

On the first day of New Year, wish all the databases are safe!


Look directly at the installation process, the lack of the package of their own see the readme installed.

[Email protected] local]# TAR-XVF mydumper-0.6.2.tar.gz

Mydumper-0.6.2/cmakelists.txt

Mydumper-0.6.2/readme

Mydumper-0.6.2/binlog.c

Mydumper-0.6.2/binlog.h

mydumper-0.6.2/cmake/

Mydumper-0.6.2/common.h

Mydumper-0.6.2/config.h.in

mydumper-0.6.2/docs/

Mydumper-0.6.2/g_unix_signal.c

Mydumper-0.6.2/g_unix_signal.h

Mydumper-0.6.2/mydumper.c

Mydumper-0.6.2/mydumper.h

Mydumper-0.6.2/myloader.c

Mydumper-0.6.2/myloader.h

Mydumper-0.6.2/server_detect.c

Mydumper-0.6.2/server_detect.h

mydumper-0.6.2/cmake/modules/

Mydumper-0.6.2/cmake/modules/cppchecktargets.cmake

Mydumper-0.6.2/cmake/modules/findglib2.cmake

Mydumper-0.6.2/cmake/modules/findmysql.cmake

Mydumper-0.6.2/cmake/modules/findpcre.cmake

Mydumper-0.6.2/cmake/modules/findsphinx.cmake

Mydumper-0.6.2/cmake/modules/findcppcheck.cmake

Mydumper-0.6.2/cmake/modules/findcppcheck.cpp

Mydumper-0.6.2/docs/cmakelists.txt

mydumper-0.6.2/docs/_build/

mydumper-0.6.2/docs/_static/

Mydumper-0.6.2/docs/authors.rst

Mydumper-0.6.2/docs/compiling.rst

Mydumper-0.6.2/docs/examples.rst

Mydumper-0.6.2/docs/files.rst

Mydumper-0.6.2/docs/index.rst

Mydumper-0.6.2/docs/mydumper_usage.rst

Mydumper-0.6.2/docs/myloader_usage.rst

Mydumper-0.6.2/docs/_build/conf.py.in

Mydumper-0.6.2/docs/_build/sources.cmake.in

[email protected] local]# LL

Total Dosage 10036

Drwxr-xr-x. 2 root root 4096 November 00:06 bin

Drwxr-xr-x. 5 root root 4096 November etc

Drwxr-xr-x. 2 root root 4096 September games

Drwxr-xr-x root root 4096 June 1 inception

Drwxr-xr-x. 2 root root 4096 September include

Drwxr-xr-x 2 root root 4096 May Lepus

Drwxr-xr-x. 2 root root 4096 September Lib

Drwxr-xr-x. 2 root root 4096 September lib64

Drwxr-xr-x. 2 root root 4096 September libexec

Drwxr-xr-x 4 root root 4096 December 22:02 mydumper-0.6.2

-rw-r--r--1 root root 40165 September 16:33 mydumper-0.6.2.tar.gz

Drwxrwxr-x 6 root root 4096 November 03:10 redis-3.0.7

-rw-r--r--1 root root 1375200 November 10:01 redis-3.0.7.tar.gz

Drwxr-xr-x. 2 root root 4096 November sbin

Drwxr-xr-x. 5 root root 4096 August 3 share

Drwxr-xr-x. 3 root root 4096 December src

[Email protected] local]# CD mydumper-0.6.2

[email protected] mydumper-0.6.2]# LL

Total dosage 140

-rw-r--r--1 root root 8171 September 6 binlog.c

-rw-r--r--1 root Root 1244 September 6 binlog.h

Drwxr-xr-x 3 root root 4096 December 22:02 CMake

-rw-r--r--1 root root 2339 September 6 CMakeLists.txt

-rw-r--r--1 root root 2081 September 6 common.h

-rw-r--r--1 root root 101 September 6 config.h.in

Drwxr-xr-x 4 root root 4096 December 22:02 docs

-rw-r--r--1 root root 3614 September 6 g_unix_signal.c

-rw-r--r--1 root root 339 September 6 g_unix_signal.h

-rw-r--r--1 root root 65450 September 6 mydumper.c

-rw-r--r--1 root root 1937 September 6 mydumper.h

-rw-r--r--1 root root 12742 September 6 myloader.c

-rw-r--r--1 root root 1284 September 6 myloader.h

-rw-r--r--1 root root 2458 September 6 README

-rw-r--r--1 root root 2021 September 6 server_detect.c

-rw-r--r--1 root root 1116 September 6 server_detect.h

[Email protected] mydumper-0.6.2]# CMake.

--The C compiler identification is GNU 4.4.7

--The CXX compiler identification is GNU 4.4.7

--Check for working C compiler:/USR/BIN/CC

--Check for working C compiler:/USR/BIN/CC--Works

--Detecting C compiler ABI Info

--Detecting C compiler ABI Info-done

--Check for working CXX compiler:/usr/bin/c++

--Check for working CXX compiler:/usr/bin/c++--Works

--Detecting CXX compiler ABI Info

--Detecting CXX compiler ABI Info-done

--Using Mysql-config:/usr/bin/mysql_config

--Found MySQL:/usr/include/mysql,/usr/lib64/libmysqlclient.so;/usr/lib64/libpthread.so;/usr/lib64/libm.so;/usr/ Lib64/librt.so;/usr/lib64/libdl.so

--Found ZLIB:/usr/lib64/libz.so (Found version "1.2.3")

--Found Pkgconfig:/usr/bin/pkg-config (Found version "0.23")

--checking for one of the modules ' glib-2.0 '

--checking for one of the modules ' gthread-2.0 '

--Checking for module ' Libpcre '

--found Libpcre, version 7.8

--Found PCRE:/usr/include


CMake Warning at Docs/cmakelists.txt:9 (message):

Unable to find Sphinx documentation generator



-- ------------------------------------------------

--Mysql_config =/usr/bin/mysql_config

--Cmake_install_prefix =/usr/local

--Build_docs = On

--With_binlog = OFF

--Run_cppcheck = OFF

--Change a values with:cmake-d<variable>=<value>

-- ------------------------------------------------

--

--Configuring done

--Generating done

--Build files has been written to:/usr/local/mydumper-0.6.2

[[email protected] mydumper-0.6.2]# make

Scanning dependencies of Target Mydumper

[25%] Building C Object CMAKEFILES/MYDUMPER.DIR/MYDUMPER.C.O

[50%] Building C Object CMAKEFILES/MYDUMPER.DIR/SERVER_DETECT.C.O

[75%] Building C Object CMAKEFILES/MYDUMPER.DIR/G_UNIX_SIGNAL.C.O

Linking C executable Mydumper

[75%] Built Target Mydumper

Scanning dependencies of Target Myloader

[100%] Building C Object CMAKEFILES/MYLOADER.DIR/MYLOADER.C.O

Linking C executable Myloader

[100%] Built Target Myloader

[[email protected] mydumper-0.6.2]# make install

[75%] Built Target Mydumper

[100%] Built Target Myloader

Install the project ...

--Install configuration: ""

--Installing:/usr/local/bin/mydumper

--Installing:/usr/local/bin/myloader

[Email protected] mydumper-0.6.2]#


[Email protected] mydumper-0.6.2]# Mydumper--help

Usage:

Mydumper [OPTION ...] multi-threaded MySQL dumping


Help Options:

-?,--help Show Help options


Application Options:

-B,--database database to dump

-T,--tables-list Comma delimited table list to dump (does not exclude regex option)

-O,--outputdir Directory to output files to

-S,--statement-size attempted size of INSERT statement in bytes, default 1000000

-R,--rows Try to split tables into chunks of this many rows. This option turns off--chunk-filesize

-F,--chunk-filesize Split tables into chunks of the this output file size. This value was in MB

-C,--compress compress output files

-E,--build-empty-files build dump files even if no data available from table

-X,--regex Regular expression for ' db.table ' matching

-I,--ignore-engines Comma delimited list of storage engines to ignore

-M,--no-schemas do not dump table schemas with the data

-K,--no-locks do not execute the temporary shared read lock. Warning:this'll cause inconsistent backups

--less-locking Minimize locking time on InnoDB tables.

-L,--long-query-guard Set long query timer in seconds, default 60

-K,--kill-long-queries kill long running queries (instead of aborting)

-D,--daemon Enable daemon mode

-I,--snapshot-interval interval between each dump snapshot (in minutes), requires--daemon, default 60

-L,--logfile Log file name to use, by default stdout is used

--TZ-UTC SET time_zone= ' +00:00 ' at top of dump to allow dumping of TIMESTAMP data when a server have DAT A in different time zones or data are being moved between servers with different time zones, defaults to on use--skip-tz-u TC to disable.

--skip-tz-utc

--use-savepoints use savepoints to reduce metadata locking issues, needs SUPER privilege

--success-on-1146 not increment error count and Warning instead of Critical in case of table doesn ' t exist

--lock-all-tables use lock TABLE for all, instead of FTWRL

-H,--host the host to connect to

-U,--user Username with privileges to run the dump

-P,--password User password

-P,--port TCP/IP port to connect to

-S,--socket UNIX domain socket file to use for connection

-T,--threads number of threads to use, default 4

-C,--compress-protocol use compression on the MySQL connection

-V,--version Show the program version and exit

-V,--verbose verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2


[Email protected] mydumper-0.6.2]# Myloader--help

Usage:

Myloader [OPTION ...] multi-threaded MySQL loader


Help Options:

-?,--help Show Help options


Application Options:

-D,--directory directory of the dump to import

-Q,--queries-per-transaction number of queries per transaction, default 1000

-O,--overwrite-tables Drop tables if they already exist

-B,--database an alternative database-to-restore into

-E,--enable-binlog enable binary logging of the restore data

-H,--host the host to connect to

-U,--user Username with privileges to run the dump

-P,--password User password

-P,--port TCP/IP port to connect to

-S,--socket UNIX domain socket file to use for connection

-T,--threads number of threads to use, default 4

-C,--compress-protocol use compression on the MySQL connection

-V,--version Show the program version and exit

-V,--verbose verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2


[Email protected] mydumper-0.6.2]#



[Email protected] db_backup]# mydumper-u root-p root-h 192.168.1.93-t 8-o/data/db_backup/fullbak_$ (date +%F)

[Email protected] db_backup]# myloader-u root-p root-h 192.168.1.93-t 8-o-D./fullbak_2016-12-29/

This article is from the "ROIDBA" blog, make sure to keep this source http://roidba.blog.51cto.com/12318731/1888005

Mydumper 0.6.2 installation, the DBA must have the necessary backup tools to master

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.