maxzhao

不要害怕Exception和Error

  • Home
  • About
  • Tags
  • Categories
  • Archives
  • Schedule
  • Search
  • Table of Contents
  • Overview
  1. 1. 删除 30天前的备份
赵联胜

赵联胜

小码农赵联胜的博客,从遇到Java到爱上Java,工作之余学习Java生态圈中的各种技术。
443 posts
190 categories
240 tags
友情链接
  • 我的简书
0%

Linux下MySQL自动备份

Edited on 2024-07-17 In DB

删除 30天前的备份

编辑 vim

1
2
3
4

echo '#!/bin/bash' > /opt/mysql8/dump_limit.sh
echo 'find /opt/mysql8/dump/ -type f ! -newermt "30 days ago" -delete' >> /opt/mysql8/dump_limit.sh
chmod u+x /opt/mysql8/dump_limit.sh

同样的

1
crontab -e

输入

1
0 0,12 * * * /opt/mysql8/dump_limit.sh

本文地址: https://github.com/maxzhao-it/blog/post/3ed7094534213/

# Linux
ELasticSearch使用RestAPI操作
SpringBoot使用Filter排除某个Bean
© 2024 赵联胜