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

What is the method of ManagerDB backup file management and remote backup

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "what is the method of ManagerDB backup file management and remote backup". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

ManagerDB backup file management, and remote backup

1.ManagerDB automatically executes exec ManagerDB.dbo. [del _ bak] backup DB

2.window Automation Task E:\ mang\ Backup.bat compressed files, transferred to the backup server

The file E:\ mang\ Backup.bat contains the following:

Rar a-k-r-s-m3 D:\ WinRARDB\% date:~0,4%%date:~5,2%%date:~8,2% D:\ bak

Copy D:\ WinRARDB\% date:~0,4%%date:~5,2%%date:~8,2%.rar Z:\

Note: Z:\ is a network drive.

3.ManagerDB automatically performs exec ManagerDB.dbo.del_historyfile deletion of historical backup files

The related scripts for ManagerDB.dbo.del_historyfile are as follows:

Declare @ del_date varchar

Set @ del_date=left (convert (nvarchar,dateadd (DD,1,getdate ()), 120,10) + 'T'+convert (nvarchar,dateadd (HH,0,getdate ()), 108)

EXECUTE master.dbo.xp_delete_file 0dNumberD:\ bak',N'bak',@del_date

4.window Automation Task E:\ mang\ delData\ Del_History_files.vbs delete expired compressed files

The file E:\ mang\ delData\ Del_History_files.vbs is as follows:

DIM strDate

DIM strDatestringOld

DIM strPath

DIM fs

StrDate = Date-3

StrDatestringOld=Year (strDate) & Right ("0" & Month (strDate), 2) & Right ("0" & Day (strDate), 2) & ".rar"

StrPath = "E:\ rard\" & strDatestringOld

Fs = createobject ("scripting.filesystemobject")

If fs.fileExists (strPath) Then

Fs.DeleteFile (strPath)

End If

After note:winrar installation, you cannot use the rar command directly in the cmd window. You can only use it directly after adding environment variables.

This is the end of the content of "what is the method of ManagerDB backup file management and remote backup". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Database

Wechat

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

12
Report