当前位置:网站首页>linux备份mysql
linux备份mysql
2022-06-12 21:26:00 【曹振华】
1)创建备份文件:
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)执行sh文件测试备份
bash mysqlbackup.sh
3)给脚本加执行权限
chmod 755 mysqlbackup.sh
4)利用crontab定时执行上述脚本
crontab -e
5)每天23点执行备份
0 23 * * * /home/back/sql/mysqlbackup.sh
6)查看crontab列表
crontab -l
边栏推荐
- The Post-00 financial woman with a monthly salary of 2W conquered the boss with this set of report template
- Solution of multi machine room dynamic loop status network touch screen monitoring
- Insert sort
- Rearrangement exercises
- Binary search
- Module 8: Design message queue MySQL table for storing message data
- #113 Path Sum II
- RestTemplate的@LoadBalance注解
- 初步了解认识正则表达式(Regex)
- leetcode:210. Schedule II
猜你喜欢
多机房动环状态网络触摸屏监控解决方案
Shell language
Data visualization - biaxial comparison effect
#113 Path Sum II
makefile 的ifeq,filter,strip 简单使用
lintcode:127 · 拓扑排序
测试基础之:单元测试
金融信创爆发年!袋鼠云数栈DTinsight全线产品通过信通院信创专项测试
Design and practice of Hudi bucket index in byte skipping
GPU giant NVIDIA suffered a "devastating" network attack, and the number one malware shut down its botnet infrastructure | global network security hotspot on February 28
随机推荐
torch. clamp_ min_ method
Data visualization - histogram
To delete a character from a string
Binary search
The salted fish has been transmitted for 5W times, and the latest spring recruit face-to-face test questions of bytes have been leaked
Solution of good number pairs
Lombok package is successfully installed, but the runtime prompts that get, set method and constructor solution cannot be found
Scatter in pytorch_ () function
Simple understanding of cap and base theory
test
模块八:设计消息队列存储消息数据的MySQL表
shell语言
Pixel level reconstruction and restoration technology to solve severe image blur
实现从字符串中删除某个字符操作
同花顺能开户吗,在APP上可以直接开通券商安全吗 ,证券开户怎么开户流程
Data visualization - biaxial comparison effect
字符串基础知识
Preliminary understanding of regular expressions (regex)
(4) Pyqt designs and implements the [factory production management system] order page - add, delete, modify and query (including source code analysis)
ZGC concurrent identity and multi view address mapping in concurrent transition phase