In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Hot backup
1 xtrabackup download
Wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/binary/tarball/percona-xtrabackup-2.4.9-Linux-x86_64.tar.gz[root@Master_test ~] # lltotal 88192 RWMI. 1 root root 1201 Feb 16 2017 anaconda-ks.cfg-rw-r--r--. 1 root root 9913 Feb 16 2017 install.log-rw-r--r--. 1 root root 3161 Feb 16 2017 install.log.syslog-rw-r--r--. 1 root root 90282874 Nov 23 2017 percona-xtrabackup-2.4.9-Linux-x86_64.tar.gz
2 directory structure
[root@Master_test bin] # lltotal 212008lrwxrwxrwx. 1 root root 10 Jul 6 23:21 innobackupex-> xtrabackup-rwxr-xr-x. 1 root root 5357661 Nov 23 2017 xbcloud-rwxr-xr-x. 1 root root 3020 Nov 23 2017 xbcloud_osenv-rwxr-xr-x. 1 root root 5270021 Nov 23 2017 xbcrypt-rwxr-xr-x. 1 root root 5344286 Nov 23 2017 xbstream-rwxr-xr-x. 1 root root 201111701 Nov 23 2017 xtrabackup [root @ Master_test bin] # pwd/root/percona-xtrabackup-2.4.9-Linux-x86_64/ bin [root @ Master_test bin] #
Description:
Innobackupex is the backup tool to be used
Xtrabackup is encapsulated in innobackupex, which the innobackupex runtime needs to call.
3 create test database and table
Root@Master 23:59: [(none)] > create database db1;Query OK, 1 row affected (0.08 sec) root@Master 23:59: [(none)] > use db1Database changedroot@Master 23:59: [db1] > root@Master 23:59: [db1] > create table T1 (id int,name varchar (20)); Query OK, 0 rows affected (0.08 sec) root@Master 00:00: [db1] > desc T1 +-+ | Field | Type | Null | Key | Default | Extra | +-+- -+ | id | int (11) | YES | | NULL | name | varchar (20) | YES | | NULL | | +-+-+ root@Master 00:00: [db1] > root@Master 00:00: [db1] > insert into T1 (id) Name) values (1meme Zhangsan') Query OK, 1 row affected (0.00 sec) root@Master 00:01: [db1] > insert into T1 (id, name) values; Query OK, 1 row affected (0.00 sec) root@Master 00:01: [db1] > insert into T1 (id, name) values; Query OK, 1 row affected (0.00 sec) root@Master 00:01: [db1] > select * from T1 +-+-+ | id | name | +-+-+ | 1 | zhangsan | | 2 | lisi | | 3 | wangwu | +-+-+ 3 rows in set (0.00 sec)
4 full backup
1) execute error report
[root@Master_test bin] # / innobackupex-- user=root-- password-root-- defaults-file=/etc/my.cnf / bak./innobackupex: / usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by. / innobackupex)'
2) resolve errors
The reason for this error is that there is no GLIBCXX_3.4.15 in the current version of GCC, so you need to install a later version
[root@Master_test bin] # strings / usr/lib64/libstdc++.so.6 | grep GLIBCXXGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_FORCE_NEWGLIBCXX_DEBUG_MESSAGE_LENGTH
We can see that there is no GLIBCXX_3.4.15.
3) download libstdc
New version, address:
32bit
Http://ftp.de.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6_4.7.2-5_i386.deb
64bit
Http://ftp.de.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb
4) install libstdc
[root@Master_test ~] # wget http://ftp.de.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb decompress: [root@Master_test ~] # ar-x libstdc++6_4.7.2-5_amd64.deb & & tar xvf data.tar.gz./usr/./usr/share/./usr/share/doc/./usr/lib/./usr/lib/x86_64 -linux-gnu/./usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17./usr/share/doc/libstdc++6./usr/lib/x86_64-linux-gnu/libstdc++.so.6
5) installation steps
Cut to the solved directory, copy the libstdc++.so.6.0.17 to the system's / usr/lib64, then delete the original libstdc++.so.6, and soft link the libstdc++.so.6.0.17 to libstdc++.so.6.
Cd / root/usr/lib/x86_64-linux- Gnu[ root @ Master_test x86_64-linux-gnu] # lltotal 972lrwxrwxrwx. 1 root root 19 Jul 7 01:18 libstdc++.so.6-> libstdc++.so.6.0.17-rw-r--r--. 1 root root 991600 Jan 7 2013 libstdc++.so.6.0.17cp libstdc++.so.6.0.17 / usr/lib64cd / usr/lib64rm libstdc++.so.6ln libstdc++.so.6.0.17 libstdc++.so.6 check [root@Master_test x86_64-linux-gnu] # strings / usr/lib64/libstdc++.so.6 | grep GLIBCXX GLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX _ 3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_3.4.14GLIBCXX_3.4.15GLIBCXX_3.4.16GLIBCXX_3.4.17GLIBCXX_DEBUG_MESSAGE_LENGTH already has GLIBCXX_3.4.15.
5 perform full backup
-- user: the user name that connects to the database
-- password: password to connect to the data
-- defaults-file: configuration file (must be placed first, otherwise an error will be reported)
/ bak: location of the backup file
[root@Master_test bin] #. / innobackupex-defaults-file=/etc/my.cnf-user=root-password=root / bak180707 01:28:04 innobackupex: Starting the backup operationIMPORTANT: Please check that the backup run completes successfully. At the end of a successful backup run innobackupex prints "completed OK!". 180707 01:28:04 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;port=3306 Mysql_socket=/tmp/mysql.sock' as' root' (using password: YES). Failed to connect to MySQL server as DBD::mysql module is not installed at-line 1327.180707 01:28:04 Connecting to MySQL server host: localhost, user: root, password: set, port: 3306 Socket: / tmp/mysql.sockUsing server version 5.7.22-log./innobackupex version 2.4.9 based on MySQL server 5.7.13 Linux (x86: 64) (revision id: a467167cdd4) xtrabackup: uses posix_fadvise () .xtrabackup: cd to / data/mysql/mysql3306/dataxtrabackup: open files limit requested 65535 Set to 65535xtrabackup: using the following InnoDB configuration:xtrabackup: innodb_data_home_dir = .xtrabackup: innodb_data_file_path = ibdata1:1G:autoextendxtrabackup: innodb_log_group_home_dir =. / xtrabackup: innodb_log_files_in_group = 2xtrabackup: innodb_log_file_size = 1073741824xtrabackup: using O_DIRECTInnoDB: Number of pools: 1180707 01:28:05 > > log scanned up to (2597729) xtrabackup: Generating a list of tablespacesInnoDB: Allocated tablespace ID 24 for db1/t1 Old maximum was 0180707 01:28:05 [01] Copying. / ibdata1 to / bak/2018-07-07 July 01-28-04/ibdata1180707 01:28:06 > > log scanned up to (2597729) 180707 01:28:07 > > log scanned up to (2597729) 180707 01:28:08 > > log scanned up to (2597729) omitting intermediate information * * * 180707 01:28:45 [01] Copying. / sys/statements_with_sorting.frm to / bak/2018-07-07 July 01-28-04/sys/statements_with_sorting.frm180707 01:28:45 [01]... done180707 01:28:45 [01] Copying. / sys/x@0024ps_digest_95th_percentile_by_avg_us.frm to / bak / 2018-07-07 October 01-28-04/sys/x@0024ps_digest_95th_percentile_by_avg_us.frm180707 01:28:45 [01]... done180707 01:28:45 > > log scanned up to (2597729) 180707 01:28:45 [01] Copying. / sys/x@0024wait_classes_global_by_avg_latency.frm to / bak/2018-07-07 hours 01-28-04 Universe SysUnike Xerox 0024 waitworthy classeship globalized classesglobalizations by default avg _ Latency.frm180707 01:28:45 [01]... done180707 01:28:45 Finished backing up non-InnoDB tables and files180707 01:28:45 [00] Writing / bak/2018-07-07 July 01-28-04/xtrabackup_binlog_info180707 01:28:45 [00]... done180707 01:28:45 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...xtrabackup: The latest check point (for incremental): '2597720'xtrabackup: Stopping log copying thread.. 180707 01:28:45 > > log scanned up to (2597729) 180707 01:28:46 Executing UNLOCK TABLES180707 01:28:46 All tables unlocked180707 01:28:46 [00] Copying ib_buffer_pool to / bak/2018-07-07 hours 01-28-04/ib_buffer_pool180707 01:28:46 [00]... done180707 01:28:46 Backup created in directory'/ bak/2018-07-07 minutes 01-28-04/'MySQL binlog position: filename 'mybinlog.000003' Position '1311' GTID of the last change 'fe259816-8122-11e8-ab02-000c29fa3266:1-6 hours 180707 01:28:46 [00] Writing / bak/2018-07-07 July 01-28-04/backup-my.cnf180707 01:28:46 [00]... done180707 01:28:46 [00] Writing / bak/2018-07-07 hours 01-28-04/xtrabackup_info180707 01:28:46 [00]... donextrabackup: Transaction log of lsn (2597720) to (2597729) ) was copied.180707 01:28:46 completed OK!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.