xtrabackup简介

xtrabackup是一个用来对mysql做备份的工具,它可以对innodb引擎的数据库做热备。xtrabackup备份和还原速度快,备份操作不会中断正在执行的事务,备份完成之后可以自动做校验,备份结果可以压缩(节省磁盘和带宽)。实际工作中可以用来做mysql的完全备份,增量备份,以及差异备份等。

xtrabackup有两个主要的工具:innobackupex和xtrabackup,xtrabackup只能备份InnoDB和XtraDB数据表,innobackupex封装了xtrabackup,可以备份MyISAM数据表。

MySQL数据库本身提供的工具并不支持真正的增量备份,二进制日志恢复是point-in-time(时间点)的恢复而不是增量备份。Xtrabackup工具支持对InnoDB存储引擎的增量备份,工作原理如下:

1.首先完成一个完全备份,并记录下此时检查点的LSN(LogSequence Number)。

2.在进程增量备份时,比较表空间中每个页的LSN是否大于上次备份时的LSN,如果是,则备份该页,同时记录当前检查点的LSN。

xtrabackup常用选项

 --incremental-basedir=name           <<仅适用于backup,增量备份目录
--incremental-dir=name <<仅适用于prepare,恢复指定目录下的.delta文件和日志文件
--apply-log <<从备份恢复。
--redo-only <<该选项强制跳过rollback阶段,只进行redo。这是有必要使用的,如果备份后,要使用增量改变的。

安装xtrabackup

 下载xtrabackup(下载二进制版本免安装)
# wget http://www.percona.com/redir/downloads/XtraBackup/XtraBackup-1.5/Linux/binary/x86_64/xtrabackup-1.5.tar.gz
# tar zxvfxtrabackup-1.5.tar.gz -C /usr/local/
源码安装过程具体参见源码目录下BUILD.txt文件。

演示:基于innobackupex做备份和恢复(完整备份)

第一步:完全备份到/ken下

[root@ken ~]# innobackupex -uroot -pxx /ken <<xx表示密码,输入你的数据库密码
xtrabackup: recognized server arguments: --datadir=/data/mysql/mysql3306/data --tmpdir=/data/mysql/mysql3306/tmp --open_files_limit= --server-id= --log_bin=/data/mysql/mysql3306/logs/mysql-bin --innodb_buffer_pool_size=100M --innodb_data_file_path=ibdata1:100M:autoextend --innodb_flush_log_at_trx_commit= --innodb_log_buffer_size=8M --innodb_log_file_size=100M --innodb_log_files_in_group= --innodb_max_dirty_pages_pct= --innodb_file_per_table= --innodb_io_capacity= --innodb_flush_method=O_DIRECT
xtrabackup: recognized client arguments: --datadir=/data/mysql/mysql3306/data --tmpdir=/data/mysql/mysql3306/tmp --open_files_limit= --server-id= --log_bin=/data/mysql/mysql3306/logs/mysql-bin --innodb_buffer_pool_size=100M --innodb_data_file_path=ibdata1:100M:autoextend --innodb_flush_log_at_trx_commit= --innodb_log_buffer_size=8M --innodb_log_file_size=100M --innodb_log_files_in_group= --innodb_max_dirty_pages_pct= --innodb_file_per_table= --innodb_io_capacity= --innodb_flush_method=O_DIRECT
:: innobackupex: Starting the backup operation IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
...
... :: Executing UNLOCK TABLES
:: All tables unlocked
:: [] Copying ib_buffer_pool to /ken/--23_04--/ib_buffer_pool
:: [] ...done
:: Backup created in directory '/ken/2018-10-23_04-51-51/'
MySQL binlog position: filename 'mysql-bin.000004', position ''
:: [] Writing /ken/--23_04--/backup-my.cnf
:: [] ...done
:: [] Writing /ken/--23_04--/xtrabackup_info
:: [] ...done
xtrabackup: Transaction log of lsn () to () was copied.
:: completed OK! <<最后出现comleted ok表示备份成功

第二步:删除mysql数据库(模拟故障)

[root@ken ~]# mysql -uroot -p     <<登录数据库
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.-log MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; <<查看现有数据库
+--------------------+
| Database |
+--------------------+
| information_schema |
| jobs |
| ke |
| mysql |
| performance_schema |
| sys |
| test |
| test5 |
+--------------------+
rows in set (0.06 sec) mysql> drop database mysql; <<删除mysql数据库
Query OK, rows affected, warnings (0.24 sec)

