GreatSQL社区

搜索

reddey

关于mydumper使用的注意事项

reddey 已有 378 次阅读2024-6-12 09:47 |系统分类:运维实战

昨天晚上在翻看一本书《MYSQL DBA精英实战课》时,看到了关于mydumper的使用内容。自己就在电脑上试用一下,看看效果如何。但使用过程中,还是出了不少问题的。

mydumper -uroot -pGood@2019 -t 8 -B test -o /data/backup/mydumper/

mydumper: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory

在 百度上找了一圈,按照文章的方法试了,还是不行。系统既然提示libssl.so.10缺失,我就执行YUM吧。

无奈之下,我使用了yum install  libssl*

Last metadata expiration check: 1:38:27 ago on Tue 11 Jun 2024 06:36:01 PM CST.

Package openssl-libs-1:1.1.1k-12.el8_9.x86_64 is already installed.

Dependencies resolved.

=======================================================================================

Package             Arch    Version                              Repository      Size

=======================================================================================

Installing:

compat-openssl10    x86_64  1:1.0.2o-4.el8_6                     ol8_appstream  1.1 M

dovecot             x86_64  1:2.3.16-5.el8                       ol8_appstream  5.2 M

nss                 x86_64  3.90.0-7.el8_10                      ol8_appstream  750 k

Installing dependencies:

clucene-core        x86_64  2.3.3.4-31.20130812.e8e3d20git.el8   ol8_appstream  596 k

nspr                x86_64  4.35.0-1.el8_8                       ol8_appstream  143 k

nss-softokn         x86_64  3.90.0-7.el8_10                      ol8_appstream  1.2 M

nss-softokn-freebl  x86_64  3.90.0-7.el8_10                      ol8_appstream  375 k

nss-sysinit         x86_64  3.90.0-7.el8_10                      ol8_appstream   74 k

nss-util            x86_64  3.90.0-7.el8_10                      ol8_appstream  139 k


Transaction Summary

=======================================================================================

Install  9 Packages


Total download size: 9.6 M

Installed size: 30 M

Is this ok [y/N]: y

Downloading Packages:

(1/9): compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm      524 kB/s | 1.1 MB     00:02

(2/9): nspr-4.35.0-1.el8_8.x86_64.rpm                  510 kB/s | 143 kB     00:00

(3/9): dovecot-2.3.16-5.el8.x86_64.rpm                 1.9 MB/s | 5.2 MB     00:02

(4/9): nss-3.90.0-7.el8_10.x86_64.rpm                  2.1 MB/s | 750 kB     00:00

(5/9): nss-softokn-3.90.0-7.el8_10.x86_64.rpm          3.4 MB/s | 1.2 MB     00:00

(6/9): nss-softokn-freebl-3.90.0-7.el8_10.x86_64.rpm   1.3 MB/s | 375 kB     00:00

(7/9): nss-sysinit-3.90.0-7.el8_10.x86_64.rpm          170 kB/s |  74 kB     00:00

(8/9): nss-util-3.90.0-7.el8_10.x86_64.rpm             284 kB/s | 139 kB     00:00

(9/9): clucene-core-2.3.3.4-31.20130812.e8e3d20git.el8 153 kB/s | 596 kB     00:03

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

Total                                                  2.5 MB/s | 9.6 MB     00:03

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

 Preparing        :                                                               1/1

 Installing       : nspr-4.35.0-1.el8_8.x86_64                                    1/9

 Running scriptlet: nspr-4.35.0-1.el8_8.x86_64                                    1/9

 Installing       : nss-util-3.90.0-7.el8_10.x86_64                               2/9

 Installing       : nss-softokn-freebl-3.90.0-7.el8_10.x86_64                     3/9

 Installing       : nss-softokn-3.90.0-7.el8_10.x86_64                            4/9

 Installing       : nss-3.90.0-7.el8_10.x86_64                                    5/9

 Installing       : nss-sysinit-3.90.0-7.el8_10.x86_64                            6/9

 Installing       : clucene-core-2.3.3.4-31.20130812.e8e3d20git.el8.x86_64        7/9

 Running scriptlet: dovecot-1:2.3.16-5.el8.x86_64                                 8/9

 Installing       : dovecot-1:2.3.16-5.el8.x86_64                                 8/9

 Running scriptlet: dovecot-1:2.3.16-5.el8.x86_64                                 8/9

 Installing       : compat-openssl10-1:1.0.2o-4.el8_6.x86_64                      9/9

 Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64                      9/9

 Running scriptlet: nss-3.90.0-7.el8_10.x86_64                                    9/9

 Running scriptlet: dovecot-1:2.3.16-5.el8.x86_64                                 9/9

 Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64                      9/9

 Verifying        : clucene-core-2.3.3.4-31.20130812.e8e3d20git.el8.x86_64        1/9

 Verifying        : compat-openssl10-1:1.0.2o-4.el8_6.x86_64                      2/9

 Verifying        : dovecot-1:2.3.16-5.el8.x86_64                                 3/9

 Verifying        : nspr-4.35.0-1.el8_8.x86_64                                    4/9

 Verifying        : nss-3.90.0-7.el8_10.x86_64                                    5/9

 Verifying        : nss-softokn-3.90.0-7.el8_10.x86_64                            6/9

 Verifying        : nss-softokn-freebl-3.90.0-7.el8_10.x86_64                     7/9

 Verifying        : nss-sysinit-3.90.0-7.el8_10.x86_64                            8/9

 Verifying        : nss-util-3.90.0-7.el8_10.x86_64                               9/9


Installed:

 clucene-core-2.3.3.4-31.20130812.e8e3d20git.el8.x86_64

 compat-openssl10-1:1.0.2o-4.el8_6.x86_64

 dovecot-1:2.3.16-5.el8.x86_64

 nspr-4.35.0-1.el8_8.x86_64

 nss-3.90.0-7.el8_10.x86_64

 nss-softokn-3.90.0-7.el8_10.x86_64

 nss-softokn-freebl-3.90.0-7.el8_10.x86_64

 nss-sysinit-3.90.0-7.el8_10.x86_64

 nss-util-3.90.0-7.el8_10.x86_64

重新执行mydumper -uroot -pGood@2019 -t 8 -B test -o /data/backup/mydumper/,

mydumper -uroot -pGood@2019 -t 8 -B test -o /data/backup/mydumper/

** (mydumper:15091): CRITICAL **: 20:14:57.018: option parsing failed: Error parsing option -r, try --help

这个错误我百度了一下,发现是由参数和实际内容不能直接连接所致。那我就在两者之间加一个空格

mydumper -u root -p Good@2019 -t 8 -B test -o /data/backup/mydumper/

果然成功执行了,没有报错。备份目录下,各种备份数据都在。

接着我试一下myloader,这是用来恢复数据了。这次提前把空的还原数据库建好,参数和实际内容之间也加一个空格。

成功执行,没有报错信息。

看一下数据库还原情况。

数据库确实还原成功了。





评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-10-23 03:38 , Processed in 0.014733 second(s), 10 queries , Redis On.
返回顶部