Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Complete and packaged scripts for innobackup

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Change a few variables can be used, innobackup complete and packaging script

[root@Pro-aliyun-MySQL-transit-10.25.34.225 ~] # cat full.sh

#! / bin/bash

# centos 7.6 x86_64

# mysql 5.7.26-log

# 2019.9.16

# Version 2.4 begins to support 5.7

# https://www.percona.com/downloads/XtraBackup/

# wget-c https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/binary/redhat/6/x86_64/percona-xtrabackup-24-2.4.9-1.el6.x86_64.rpm-- no-check-certificate

# yum-y localinstall percona-xtrabackup-24-2.4.9-1.el6.x86_64.rpm

A = `date +% s`

Yum-y install perl perl-devel libaio libaio-devel perl-Time-HiRes perl-DBD-MySQL libev-devel

LOCALIP=$ (hostname-I)

MYCNF=/owhat/mysql-5.7

HOST=localhost

USER=root

PASS=amunlinux

PORT=65306

SOCK=/owhat/mysql-5.7/logs/mysql.sock

DATA=/owhat/download-data

DATE=$ (date +% Y-%m-%d)

Touch ~ / full-record- "$LOCALIP" .log

> ~ / full-record- "$LOCALIP" .log

Which innobackupex > > ~ / full-record- "$LOCALIP" .log

# / usr/bin/innobackupex\

#-defaults-file= "$MYFILEDIR"\

#-user= "$USER"\

#-port= "$PORT"\

#-host= "$HOST"\

#-password= "$PASS"\

#-parallel=32\

#-S "$SOCK"\

#-- no-timestamp "$DATA" / "$DATE" > > ~ / full-record- "$LOCALIP" .log

Sleep 3s

# > ~ / full-record- "$LOCALIP" .log

Sleep 3s

B = `date +% s`

C = `expr $b-$a`

Echo "A total of time $c s" > > ~ / full-record- "$LOCALIP" .log

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report