第三步:退出mysql并关闭mysql

[root@ken ~]# mysqladmin -uroot -p shutdown   <<关闭mysql
[root@ken ~]# ss -tnl | grep 3306 <<查看mysql进程是否关闭

第四步:整理备份数据(将备份整理就绪)

[root@ken ~]# innobackupex --apply-log /ken/--23_04--/
xtrabackup: recognized server arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:100M:autoextend --innodb_log_files_in_group= --innodb_log_file_size= --innodb_fast_checksum= --innodb_page_size= --innodb_log_block_size= --innodb_undo_directory=./ --innodb_undo_tablespaces= --server-id= --redo-log-version=
xtrabackup: recognized client arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:100M:autoextend --innodb_log_files_in_group= --innodb_log_file_size= --innodb_fast_checksum= --innodb_page_size= --innodb_log_block_size= --innodb_undo_directory=./ --innodb_undo_tablespaces= --server-id= --redo-log-version=
:: innobackupex: Starting the apply-log operation IMPORTANT: Please check that the apply-log run completes successfully.
At the end of a successful apply-log run innobackupex
prints "completed OK!".
...
...
InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
InnoDB: New log files created, LSN=
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn
InnoDB: Doing recovery: scanned up to log sequence number (%)
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: xtrabackup: Last MySQL binlog file position , file name mysql-bin.
InnoDB: Removed temporary tablespace data file: "ibtmp1"
InnoDB: Creating shared tablespace for temporary tables
InnoDB: Setting file './ibtmp1' size to MB. Physically writing the file full; Please wait ...
InnoDB: File './ibtmp1' size is now MB.
InnoDB: redo rollback segment(s) found. redo rollback segment(s) are active.
InnoDB: non-redo rollback segment(s) are active.
InnoDB: Waiting for purge to start
InnoDB: 5.7. started; log sequence number
xtrabackup: starting shutdown with innodb_fast_shutdown =
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number
:: completed OK!

第五步:确认是否可以进行恢复

[root@ken ~]# ss -tnl                        <<确保数据库已经关闭
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN *: *:*
LISTEN *: *:*
LISTEN ::: :::*
LISTEN ::: :::*
[root@ken ~]# rm -rf /data/mysql/mysql3306/data/* <<删除保存数据的目录下的全部文件(找到你自己的数据保存位置)

第六步:进行恢复

[root@ken ~]# innobackupex --copy-back /ken/--23_04--/
xtrabackup: recognized server arguments: --datadir=/data/mysql/mysql3306/data --tmpdir=/data/mysql/mysql3306/tmp --open_files_limit= --server-id= --log_bin=/data/mysql/mysql3306/logs/mysql-bin --innodb_buffer_pool_size=100M --innodb_data_file_path=ibdata1:100M:autoextend --innodb_flush_log_at_trx_commit= --innodb_log_buffer_size=8M --innodb_log_file_size=100M --innodb_log_files_in_group= --innodb_max_dirty_pages_pct= --innodb_file_per_table= --innodb_io_capacity= --innodb_flush_method=O_DIRECT
xtrabackup: recognized client arguments: --datadir=/data/mysql/mysql3306/data --tmpdir=/data/mysql/mysql3306/tmp --open_files_limit= --server-id= --log_bin=/data/mysql/mysql3306/logs/mysql-bin --innodb_buffer_pool_size=100M --innodb_data_file_path=ibdata1:100M:autoextend --innodb_flush_log_at_trx_commit= --innodb_log_buffer_size=8M --innodb_log_file_size=100M --innodb_log_files_in_group= --innodb_max_dirty_pages_pct= --innodb_file_per_table= --innodb_io_capacity= --innodb_flush_method=O_DIRECT
:: innobackupex: Starting the copy-back operation IMPORTANT: Please check that the copy-back run completes successfully.
At the end of a successful copy-back run innobackupex
prints "completed OK!".
...
...
:: [] ...done
:: [] Copying ./test5/db.opt to /data/mysql/mysql3306/data/test5/db.opt
:: [] ...done
:: [] Copying ./test5/ken.frm to /data/mysql/mysql3306/data/test5/ken.frm
:: [] ...done
:: [] Copying ./test5/ken.MYI to /data/mysql/mysql3306/data/test5/ken.MYI
:: [] ...done
:: [] Copying ./test5/ken.MYD to /data/mysql/mysql3306/data/test5/ken.MYD
:: [] ...done
:: [] Copying ./ib_buffer_pool to /data/mysql/mysql3306/data/ib_buffer_pool
:: [] ...done
:: [] Copying ./xtrabackup_info to /data/mysql/mysql3306/data/xtrabackup_info
:: [] ...done
:: [] Copying ./xtrabackup_binlog_pos_innodb to /data/mysql/mysql3306/data/xtrabackup_binlog_pos_innodb
:: [] ...done
:: [] Copying ./xtrabackup_master_key_id to /data/mysql/mysql3306/data/xtrabackup_master_key_id
:: [] ...done
:: [] Copying ./ibtmp1 to /data/mysql/mysql3306/data/ibtmp1
:: [] ...done
:: completed OK!

