Given is a backup called "USB backup", the repository is simply called "USB".
This backup takes place once a weekend on a USB drive. Before the backup starts, it should simply delete the backup from the previous week.
I created a Powershell script that I run directly from the backup task (USB Backup => Storage => Advanced => Scripts => Run the following script before the job).
The Powershell script has the following content:
When I call the script as admin via Powershell, it deletes the backup from the previous week.
However, when I start the backup job, Veeam says the job ran correctly, but the previous week's backup is not deleted.
I've already put the whole thing into a batch file but without success.
What am I doing wrong?
This backup takes place once a weekend on a USB drive. Before the backup starts, it should simply delete the backup from the previous week.
I created a Powershell script that I run directly from the backup task (USB Backup => Storage => Advanced => Scripts => Run the following script before the job).
The Powershell script has the following content:
Code:
Get-VBRBackup -Name "USB-Backup" | Remove-VBRBackup -FromDisk -Confirm:$falseHowever, when I start the backup job, Veeam says the job ran correctly, but the previous week's backup is not deleted.
I've already put the whole thing into a batch file but without success.
What am I doing wrong?
Statistics: Posted by dk-one — Apr 20, 2024 1:44 pm






