Pre / Post commands not possible
Hello.
On the AMS (Windows-Server) is a batch file under "C:\Batch\delete.cmd".
However, this is not executed.
As an agent I have chosen the AMS myself.
Why is my batch file not running? As test there is only
echo hallo
exit
Attachment | Size |
---|---|
2017-10-13 15_33_04-Backup Management Konsole.jpg | 40.17 KB |

- Log in to post comments

Hi,
You should also specify the Working directory (Arbeitsverzeichnis)
- In the Working directory field, specify a path to a directory where the command/batch file will be executed. This is a directory context of the command. This is not the folder with the batch file. This is equivalent to issuing command "cd FOLDERNAME" before running actual script.
For more information please refer to Acronis Software: Troubleshooting Pre/Post Commands Issues.
- Log in to post comments
In reply to Hi,… by truwrikodrorow…

Hmm...
Can you give me a concrete example?
Thank you.
- Log in to post comments

Some examples from another discussion.
- Log in to post comments
In reply to Hmm… by truwrikodrorow…


Can i do this?
@echo off & setlocal
set "SrcDir=D:"
set "Exclude=".meta" "x""
del /q "%SrcDir%\*.*" 2>NUL
set "DoNotDelete="
for /f "delims=" %%d in ('dir /b /a:d "%SrcDir%"') do (
for %%e in (%Exclude%) do (
if "%%d" equ "%%~e" set "DoNotDelete=1"
)
if not defined DoNotDelete rd /s /q "%SrcDir%\%%d"
set "DoNotDelete="
)
- Log in to post comments


The script now works. Great!! I want to delete the removable disks before every backup. Unfortunately this is necessary, since always at least one backup remains on the disks. We change the hard disks every day. Is the procedure so ok?
- Log in to post comments

Glad to hear that :) If you want only one backup to be stored on each drive, then you may want using the script listed in Backing Up to Removable Devices with Regular Drive Swaps.
- Log in to post comments

Great. I have another question. All backup files are always _.tibx. Its the normal? The file name of the backup should be: [MachineName]-backup
- Log in to post comments

Hi,
Sorry for delayed response! I believe you've selected a managed location for backups. The above naming is expected for a managed location. Backup archives in an unmanaged location will be named like in the examples of Backup file name.
- Log in to post comments