You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.1 KiB
2.1 KiB
【Navicat】定时清除数据库备份,并保留最近7天
黄海整理
1. 打开任务计划程序
此电脑---右键-管理----弹出如下界面
- Step3 创建脚本,并设置
脚本文件 delte_bak.bat
注意:路径不能包含中文否则会报错。
forfiles /p "C:\Users\Administrator\Documents\Navicat\PostgreSQL\Servers\10.10.14.14\gtzz_base_db\public" /m *.nb3 /d -7 /c "cmd /c del @path"
CHOICE /T 7 /C ync /CS /D y /n
exit
2. 测试
测试任务效果,右键点击运行看结果(立即运行)
ERROR: No files found with the specified search criteria. 表示没有要清理的文件(因为作者这里已经清理过)