You can make Acronis True Image execute manually created batch files before and after the backup or restore
Introduction
You can make Acronis True Image execute batch files before and after the backup procedure, restoration process, or before and after the actual data capture.
Solution
Using a batch file as Pre/post commands
Acronis True Image runs pre commands before the actual backup or restoration process starts.
Acronis True Image runs post commands after the actual backup or restoration process is over.
- Run Acronis True Image and start the Backup or Recovery wizard;
- Select the partitions or the whole drive that you want to back up or restore;
- On the Choose Restore Options or Choose Backup Options screen select Set the options manually:
- On the Backup Creation Options or Restoration Options screen select Pre/Post commands and click Edit next to Before backup process or Before restoration process:
- On the Edit Command window type in the path to the batch file in the Command field and the directory where the batch file is in the Working directory field:
- Click OK and select Edit next to After backup process or After restoration process;
- Specify the batch file that should be executed after the restore process.
Using a batch file as Before/after data capture commands
The Before/after data capture commands option is available only in the following products:
- Acronis True Image 9.1 Server for Windows
- Acronis True Image 9.1 Enterprise Server
- Acronis True Image Echo Server for Windows
- Acronis True Image Echo Enterprise Server
These commands are used to suspend database work for a short time to let Acronis True Image create a snapshot of the system.
Acronis True Image runs Before/after data capture commands before and after the actual data capture (snapshot) and always before the backup process is completed.
- Run Acronis True Image and start the Backup wizard;
- Select the partitions or the whole drive that you want to back up;
- On the Choose Backup Options screen select Set the options manually:
- On the Backup Creation Options window select Before/after data capture commands;
- Click Edit next to Before data capture:
- On the Edit Command window type in the path to the batch file in the Command field and the directory where the batch file is in the Working directory field:
- Click OK and select Edit next to After data capture;
- Specify the batch file that should be executed after the data capture but before the backup process:
More information
You can take a look at Difference between Pre/Post Commands and Before/After Data Capture Commands.
See also:
- Automatically Renaming Image Archives
- Backing Up and Restoring Active Directory Server with Acronis True Image
- Citrix Server Cloning
- Acronis True Image Home: Database Backup
You can download sample batch files:
- Batch file for managing backup sets saved to a network share with password protection (pre-backup command)
- Batch file for managing backup sets saved to a network share without password protection (pre-backup command)
- Batch file for managing backup sets saved locally (pre-backup command)
- Batch file for managing backup sets saved to a network share through Acronis Group Server (pre-backup command)
- Bash file for managing backup sets saved to a network share for Acronis True Image Server for Linux (pre-backup command)
- Batch file for suspending Windows services for MS Exchange (before data capture command)
- Batch file for resuming Windows services for MS Exchange (after data capture command)
- Batch file for suspending Windows services for MS Exchange 2007 (before data capture command)
- Batch file for resuming Windows services for MS Exchange 2007 (after data capture command)
- Batch file for suspending Windows services for MS SQL (before data capture command)
- Batch file for resuming Windows services for MS SQL (after data capture command)
- Batch file for suspending Windows Active Directory services (before data capture command)
- Batch file for resuming Windows Active Directory services (after data capture command)
- VBScript to automatically consolidate backup archives (VBScript)
(!) When running these batch files from on non-english operating systems, you will receive an error message similar to:
System error 1060 has occurred.
The specified service does not exist as an installed service.
This is because the system services have their own localized names. You can run the net start command in the Command Line (Start-Run -> cmd) to view a list of running services. Use the names displayed there to replace service names in the batch files. If the service name has spaces in it, do not forget to put quotes around the name.