第七步:更改数据权限

[root@ken ~]# ls -l /data/mysql/mysql3306/data/
total
-rw-r----- root root Oct : ib_buffer_pool
-rw-r----- root root Oct : ibdata1
-rw-r----- root root Oct : ib_logfile0
-rw-r----- root root Oct : ib_logfile1
-rw-r----- root root Oct : ib_logfile2
-rw-r----- root root Oct : ibtmp1
drwxr-x--- root root Oct : jobs
drwxr-x--- root root Oct : ke
drwxr-x--- root root Oct : mysql
drwxr-x--- root root Oct : performance_schema
drwxr-x--- root root Oct : sys
drwxr-x--- root root Oct : test
drwxr-x--- root root Oct : test5
-rw-r----- root root Oct : xtrabackup_binlog_pos_innodb
-rw-r----- root root Oct : xtrabackup_info
-rw-r----- root root Oct : xtrabackup_master_key_id

可以看到下面恢复的数据文件的属主已经变成root,需要更改为mysql

[root@ken ~]# chown -R mysql.mysql /data/mysql/mysql3306/data 

第八步:启动mysql并查看mysql数据库是否已经恢复

[root@ken ~]# mysqld &                   <<启动mysql数据库
[]
[root@ken ~]# mysql -uroot -p <<登录mysql
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.-log MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; <<查看数据库
+--------------------+
| Database |
+--------------------+
| information_schema |
| jobs |
| ke |
| mysql | <<mysql数据库已经恢复
| performance_schema |
| sys |
| test |
| test5 |
+--------------------+
rows in set (0.07 sec)

演示:基于innobackupex做增量备份和恢复(增量备份)

第一步:首先做一次完全备份

[root@ken ~]# innobackupex -uroot -pxx /ken  <<xx表示你的数据库密码

第二步:创建一张表

mysql> use jobs;
Database changed
mysql> create table ken1 as select * from teachers; <<创建一张ken1的表
Query OK, rows affected (0.09 sec)
Records: Duplicates: Warnings:

第三步:做一次增量备份

[root@ken ~]# innobackupex -uroot -pxx --incremental --incremental-basedir=/ken/--23_04--/ /ken
xtrabackup: recognized server arguments: --datadir=/data/mysql/mysql3306/data --tmpdir=/data/mysql/mysql3306/tmp --open_files_limit= --server-id= --log_bin=/data/mysql/mysql3306/logs/mysql-bin --innodb_buffer_pool_size=100M --innodb_data_file_path=ibdata1:100M:autoextend --innodb_flush_log_at_trx_commit= --innodb_log_buffer_size=8M --innodb_log_file_size=100M --innodb_log_files_in_group= --innodb_max_dirty_pages_pct= --innodb_file_per_table= --innodb_io_capacity= --innodb_flush_method=O_DIRECT
xtrabackup: recognized client arguments: --datadir=/data/mysql/mysql3306/data --tmpdir=/data/mysql/mysql3306/tmp --open_files_limit= --server-id= --log_bin=/data/mysql/mysql3306/logs/mysql-bin --innodb_buffer_pool_size=100M --innodb_data_file_path=ibdata1:100M:autoextend --innodb_flush_log_at_trx_commit= --innodb_log_buffer_size=8M --innodb_log_file_size=100M --innodb_log_files_in_group= --innodb_max_dirty_pages_pct= --innodb_file_per_table= --innodb_io_capacity= --innodb_flush_method=O_DIRECT
:: innobackupex: Starting the backup operation IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
...
...
:: Executing UNLOCK TABLES
:: All tables unlocked
:: [] Copying ib_buffer_pool to /ken/--23_05--/ib_buffer_pool
:: [] ...done
:: Backup created in directory '/ken/2018-10-23_05-17-04/'
MySQL binlog position: filename 'mysql-bin.000005', position ''
:: [] Writing /ken/--23_05--/backup-my.cnf
:: [] ...done
:: [] Writing /ken/--23_05--/xtrabackup_info
:: [] ...done
xtrabackup: Transaction log of lsn () to () was copied.
:: completed OK!

