当前位置:网站首页>Linux backup MySQL
Linux backup MySQL
2022-06-12 21:33:00 【Caozhenhua】
1) Create backup files :
cd /home/back/sql
vim mysqlbackup.sh
#!/bin/bash
date_str=$(date +%Y%m%d-%T)
mysqldump -uroot -pabc123 Platform > /home/back/auto/Platform_$date_str.sql
mysqldump -uroot -pabc123 MDM > /home/back/auto/MDM_$date_str.sql
mysqldump -uroot -pabc123 Integrate > /home/back/auto/Integrate_$date_str.sql
2) perform sh File test backup
bash mysqlbackup.sh
3) Give the script permission to execute
chmod 755 mysqlbackup.sh
4) utilize crontab Execute the above script regularly
crontab -e
5) Every day 23 Point to perform backup
0 23 * * * /home/back/sql/mysqlbackup.sh
6) see crontab list
crontab -l
边栏推荐
- 大一下学年学期总结
- Shell language
- Ubuntu16.04 completely delete MySQL database
- Graphics2D类基本使用
- NPOI 创建Word
- CVPR 2022 | 应对噪声标签,西安大略大学、字节跳动等提出对比正则化方法
- 利用ADG Standby克隆PDB
- A blog written clearly by vit
- Gather function in pytorch_
- The salted fish has been transmitted for 5W times, and the latest spring recruit face-to-face test questions of bytes have been leaked
猜你喜欢
![Fill in the checklist & lt; int> Have default values? [repeat] - fill list & lt; int> with default values? [duplicate]](/img/65/a214d137e230b1a1190feb03660f2c.jpg)
Fill in the checklist & lt; int> Have default values? [repeat] - fill list & lt; int> with default values? [duplicate]

leetcode:210. Schedule II

Graphics2D类基本使用

A high-value MySQL management tool

金融信创爆发年!袋鼠云数栈DTinsight全线产品通过信通院信创专项测试

测试基础之:单元测试

SQL调优指南笔记17:Importing and Exporting Optimizer Statistics

What's a good gift for the goddess Festival? Gift recommendation for the goddess Festival on March 8

JUC并发工具包使用指南

GNS installation and configuration
随机推荐
Module 8: Design message queue MySQL table for storing message data
The ifeq, filter and strip of makefile are easy to use
服务没有报告任何错误mysql
What's a good gift for the goddess Festival? Gift recommendation for the goddess Festival on March 8
#886 Possible Bipartition
Common error in script execution: build sh: caller: not found
利用ADG Standby克隆PDB
RestTemplate的@LoadBalance注解
Shell script Basics
leetcode:210. 課程錶 II
Cv2.lut() (populates the output array with values from the lookup table)
shell语言
好数对的求解
Lintcode:127. Topology sorting
Pixel level reconstruction and restoration technology to solve severe image blur
The year of the outbreak of financial innovation! All dtinsight products of kangaroo cloud data stack have passed the special test of Xinchuang of ICT Institute
zgc的垃圾收集的主要阶段
Solution of good number pairs
atoi超强解析
Teambition 协作应用心得分享|社区征文