您好,登錄后才能下訂單哦!
開(kāi)啟powershell執(zhí)行權(quán)限
Set-ExecutionPolicy RemoteSigned
#用途:用于備份wiki代碼和數(shù)據(jù) #時(shí)間:2017-2-15 # $local_backup_dir="C:\xampp\htdocs\wiki\data\backup\" $today=get-date -format "yyyy-M-d" new-item -path C:\local_backup -name $today -type directory new-item -path \\172.16.3.35\數(shù)據(jù)備份wiki -name $today -type directory cmd /c "C:\xampp\mysql\bin\mysqldump.exe -uroot -p123456 --databases wiki >"$local_backup_dir"wiki"$today".sql" Copy-Item -Recurse C:\xampp\htdocs\wiki C:\local_backup\$today\ Copy-Item -Recurse C:\xampp\htdocs\wiki \\172.16.3.35\數(shù)據(jù)備份wiki\$today\
添加到計(jì)劃任務(wù)
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。