第四步:删除刚才创建的表(模拟故障)

mysql> use jobs;
Database changed
mysql> drop table ken1;
Query OK, rows affected (0.03 sec)

第五步:整理完整备份

[root@ken ~]# innobackupex --apply-log --redo-only /ken/--23_04--/
xtrabackup: recognized server arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:100M:autoextend --innodb_log_files_in_group= --innodb_log_file_size= --innodb_fast_checksum= --innodb_page_size= --innodb_log_block_size= --innodb_undo_directory=./ --innodb_undo_tablespaces= --server-id= --redo-log-version=
xtrabackup: recognized client arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:100M:autoextend --innodb_log_files_in_group= --innodb_log_file_size= --innodb_fast_checksum= --innodb_page_size= --innodb_log_block_size= --innodb_undo_directory=./ --innodb_undo_tablespaces= --server-id= --redo-log-version=
:: innobackupex: Starting the apply-log operation IMPORTANT: Please check that the apply-log run completes successfully.
At the end of a successful apply-log run innobackupex
prints "completed OK!".
...
...
xtrabackup: starting shutdown with innodb_fast_shutdown =
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number
InnoDB: Number of pools:
:: completed OK!

第六步:将第一个增量备份文件合并到完全备份中

[root@ken ~]# innobackupex --apply-log --redo-only /ken/--23_04--/ --incremental-dir=/ken/--23_05--/
xtrabackup: recognized server arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:100M:autoextend --innodb_log_files_in_group= --innodb_log_file_size= --innodb_fast_checksum= --innodb_page_size= --innodb_log_block_size= --innodb_undo_directory=./ --innodb_undo_tablespaces= --server-id= --redo-log-version=
xtrabackup: recognized client arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:100M:autoextend --innodb_log_files_in_group= --innodb_log_file_size= --innodb_fast_checksum= --innodb_page_size= --innodb_log_block_size= --innodb_undo_directory=./ --innodb_undo_tablespaces= --server-id= --redo-log-version=
:: innobackupex: Starting the apply-log operation IMPORTANT: Please check that the apply-log run completes successfully.
At the end of a successful apply-log run innobackupex
prints "completed OK!".
...
...
:: [] ...done
:: [] Copying /ken/--23_05--/test5/db.opt to ./test5/db.opt
:: [] ...done
:: [] Copying /ken/--23_05--/test5/ken.frm to ./test5/ken.frm
:: [] ...done
:: [] Copying /ken/--23_05--/test5/ken.MYI to ./test5/ken.MYI
:: [] ...done
:: [] Copying /ken/--23_05--/test5/ken.MYD to ./test5/ken.MYD
:: [] ...done
:: [] Copying /ken/--23_05--//xtrabackup_binlog_info to ./xtrabackup_binlog_info
:: [] ...done
:: [] Copying /ken/--23_05--//xtrabackup_info to ./xtrabackup_info
:: [] ...done
:: completed OK!

第七步:确认是否可以进行恢复

[root@ken ~]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN *: *:*
LISTEN *: *:*
LISTEN ::: :::*
LISTEN ::: :::*
[root@ken ~]# rm -rf /data/mysql/mysql3306/data/*

第八步:数据恢复

