The purpose of this script is to cleanup the Aomei Backupper's saves directory (works on tech edition 6.8.0) it deletes all backup files older than the number of full backups defined in configuration
This script was release in TSSR studies and works on windows via git for windows. I don't know if it can run on linux operating system, i didn't test it.
######CONFIGURATION###########################################################
DATE=$(date "+%y%m%d_%H%M")
LOG=savcleaner.txt #name for scripts logs
DOSSIERLOGS="C:/SCRIPTS LOGS DIRECTORY/"#path for script logs
DIRLOGAB="C:\ProgramData\AomeiBR\brlog.xml"#directory of Aomei logs
HOST=$(hostname | tr a-z A-Z)
LECTEUR=$"H:" #disk where aomei' saves are (can be a directory but the structure must be : disk or directory with (sub)directories only with aoemi saves)
NBSAV=1 #set the number of complete saves that you whant to keep
######CONFIGURATION###########################################################
You can use the windows's tasks scheduler (for me at 9am every day)