@echo off
set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
C:/HwsNginxMaster/mysql/bin/mysqldump --opt -hlocalhost -u用户名 -p密码 --default-character-set=utf8? 数据库名称 > C:\dbbackup\gcxshop_%Ymd%.sql
forfiles /p C:\dbbackup /m *.sql -d -7 /c "cmd /c del /f @path"
@echo on
原文地址:https://www.cnblogs.com/mylover2/p/11015749.html
时间: 2024-10-18 15:44:30