zoukankan      html  css  js  c++  java
  • 17、xtrabackup 常用备份功能与选项

    并行备份

    > innobackupex -p123123 --parallel=8 /backup
    

    节流备份

    > innobackupex -p123123 --throttle=200 /backup
    

    压缩备份

    > innobackupex -p123123 --compress /backup
    > innobackupex -p123123 --compress --compress-threads=8 /backup
    > innobackupex -p123123 --parallel=8 --compress --compress-threads=8 /backup
    
    # 解压
    wget http://www.quicklz.com/qpress-11-linux-x64.tar
    
    # ls
    qpress
    # mv qpress /usr/local/bin/
    
    qpress -d test.qp ./
    for bf in `find . -iname "*.qp"`; do qpress -d $bf $(dirname $bf) && rm $bf; done
    innobackupex --decompress /backup/2013-08-01_11-24-04/
    innobackupex --parallel=4 --decompress 2017-04-11_11-50-31/
    

    流备份

    # tar格式流备份
    innobackupex -p123123 --stream=tar /backup
    
    innobackupex -p123123 --stream=tar /backup > /backup/back.tar
    tar -ixvf /backup/back.tar
    
    innobackupex -p123123 --stream=tar /backup | gzip > /backup/fullback.tar.gz
    
    innobackupex -p123123 --stream=tar /tmp | ssh root@192.168.1.120  "cat - > /backup/bak.tar"
    
    # 备份到远程主机
    - [1] 免密登录
    - [2] innobackupex -p123123 --stream=tar /tmp | ssh root@192.168.1.120  "cat - > /backup/bak.tar"
    - [3] innobackupex -p123123 --stream=tar /tmp | ssh root@192.168.1.120  "gzip > /backup/dateFullBak.tar.gz";
    
    # xbstream格式流备份
    innobackupex -p123123 --stream=xbstream ./ > /backup/fullbak.xbstream
    innobackupex -p123123 --stream=xbstream --compress ./ > /backup/fullbak.xbstream
    
    xbstream -x < bakup.xbstream
    xbstream -x -C /backup/zsythink/ < fullbak.xbstream
    
    备份到远程主机
    > innobackupex -p123123 --stream=xbstream --compress /tmp | ssh root@192.168.1.120 "xbstream -x -C /backup/datafull"
    
  • 相关阅读:
    php 创建多级文件夹
    php 格式化文件大小
    php 微信授权登录
    获取单据编号 不重复 骚
    js获取数组中的最后一个
    php截取
    循序栈
    链表
    顺序表
    halcon学习之阈值算子threshold operators
  • 原文地址:https://www.cnblogs.com/kcxg/p/10382507.html
Copyright © 2011-2022 走看看