Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Powershell backup code and database to local and offsite

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Enable powershell execution permission

Set-ExecutionPolicy RemoteSigned

# purpose: for backing up wiki code and data # time: 2017-2-15 backup localizations backup dirt = "C:\ xampp\ htdocs\ wiki\ data\ backup\" $today=get-date-format "yyyy-M-d" new-item-path C:\ local_backup-name $today-type directorynew-item-path\ 172.16.3.35\ data backup wiki-name $today-type directorycmd / 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\ data backup wiki\ $today\

Add to scheduled task

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 255

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report