ESCAP On Premise System Automatically DELETE DB Backup from the server to get FREE spaces

ESCAP On Premise System Automatically DELETE DB Backup from the server to get FREE spaces

This can be done simply by deleting the backup file from the server folder. 

However, need attention, do not delete all the backup, just keep recent day or week backup for future needs.

Also can make this happen automatically by running a script file as below & once the system creates a backup after a decided duration system can automatically delete it. The way how to do that is below. 

Just run the VB script file as in below. 

const strBackupFolder = "H:\ESCAP-Backup" ' directory to delete files from
const intDaysOld = 30     ' files 30 days or older will be deleted
Main
Sub Main
' main function - don't change this
Dim Fso
Set Fso = CreateObject("Scripting.FileSystemObject")
Dim Folder
Set Folder = Fso.GetFolder(strBackupFolder)
Dim Files
Set Files = Folder.files
Dim File
Dim FileDateTime
For Each File In Files
FileDateTime = File.DateLastModified
If DateDiff("D", FileDateTime, Date) >= intDaysOld THEN
'msgbox "Will Delete this file: " & file.name
File.Delete
End If
Next
Set Fso = Nothing
End Sub

The script will delete files that are older than 30 days. 

    • Related Articles

    • ESCAP On Premise System Automatically Create DB Backup in the server

      Every day any moment/s can get the backup. just want schedule a task in windows. In the schedule task create a batch file to run following SQL script. sqlcmd -S "Server Name" -i E:\ESCAP-Config\ESCAP_Create_Backup.sql SQL Script DECLARE @BackupFile ...
    • General - Notes for ESCAP server OS upgrade

      Here are the things to do before and after the server OS upgrade:       1. Before OS upgrade, you need to back up the ESCAP data, ESCAP package and license.       2. After OS upgrade, re install SQL server, restore the data of ESCAP, and re-install ...
    • Sidekick and Escap Technical Requirements

      Overview Q2 Solutions software solutions are cloud applications running on Amazon Web Services. To use our core solution, you are only required to have an internet connection, and a supported internet browser, with a recommended screen resolution. Q2 ...
    • Escap on premise -How to create yearly budget

      Introduction Each year, around October or November, you can prepare the next year’s budget for the hotel. The Yearly Budget contains both Operational and Financial information. You may need to get some of this information from your Finance/Accounts ...
    • ESCAP on-premise compared to ESCAP Cloud

      CATEGORY ESCAP ON-PREMISE ESCAP CLOUD TECHNOLOGY, SERVER and INSTALLATION Accessible only at hotel premises Hotel IT team required for all updates Hotel is required to provide a server, IT resources, backups, etc. Hotel IT needs to install ...