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

How to realize the differential backup of files in the server

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains "how to realize the differential backup of files in the server". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. let's study and learn "how to achieve differential backup of files in the server"!

Use small and powerful 7z (less than 1m) to back up differential files.

:: 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 firstif not exist\\ srvdatacn02\ d (NET USE Y:\ srvdatacn02\ d) forfiles / P Y: / M backup_srvdatacn01*diff*.zip / C "cmd / c del / Q 7NET USE f @ path" / D-7NET USE Y: / Dcall: backup "folder1", "folder2", "folder3", "folder4" "folder5": backupfor% I in (% *) do (if not exist "d:\ backup_srvdatacn01_%%~i_base.7z" (7z a "d:\ backup_srvdatacn01_%%~i_base.7z"\\ srvdatacn01\% ~ I\ *"-xrature Thumbs.db-mx9) else (7z u "d:\ backup_srvdatacn01_%%~i_base.7z"\\ srvdatacn01\% ~ I\ *"-u-- Up0q1r2x2y2z0w0! "d:\ backup_srvdatacn01_%%~i_diff_%date:/=_%_%time::=_%.7z"-xringing Thumbs.db-mx9 7z u "d:\ backup_srvdatacn01_%%~i_base.7z"\\ srvdatacn01\%% ~ I\ *"-up0q0r2x2y2z1w1-xringing Thumbs.db-mx9) goto:eof

* * forfiles needs to use drive letter mapping * *

Delete the file forfiles / P Y: / M backup_srvdatacn01*diff*.zip / C "cmd / c del / Q path f @ path" / D-7 and write the difference file to the diff package 7z u "d:\ backup_srvdatacn01_%%~i_base.7z"\ srvdatacn01\% ~ I\ *"-u-- up0q1r2x2y2z0w0! "d:\ backup_srvdatacn01_%%~i_diff_%date:/=_%_%time::= _% .7z "- xringing Thumbs.db-mx9 Update Base package 7z u" d:\ backup_srvdatacn01_%%~i_base.7z "\\ srvdatacn01\%% ~ I\ *"-up0q0r2x2y2z1w1-xringing Thumbs.db-mx9 Thank you for reading The above is the content of "how to achieve differential backup of files in the server". After the study of this article, I believe you have a deeper understanding of how to achieve differential backup of files in the server. the specific use situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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: 0

*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

Internet Technology

Wechat

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

12
Report