Deleting old backups
Backups can quickly fill up your backup directory drive. You can automate your system to delete old backups. The following procedure demonstrates how to delete backup files that are older than 15 days.
To delete backup files that are 15 days or older:
- In a text editor, open Delete_old_Backups.ps1
- Edit the file for your system:
- For Power Operation backups: enter the path of the PSE_Backups folder. For example:
C:\PSE\PSE_Backups
- For Power Operation backups: enter the path of the PSE_Backups folder. For example:
- Save the file as Delete_old_Backups.ps1 under:
C:\Program Files (x86)\Schneider Electric\BackupTasks - Create a Windows scheduled task to trigger this script to run weekly once at midnight.
- Define the new action:
- For Action, click Start a program.
- In Program/script, enter the following path:
C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe - In Add arguments, enter the following:
-noninteractive -nologo -file " C:\Program Files (x86)\Schneider Electric\BackupTasks\Delete_old_Backups.ps1"