[root@ken ~]# innobackupex --copy-back /ken/--23_04--/
xtrabackup: recognized server arguments: --datadir=/data/mysql/mysql3306/data --tmpdir=/data/mysql/mysql3306/tmp --open_files_limit= --server-id= --log_bin=/data/mysql/mysql3306/logs/mysql-bin --innodb_buffer_pool_size=100M --innodb_data_file_path=ibdata1:100M:autoextend --innodb_flush_log_at_trx_commit= --innodb_log_buffer_size=8M --innodb_log_file_size=100M --innodb_log_files_in_group= --innodb_max_dirty_pages_pct= --innodb_file_per_table= --innodb_io_capacity= --innodb_flush_method=O_DIRECT
xtrabackup: recognized client arguments: --datadir=/data/mysql/mysql3306/data --tmpdir=/data/mysql/mysql3306/tmp --open_files_limit= --server-id= --log_bin=/data/mysql/mysql3306/logs/mysql-bin --innodb_buffer_pool_size=100M --innodb_data_file_path=ibdata1:100M:autoextend --innodb_flush_log_at_trx_commit= --innodb_log_buffer_size=8M --innodb_log_file_size=100M --innodb_log_files_in_group= --innodb_max_dirty_pages_pct= --innodb_file_per_table= --innodb_io_capacity= --innodb_flush_method=O_DIRECT
:: innobackupex: Starting the copy-back operation IMPORTANT: Please check that the copy-back run completes successfully.
At the end of a successful copy-back run innobackupex
prints "completed OK!".
...
...
:: [] Copying ./test5/db.opt to /data/mysql/mysql3306/data/test5/db.opt
:: [] ...done
:: [] Copying ./test5/ken.frm to /data/mysql/mysql3306/data/test5/ken.frm
:: [] ...done
:: [] Copying ./test5/ken.MYI to /data/mysql/mysql3306/data/test5/ken.MYI
:: [] ...done
:: [] Copying ./test5/ken.MYD to /data/mysql/mysql3306/data/test5/ken.MYD
:: [] ...done
:: [] Copying ./ib_buffer_pool to /data/mysql/mysql3306/data/ib_buffer_pool
:: [] ...done
:: [] Copying ./xtrabackup_binlog_pos_innodb to /data/mysql/mysql3306/data/xtrabackup_binlog_pos_innodb
:: [] ...done
:: [] Copying ./xtrabackup_master_key_id to /data/mysql/mysql3306/data/xtrabackup_master_key_id
:: [] ...done
:: [] Copying ./ibtmp1 to /data/mysql/mysql3306/data/ibtmp1
:: [] ...done
:: [] Copying ./xtrabackup_info to /data/mysql/mysql3306/data/xtrabackup_info
:: [] ...done
:: completed OK!

第九步:数据权限修改

[root@ken ~]# chown -R mysql.mysql /data/mysql/mysql3306/data/

第十步:启动mysql并查看删除的表是否应恢复

[root@ken ~]# mysqld &
[]
[root@ken ~]# mysql -uroot -pxx
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.-log MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use jobs;
Database changed
mysql> show tables;
+----------------+
| Tables_in_jobs |
+----------------+
| classes |
| courses |
| ken |
| ken1 | <<删除的ken1表已经恢复
| ken4 |
| kenken |
| kenken1 |
| scores |
| students |

