Command Server Delete backup logs
NovaBACKUP DataCenter
The following Powershell commands delete old backup logs on the NovaBackup DC / Network Command Server older than 90 days:
$ HoldTimeInTages = 90
Get-ChildItem "C: \ Program Files \ NovaStor \ DataCenter \ log \ results" -Recurse | where-object {$ _. LastWriteTime -lt (get-date) .adddays (- $ holdtimeIn days)} | Foreach {Get-ChildItem $ _. Pspath | Remove-Item -recurse}
Put these two lines in a file
C: \ Program Files \ NovaStor \ DataCenter \ etc \ ResultsCreating.ps1
on the DataCenter command server.
The Powershell script can be started from a cmd.exe (started as Admin) like this:
powershell -file "C: \ Program Files \ NovaStor \ DataCenter \ etc \ ResultsPreaming.ps1"
The script can thus be executed interactively punctually or on a scheduled basis in the Task Scheduler on a regular basis.