Database Back-ups
3 min
In Multi-User mode, you should configure your database server to make regular backups, as defined in the Multi-User Installation Backups article. A set of database backup files will then be created on your Essential Architecture Manager server and these need to be managed. This article provides some template Windows VBS files that manage these backups. These scripts are to be used as a template for your installation and for Unix shell scripts.
Database Backup File Management Scripts
### manageDailyBackups.vbs
' (c)2008 EAS ltd.
' Essential Architecture Manager - repository backup maintenance script
' Remove all daily backups that are more than 31 days old
' Edit the aRootFolder and aDirectory variable to set the locations.
Dim anFso
Dim aDirectory
Dim aModifiedFile
Dim aFileSet
Set anFso = CreateObject("Scripting.FileSystemObject")
Set aDirectory = anFso.GetFolder("C:EssentialAMRepositoryBackupsDatabase")
Set aFileSet = aDirectory.Files
For Each aModifiedFile in aFileSet
If DateDiff("d", aModifiedFile.DateLastModified, Now) > 31 Then aModifiedFile.Delete
Next
manageHourlyBackups.vbs
' (c)2008 EAS ltd.
' Essential Architecture Manager - repository backup maintenance script
' Remove all hourly backups that are more than 1 day old
' Edit the aDirectory variable to set the location.
Dim anFso
Dim aDirectory
Dim aModifiedFile
Dim aFileSet
Set anFso = CreateObject("Scripting.FileSystemObject")
Set aDirectory = anFso.GetFolder("C:EssentialAMRepositoryBackupsDatabaseHours")
Set aFileSet = aDirectory.Files
For Each aModifiedFile in aFileSet
If DateDiff("d", aModifiedFile.DateLastModified, Now) > 1 Then aModifiedFile.Delete
Next
Updated 31 October 2023