MySQL系列详解五: xtrabackup实现完全备份及增量备份详解-技术流ken的更多相关文章

  1. MySQL系列详解八:MySQL多线程复制演示-技术流ken

    前言 Mysql 采用多线程进行复制是从 Mysql 5.6 开始支持的内容,但是 5.6 版本下有缺陷,虽然支持多线程,但是每个数据库只能一个线程,也就是说如果我们只有一个数据库,则主从复制时也只有 ...

  2. Percona Xtrabackup备份mysql全库及指定数据库(完整备份与增量备份)

    原文地址:http://www.tuicool.com/articles/RZRnq2 Xtrabackup简介 Percona XtraBackup是开源免费的MySQL数据库热备份软件,它能对In ...

  3. Percona Xtrabackup备份mysql大数据库(完整备份与增量备份)

    Percona Xtrabackup备份mysql大数据库(完整备份与增量备份)     文章目录 [隐藏] Xtrabackup简介 Xtrabackup安装 Xtrabackup工具介绍 inno ...

  4. Ansible基础认识及安装使用详解(week5_day1_part1)--技术流ken

    Ansible简介 ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet.cfengine.chef.func.fabric)的优点,实现了批量系统配置.批量 ...

  5. MariaDB之基于Percona Xtrabackup备份大数据库[完整备份与增量备份]

    MariaDB之基于Percona Xtrabackup备份大数据库[完整备份与增量备份] 1.Xtrabackup的安装 percona-xtrabackup-2.2.3-4982.el6.x86_ ...

  6. 五分钟彻底学会iptables防火墙--技术流ken

    iptables简介 IPTABLES 是与最新的 3.5 版本 Linux内核集成的 IP 信息包过滤系统.如果 Linux 系统连接到因特网或 LAN.服务器或连接 LAN 和因特网的代理服务器, ...

  7. Percona备份mysql全库及指定数据库(完整备份与增量备份)

    Percona Xtrabackup备份mysql全库及指定数据库(完整备份与增量备份) Xtrabackup简介 Percona XtraBackup是开源免费的MySQL数据库热备份软件,它能对I ...

  8. MySQL/MariaDB数据库忘掉密码解决办法--技术流ken

    前言 有些时候我们常常会忘掉一些服务的密码,比如系统密码,我们可以进入救援模式进行修改密码,可参考我之前的博客<Centos7破解密码的两种方法--技术流ken>.但有些时候我们也会忘掉数 ...

  9. XtraBackup完整备份与增量备份的原理

    MySQL数据库实现备份的操作包括完整备份和增量备份等,本文我们主要介绍一下增量备份和完整备份的原理,接下来我们就一起来了解一下这部分内容. 完整备份的原理: 对于InnoDB,XtraBackup基 ...

随机推荐

  1. 初探ansible

    Ansible 基于ssh的自动化运维工具 ansible 配置文件详解 ansible.cfg 文件 文件默认放置在/etc/ansible下,ansible读取配置文件的顺序是: 当前命令执行目录 ...

  2. hive on spark 参数设置

    ; ; set spark.executor.memory=5G;

  3. UltraISO制作CentOS 7.6 U盘引导安装盘

    一.制作准备: 1.UltraISO下载安装 2.CentOS镜像文件下载(阿里镜像下载) 二.制作引导盘: 1.电脑插入U盘 2.UltraISO加载镜像文件: 文件->打开->选择对应 ...

  4. 实现一个simple 3层的神经网络

    1.基本概念 1.1softmax softmax函数:一句话概括:是logistic 函数的扩展,将一个p维的数值向量映射成为一个k维的概率值,且这k个值的和为1. 公式: 解释: 1.2 cros ...

  5. 背水一战 Windows 10 (108) - 通知(Tile): application tile 基础, secondary tile 基础

    [源码下载] 背水一战 Windows 10 (108) - 通知(Tile): application tile 基础, secondary tile 基础 作者:webabcd 介绍背水一战 Wi ...

  6. 吴恩达机器学习笔记26-样本和直观理解1(Examples and Intuitions I)

    从本质上讲,神经网络能够通过学习得出其自身的一系列特征.在普通的逻辑回归中,我们被限制为使用数据中的原始特征

  7. 微信小程序设置web-view的业务域名

    微信小程序设置web-view的业务域名 域名必备 你的域名必须要备案过 你的域名必须是https,而不能是http web-view 在小程序后台添加业务域名,只解析业务域名中的url网页地址的. ...

  8. 来啊踩fastjson打印入参导致业务跑偏的坑

    线上代码对日志的记录,重要性自不必说.但是怎样记录日志也是有讲究的! 日志可以直接在每个方法中进行日志记录,优点是想怎么记就怎么记,缺点是记日志的代码可能会超过你的业务代码,可读性急剧下降,这也是日志 ...

  9. Oracle merge合并更新函数

    本博客介绍一下Oracle merge合并函数,业务场景:新增数据的时候要先查询数据库是否已经有改数据,有数据就更新数据,没数据才新增数据,这是很常见的业务场景,如果是用Oracle数据库的话,其实直 ...

  10. editormd实现Markdown编辑器写文章功能

    想在项目里引入Markdown编辑器实现写文章功能,网上找到一款开源的插件editormd.js 介绍网站:https://pandao.github.io/editor.md/examples/in ...