這篇文章主要講解了“怎么實(shí)現(xiàn)服務(wù)器中的文件差異備份”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“怎么實(shí)現(xiàn)服務(wù)器中的文件差異備份”吧!
10年積累的網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站制作經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶(hù)對(duì)網(wǎng)站的新想法和需求。提供各種問(wèn)題對(duì)應(yīng)的解決方案。讓選擇我們的客戶(hù)得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先建設(shè)網(wǎng)站后付款的網(wǎng)站建設(shè)流程,更有陜西免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
使用小巧強(qiáng)大的7z(不到1M),實(shí)現(xiàn)差異文件備份.
::This script backup the data from srvdatacn01 ::It's an ancremental backups tools, One base file and diff files for each day. ::The files be deleted at srvdatacn01 are still keep saved at archived diff files, until them be deleted. ::Make sure you DateTime format is "yyyy-mm-dd", which could be use as one filenme(exclude / \ * :) ::Add C:\Program Files\7-Zip\ to environment variables path :: Delete the diff archive files which over 7 days :: Command forfiles doesn't support UNC path, so need map the path to driver first if not exist \\srvdatacn02\d ( NET USE Y: \\srvdatacn02\d ) forfiles /P Y: /M backup_srvdatacn01*diff*.zip /C "cmd /c del /q/f @path" /D -7 NET USE Y: /D call :backup "folder1","folder2","folder3","folder4","folder5" :backup for %%i in (%*) do ( if not exist "d:\backup_srvdatacn01_%%~i_base.7z" ( 7z a "d:\backup_srvdatacn01_%%~i_base.7z" "\\srvdatacn01\%%~i\*" -xr!Thumbs.db -mx9 ) else ( 7z u "d:\backup_srvdatacn01_%%~i_base.7z" "\\srvdatacn01\%%~i\*" -u- -up0q1r2x2y2z0w0!"d:\backup_srvdatacn01_%%~i_diff_%date:/=_%_%time::=_%.7z" -xr!Thumbs.db -mx9 7z u "d:\backup_srvdatacn01_%%~i_base.7z" "\\srvdatacn01\%%~i\*" -up0q0r2x2y2z1w1 -xr!Thumbs.db -mx9 ) ) goto:eof
** forfiles 需要使用盤(pán)符映射**
forfiles /P Y: /M backup_srvdatacn01*diff*.zip /C "cmd /c del /q/f @path" /D -7
7z u "d:\backup_srvdatacn01_%%~i_base.7z" "\\srvdatacn01\%%~i\*" -u- -up0q1r2x2y2z0w0!"d:\backup_srvdatacn01_%%~i_diff_%date:/=_%_%time::=_%.7z" -xr!Thumbs.db -mx9
7z u "d:\backup_srvdatacn01_%%~i_base.7z" "\\srvdatacn01\%%~i\*" -up0q0r2x2y2z1w1 -xr!Thumbs.db -mx9
感謝各位的閱讀,以上就是“怎么實(shí)現(xiàn)服務(wù)器中的文件差異備份”的內(nèi)容了,經(jīng)過(guò)本文的學(xué)習(xí)后,相信大家對(duì)怎么實(shí)現(xiàn)服務(wù)器中的文件差異備份這一問(wèn)題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!
當(dāng)前題目:怎么實(shí)現(xiàn)服務(wù)器中的文件差異備份
文章網(wǎng)址:http://jinyejixie.com/article30/peoepo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計(jì)、品牌網(wǎng)站建設(shè)、自適應(yīng)網(wǎng)站、網(wǎng)站建設(shè)、關(guān)鍵詞優(yōu)化、小程序開(kāi)發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容