ubuntu安装使用mydumper
apt搜索一下
$ sudo apt search mydumper
[sudo] password for zhaoyao:
Sorting... Done
Full Text Search... Done
mydumper/focal,now 0.9.5-1.1 amd64
High-performance MySQL backup tool mydumper-doc/focal,focal 0.9.5-1.1 all
High-performance MySQL backup tool - documentation
然后安装一下
sudo apt-get install mydumper
使用说明
$ 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, --omit-from-file File containing a list of database.table entries to skip, one per line (skips before applying 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 this output file size. This value is 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
-N, --insert-ignore Dump rows with INSERT IGNORE
-m, --no-schemas Do not dump table schemas with the data
-d, --no-data Do not dump table data
-G, --triggers Dump triggers
-E, --events Dump events
-R, --routines Dump stored procedures and functions
-W, --no-views Do not dump VIEWs
-k, --no-locks Do not execute the temporary shared read lock. WARNING: This will cause inconsistent backups
--no-backup-locks Do not use Percona backup locks
--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 has data in different time zones or data is being moved between servers with different time zones, defaults to on use --skip-tz-utc 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
-U, --updated-since Use Update_time to dump only tables updated in the last U days
--trx-consistency-only Transactional consistency only
--complete-insert Use complete INSERT statements that include column names
-h, --host The host to connect to
-u, --user Username with the necessary privileges
-p, --password User password
-a, --ask-password Prompt For 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
--defaults-file Use a specific defaults file
测试一下
mydumper -u root -p 数据库密码 -h 127.0.0.1 -B test -o ~/script/mysql/
然后就有了这些文件
ll ~/script/mysql/*.sql
文件有了,一张表一个文件
相比原来 mysqldump 来说这个会稍微快些。(文件越大数据越多越明显)
以往mysqldump的使用方式
mysqldump -uroot -p test > ~/script/mysql/test.db
回车后需要输入密码,然后就会自动导出到这个test.db文件里。
ubuntu安装使用mydumper的更多相关文章
- Mac OS、Ubuntu 安装及使用 Consul
Consul 概念(摘录): Consul 是 HashiCorp 公司推出的开源工具,用于实现分布式系统的服务发现与配置.与其他分布式服务注册与发现的方案,比如 Airbnb 的 SmartStac ...
- ubuntu安装mysql
好记性不如烂笔头,记录一下,ubuntu安装mysql的指令. 安装MySQL: sudo apt-get install mysql-server sudo apt-get install mysq ...
- ubuntu安装vim时提示 没有可用的软件包 vim,但是它被其它的软件包引用了 解决办法
ubuntu安装vim时提示 没有可用的软件包 vim-gtk3,但是它被其它的软件包引用了 解决办法 本人在ubuntu系统安装vim 输入 sudo apt-get install vim 提示 ...
- docker 1.8+之后ubuntu安装指定版本docker-engine
这边记录ubuntu安装过程,首先是官网文档 If you haven’t already done so, log into your Ubuntu instance. Open a termina ...
- debian/ubuntu安装桌面环境
apt-get install xorg apt-get install gnome 然后startx ubuntu 安装Gnome桌面 1.安装全部桌面环境,其实Ubuntu系列桌面实际上有几种桌面 ...
- 一个ubuntu phper的自我修养(ubuntu安装)
ubuntu安装篇 一.ubuntu下载 到ubuntu官网下载适合自己电脑配置的系统版本,此处不做展开. 二.制作USB启动盘 在windows下制作USB启动盘,工具是universal usb ...
- ubuntu 安装JAVA jdk的两种方法:
ubuntu 安装jdk 的两种方式: 1:通过ppa(源) 方式安装. 2:通过官网下载安装包安装. 这里推荐第1种,因为可以通过 apt-get upgrade 方式方便获得jdk的升级 使用pp ...
- [其他]Ubuntu安装genymotion后unable to load VirtualBox engine
问题: Ubuntu安装genymotion后unable to load VirtualBox engine 解决办法: 如果没有安装VirtualBox,要先安装VirtualBox. 安装Vir ...
- Ubuntu安装出现左上角光标一直闪解决方式
Ubuntu安装出现左上角光标一直闪解决方式: 01下载ubunu http://cn.ubuntu.com/download/ 02.软碟通 http://pan.baidu.com/s/1qY8O ...
- ubuntu安装pip3
当初入门Linux 使用的是centos,那个时候是6.0版本,当然现在主流在使用的也是6.0系列的,现在都到6.7了,那个时候centos还是独立的,现在被redhat收购,本来一个红蓝就差不多,个 ...
随机推荐
- 运行 Java 程序
Java 程序实际上就是我们编译好的 Java 类文件.运行 Java 程序就是运行 Java 类的 main 函数. 编译并运行 Java 文件 源文件: package com.example; ...
- 安装 AWS CLI
安装 macOS 使用 Homebrew: brew install awscli 手动安装: curl "https://awscli.amazonaws.com/AWSCLIV2.pkg ...
- 005.MinIO-DirectPV分布式多租户存储部署
MinIO部署准备 部署概述 本实验结合Kubernetes进行MinIO部署,实现MinIO于Kubernetes的融合. minio官方支持通过简单的快速部署,以便于进行基础测试: curl ht ...
- 二叉树的 Morris 中序遍历——O(1)空间复杂度
回顾 问题陈述: 给定一棵二叉树,实现中序遍历并返回包含其中序序列的数组 例如给定下列二叉树: 我们按照左.根.右的顺序递归遍历二叉树,得到以下遍历: 最终中序遍历结果可以输出为: [3, 1, 9, ...
- Servlet——Request对象-请求数据&请求参数
Request 继承体系 1.Tomcat需要解析请求数据,封装为request对象,并且创建request对象传递到service方法中 2.使用request对象,查阅javaEE ...
- Nuxt Kit 中的模板处理
title: Nuxt Kit 中的模板处理 date: 2024/9/20 updated: 2024/9/20 author: cmdragon excerpt: 摘要:本文详细介绍了在Nuxt ...
- Dart 2.12 现已发布
作者 / Michael Thomsen Dart 2.12 现已发布,其中包含 健全的空安全 和 Dart FFI 的稳定版.空安全是我们最新主打的一项生产力强化功能,意在帮助您规避空值错误,以前这 ...
- SublimeText配置Markdown编辑及预览
概述 本文详细介绍了如何配置Sublime Text及相关插件,使之成为Markdown编辑器并且能够在浏览器中实现预览功能. 所需工具 Sublime Text + Package Control ...
- 【ZZ】Linux 安装 edge 浏览器
For Debain/Ubuntu/Deepin etc.## Setupcurl https://packages.microsoft.com/keys/microsoft.asc | gpg -- ...
- 71.登录失效,token过期怎么处理
1. 清除用户数据,直接跳转登录页重新登录 : 2. 短token 过期,使用 长 token 重新获取短 token ,然后重新请求 : 如果长 token 也过期了,就去重新登录获取 token ...