Hey there! This is the expected behavior for the cPanel >> Backup Wizard tool at this time. Since this tool gives users the option to perform their own restores, we decided not to remove files that didn't exist in the backup. If you need to perform a restore due to a security issue, such as the site being hacked, it is best to have the server admin terminate the account and restore the entire account from a backup, or recreate the account and have the end-user perform the restore through the cPanel interface, as that will ensure no stray files are left behind.
hello
@maodoanminh @cPRex
I used the backup restore in WHM/ I setup the backup process to take 5 backups total so I have 5 days of backup and while testing some configurations on a website that I made some errors on then restored my site from one if the backups the day before and my changes that were creating an error were gone. it was back to normal again. so the changes I had made that created the error in the files I changes were not there any longer. so maybe that would be the best way to do this. just incase you need to restore someones directory and database emails etc..
first setup backups in Home > backup > backup configuration
and setup your options there ( if you did not set that up already)
as I said about I have everyday backed up and limit is 5 backups.
so I have 5 days of backups to restore from.
Then go to your WHM Home > backup > Backup restoration
then you will see all the accounts on your server, select the account you want to restore and select the day you want to restore to, before the file was uploaded and it should not be there when you restore there backup.
this is what I have done in the past and works for me
hope this helps you in some sort of way
Spiro