Acronis® Backup & Recovery ® 10 Advanced Server Update 5 Command-Line Reference
Table of contents 1 Command-line mode and scripting in Windows ......................................................................3 1.1 Agent for Windows command-line utility .................................................................................3 1.1.1 1.1.2 1.1.3 1.1.4 1.2 Storage node command-line utility .........................................................................................29 1.2.1 1.2.2 1.2.3 1.2.4 1.3 Script execution parameters .................................
1 Command-line mode and scripting in Windows Acronis Backup & Recovery 10 supports the command-line mode and enables backup automation by executing XML scripts. Acronis Backup & Recovery 10 uses the Acronis True Image Echo command line utility with the following additions: 1. 2. 3. 4. 5. Ability to use the before/after data capture commands. Ability to use the VSS support option. Ability to check for a license on the license server with the /ls_check command. Ability to use file exclusion at disk backup.
create Creates an image of specified disks and partitions filebackup Backs up specified files and folders 4 /vault:[path] /arc:[archive name] /arc_id:[archive id] /filename:[file name] /password:[password] /crypt:[AES128|AES192|AES256] /asz:[number of archive] /net_user:[username] /net_password:[password] /ftp_user:[username] /ftp_password:[password] /incremental /differential /compression:[0…9] /split:[size in MB] /oss_numbers /progress:[on|off] /reboot /log:[file name] /log_net_user:[remote user] /log_
deploy Restores disks and partitions, except for the MBR, from an image /vault:[path] /arc:[archive name] /arc_id:[archive id] /filename:[file name] /password:[password] /asz:[number of archive] /index:N /net_user:[username] /net_password:[password] /ftp_user:[username] /ftp_password:[password] /oss_numbers /reboot /log:[file name] /log_net_user:[remote user] /log_net_password:[password] /silent deploy_mbr /file_partition:[partition letter] /harddisk:[disk number] /partition:[partition number] /target_ha
/password:[password] /asz:[number of archive] /net_user:[username] /net_password:[password] /ftp_user:[username] /ftp_password:[password] /reboot /log:[file name] /log_net_user:[remote user] /log_net_password:[password] /silent pit_info /filename:[file name] /password:[password] Displays the numbered /asz:[number of archive] list of backups, /net_user:[username] contained in the /net_password:[password] specified archive /ftp_user:[username] /ftp_password:[password] consolidate Creates a consistent copy of
Lists available drives and partitions. When used with the filename option, it lists the image contents. When used with the vault option, it lists archives located in the specified location. When the arc, or the arc_id option is added, it lists all backups contained in the archive.
asz_files /password:[password] Displays the Acronis Secure Zone size, free space and contents using the generated file names asz_delete_files Deletes the most recent backup in the archive located in the Acronis Secure Zone asz_delete Deletes the Acronis Secure Zone /filename:[file name] /password:[password] /log:[file name] /log_net_user:[remote user] /log_net_password:[password] /silent /password:[password] /oss_numbers /reboot /later /log:[file name] /log_net_user:[remote user] /log_net_password:[passw
The following locations are supported: Local folders, e.g.: /vault:C:\Test, or /vault:"C:\Test 1" Network folders, e.g.: /vault:\\ServerA\Share\ Managed vaults (for advanced product editions only), e.g.: /vault:bsp://StorageNode/VaultName FTP and SFTP, e.g.: /vault:ftp://ServerA/Folder1 CD, DVD – with the path specified as a local path, e.g.: /vault:F:\ Acronis Secure Zone, e.g.: /vault:atis:///asz Tapes, e.g.: /vault:atis:///tape?0 Unmanaged vaults are specified by their path.
2 = 1st increment… and so on 0 (default) = latest increment Selects a backup in a sequence of incremental backups inside the archive. To get a backup index from the ASZ, use asz_content. include_pits:[pits numbers] Specifies the backups (pits) to be included in the archive copy. To get the numbers of pits, use pit_info.
It ranges from 0 to 9 and is set to 3 by default. crypt:[AES128|AES192|AES256] Specifies the key size for the AES algorithm encryption of the password-protected archive. The option is used together with the /password (p. 9) option. For example: /password:QWerTY123 /crypt:AES256 The randomly generated encryption key is then encrypted with AES-256 using a SHA-256 hash of the password as a key.
/reboot /later Reboot before operation (postponed) Reboot after operation /reboot Reboot before operation Reboot after operation no option No reboot, operation fails No reboot, operation succeeds later Postpone the reboot until a user restarts the system manually. The option is used with the /reboot option in the following operations that require a reboot: recovering locked files, creating/deleting Acronis Secure Zone on a system disk, cloning a system disk.
partition:[partition number] Specifies the partitions to include into the image file. The list of available partitions is provided by /list. Partition numbers are specified as -, e.g.: /partition:1-1,1-2,3-1 Dynamic volumes are specified with the prefix DYN, e.g.
before:[pre-data capture command] Enables to define the command to be automatically executed before data capture at the beginning of the backup procedure. For example: /before:"net stop MSSQLSERVER" after:[post-data capture command] Enables to define the command to be automatically executed after data capture at the beginning of the backup procedure. For example: /after:"net start MSSQLSERVER" use_vss Notifies the VSS-aware applications that the backup is about to start.
/before:"net stop MSSQLSERVER" after:[post-data capture command] Enables to define the command to be automatically executed after data capture at the beginning of the backup procedure. For example: /after:"net start MSSQLSERVER" use_vss Notifies the VSS-aware applications that the backup is about to start. This ensures the consistent state of all data used by the applications, in particular, completion of all database transactions, at the moment of taking the data snapshot.
target_partition:[partition number] Specifies the target partition number for restoring a partition over the existing one. If the option is not specified, the program assumes that the target partition number is the same as the partition number specified with the /partition option. Dynamic volumes are specified with the prefix DYN, e.g.: /target_partition:DYN1 start:[start sector] Sets the start sector for restoring a partition to the hard disk unallocated space.
Options specific for Universal Restore The following options are available when using the Universal Restore add-on to Acronis Backup & Recovery 10. ur_path:[path] Specifies using Acronis Universal Restore and the path to the drivers storage. ur_username:[username] Specifies using Acronis Universal Restore and a user name. When getting access to a place located on the remote computer, the username depends on the service which is used to get access to the remote resource. E.g.
never – this will give the file on the hard disk unconditional priority over the archived file. always – this will give the archived file unconditional priority over the file on the hard disk. If not specified, the files on the disk will always be replaced with the archived files. restore_security:[on | off] Specifies whether to restore files’ security attributes (default) or whether the files will inherit the security settings of the folder where they will be restored.
1.1.3.7 consolidate target_filename:[file name] Specifies the path to and name of the archive copy to be created. If there are two or more backups (pits) in the copy, numbers will be added to their names. net_src_user:[username] Specifies the user name for logon to the network share to access the source archive. net_src_password:[password] Specifies the password for logon to the network share to access the source archive.
CD, DVD – with the path specified as a local path, e.g.: /target_vault:F:\ Acronis Secure Zone, e.g.: /target_vault:atis:///asz Tapes, e.g.: /target_vault:atis:///tape?0 Unmanaged vaults are specified by their path. For example, if a vault is located in a folder, specify the path to that folder. target_arc:[target archive name] The name of the target archive. Has to be unique within the target folder. If there is an archive with the same name, the operation will fail.
Drivers for the virtual machine reside in the storage, defined by the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Acronis\UniversalRestore\DriversPackPath. In case the storage has been moved, please change the key or use the command ur_path:[path]. ur_path:[path] The same as ur with custom path to the virtual machine drivers storage. 1.1.3.10 list filename:[file name] With this option, the image contents are displayed.
arc_id:[archive id] Used in combination with the vault option. Lists all backups of the selected archive. If not specified, the arc option is used. If both the arc and arc_id options are specified, the arc_id option is used. 1.1.3.11 explore partition:[partition number] Specifies a list of partitions to be mounted as virtual drives. Without this option, all partitions stored in the image will be mounted.
With “unallocated”, the zone will use all unallocated space on the disk. Partitions will be moved, if necessary, but not resized. Moving of locked partitions requires a reboot. The partition option is ignored. 1.1.3.14 asz_delete partition:[partition number] Specifies partitions to which free space will be added after the Acronis Secure Zone is deleted. If you specify several partitions, the space will be distributed proportionally based on each partition’s size. 1.1.3.
The operation log file log1.log will be saved on another share \\server2\dir\. Credentials for both shares are provided. The following command will create an image of partition 2-1 in the archive.tib file located on the FTP server: trueimagecmd /create /partition:2-1 /filename:ftp://server/folder/archive.tib /ftp_user:usr1 /ftp_password:pswd1 1.1.4.2 Restore disks and partitions The following command will restore partition 2-1 from image 1.
1.1.4.4 Restore files The following command will restore all files from E:\Backups\Myproject.tib to the original folder and assign the files the original date and time: trueimagecmd /filerestore /filename:E:\Backups\Myproject.tib /original_date Since the /overwrite option is not specified, the latest file modifications will be replaced with the original ones. 1.1.4.5 Consolidate backups The following command will display the numbered list of backups, contained in the archive Kons.
trueimagecmd /export /vault:bsp://StorageNode/Vault1 /arc:"Archive 1" /include_pits:2,3 /net_src_user:"user" /net_src_password:"password" /target_vault:\\Server15\Backups\ /target_arc:"Archive 2" /net_user:"user" /net_password:"password" /progress:on 1.1.4.7 Convert an image to virtual disk The following command will convert images of disks 1 and 3, contained in the file C:\MyBackup.tib, to the virtual disks C:\MyHDD.vmdk and C:\MyHDD2.
C:\Program Files\Acronis\BackupAndRecovery>trueimagecmd /asz_content ASZ size: 34.439 GB ASZ free space: 34.409 GB ARCHIVE number: 1 index: 1; type: file, base; creation time: 4/2/2009 3:52 PM ARCHIVE number: 2 index: 1; type: file, base; creation time: 4/2/2009 4:04 PM index: 2; type: file, incremental; creation time: 4/4/2009 6:31 PM index: 3; type: file, incremental; creation time: 4/4/2009 6:32 PM In our example, the Acronis Secure Zone contains two archives.
full (base) file-level backup created on 8/14/2009 at 2:17 incremental backup created on 8/15/2009 at 2:19. trueimagecmd /filerestore /filename:asz://FAAA /target_folder:e: /password:aszpw This will restore files and folders with their original paths from the sole base backup FAAA to the root of partition E. C:\Program Files\Acronis\BackupAndRecovery>trueimagecmd /filerestore /filename:asz://FAAA /target_folder:e: /password:aaa [########################################] 100% Operation has succeeded.
1.2 Storage node command-line utility The StorageNodeCmd command-line utility provides tools to view and export the archives stored in centralized managed vaults, and to import archives to such vaults. This utility runs only on a machine where a storage node is installed, and works only with the centralized vaults managed by that storage node—called the local storage node in this section.
1.2.2 Options This section lists the options used by the StorageNodeCmd command-line utility. 1.2.2.1 arc and arc_id The arc option specifies the name of the archive—for example: /arc:"My Archive" If the vault contains more than one archive with this name, the utility uses the first such archive it finds—not necessarily the oldest or newest one. When there are several archives with the same name, consider using the arc_id option instead.
1.2.2.5 log_net_password Specifies the password for the user whose name is given by the log_net_user option—for example: /log_net_password:"My PassWd123" 1.2.2.6 log_net_user Specifies access credentials to the file whose name is given by log—for example: /log_net_user:"User A" 1.2.2.7 password Specifies the password for a password-protected archive whose name is given by arc or arc_id—for example: /password:"My PassWd123" This option is ignored if the archive is not password-protected. 1.2.2.
In either of these cases, the vault has to be managed by the local storage node. The vault name is given as a Uniform Resource Identifier (URI)—for example: /vault:"bsp://My Storage Node/MyVault" When used with the import command, specifies the local or network folder that contains the archive to import—for example: /vault:\\Server\Share 1.2.3 Examples These examples assume the following: You are running the StorageNodeCmd utility on a machine where a storage node is installed.
The pit number identifies a backup within the archive. By using pit numbers, you can export individual backups of an archive instead of exporting it as a whole. Exporting an archive The following command exports the My Archive archive to the C:\Archives folder. StorageNodeCmd /export /vault:"bsp://My Node/My Vault" /arc:"My Archive" /target_vault:"C:\Archives" Exporting the newest backup of an archive The following command exports the newest backup of the My Archive archive.
For either script, these options are equivalent respectively to the vault, credentials, target_vault, and target_credentials options of the StorageNodeCmd utility. 1.3 Scripting Scripting is intended only for backup. 1.3.1 Script execution parameters Scripts are executed by the TrueImageTerminal.exe utility located in the Acronis Backup & Recovery 10 installation folder (i.e. C:\Program Files\Acronis\BackupAndRecovery). This utility is also used to monitor backup progress.
1.3.2.2 Target Specifies the name and the location of an image file, e.g.: username and password parameters are optional. They are used to access networked resources. As a target for the image files you can indicate a CD-R/RW or tape drive. 1.3.2.3 Options This tag can be used with a number of additional parameters: Compression specifies the backup compression level. Can be None, Normal, High, Maximum.
xml version="1.0" encoding="utf-8" ?> 36 Copyright © Acronis, Inc.
2 Console mode in Linux Console is a natural part of Linux OS. Acronis Backup & Recovery 10 supports it through the trueimagecmd command line tool. It provides a way to initiate data backup and recovery operations. trueimagecmd also enables you to automate backup with the ‘cron’ service. The trueimagecmd functionality is somewhat limited as compared to the GUI mode. trueimagecmd does not support operations that require: reboot of the system, such as restore a system partition or clone system drive.
folders --arc_id:[archive id] --filename:[filename] --password:[password] --crypt:[AES128|AES192|AES256] --incremental --differential --compression:[0…9] --split:[size in MB] --log:[filename] --silent restore --exclude_masks:[masks] --exclude_hidden --before:[pre-data capture command] --after:[post-data capture command] --progress:[on | off] --filename:[filename] --password:[password] Restores disks and partitions --asz:[number of archive] from an image --index:N --oss_numbers --log:[filename] --silent
Creates a consistent copy of the archive which will contain only the specified backups --password:[password] --log:[filename] --silent export --vault:[path] --arc:[archive name] --arc_id:[archive id] --include_pits:[pits numbers] --password:[password] --progress:[on | off] --log:[filename] --net_user:[username] --net_password:[password] --ftp_user:[username] --ftp_password:[password] --silent --target_vault:[target path] --target_arc:[target archive name] --password:[password] --index:N --asz:[number o
asrm_deactivate Deactivates the Acronis Startup Recovery Manager clone Clones a hard disk --harddisk:[disk number] --target_harddisk:[disk number] help Shows usage ls_check Checks if there are licenses for the local machine on the license server dumpraidinfo Saves information about MD devices and LVM volumes to the /etc/Acronis directory 2.1.2 2.1.2.1 Common options Access to archives vault:[path] Specifies a path to the location that contains the archive.
arc_id:[archive id] Specifies the Universally Unique Identifier (UUID) of the archive, e.g.: --arc_id:183DE307-BC97-45CE-9AF7-60945A568BE8 If not specified, the arc option is used. If both the arc and arc_id options are specified, the arc_id option is used. filename:[filename] Archive name, if the archive location is other than ASZ.
To get a backup index from the ASZ, use asz_content. ftp_user:[username] Specify a user name for access to an FTP server. ftp_password:[password] Specify a password for access to an FTP server. net_user:[username] Specifies the user name for logon to the network share to save the resulting archive. net_password:[password] Specifies the password for logon to the network share to save the resulting archive. include_pits:[pits numbers] Specifies the backups (pits) to be included in the archive copy.
password hash is used for verification purposes. With this two-level security, the backup data is protected from any unauthorized access, but recovering a lost password is not possible. If the /crypt option is not specified, the password-protected archive will be not encrypted. split:[size in MB] Split the backup into parts of the specified size, if the archive location is other than ASZ. 2.1.2.
--partition:dyn1 raw Use this option to create an image of a disk (partition) with an unrecognized or unsupported file system. This will copy all disk/partition contents sector-by-sector. Without this option only the sectors containing useful system and user data are imaged (for the supported file systems). progress:[on | off] Shows/hides the progress information (percent completed). It is shown by default.
--exclude_names:'/home/bot/ATIESsafe.iso,/home/bot/MyProject/Old' exclude_masks:[masks] Applies masks to select files to be excluded from the backup. Use the common Linux masking rules. For example, to exclude all files with extension .sh, add *.sh. My???.sh will exclude all .sh files with names consisting of five symbols and starting with "my". exclude_system Excludes all system files from the backup. exclude_hidden Excludes all hidden files from the backup.
target_partition:[partition number] Specifies the target partition number for restoring a partition over the existing one. If the option is not specified, the program assumes that the target partition number is the same as the partition number specified with the partition option. start:[start sector] Sets the start sector for restoring a partition to the hard disk unallocated space.
2.1.3.4 filerestore target_folder:[target folder] Specifies a folder where folders/files will be restored (a target folder). If not specified, the original path is re-created from the archive. overwrite:[older | never | always] This option allows you to keep useful data changes made since the backup being restored was done.
no_subdir This option is used together with the /folder_name (p. 18) option. Prohibits verification of archives stored in the subfolders of the specified folder. For example: --folder_name:'/home/bot/MyProject' --no_subdir If the option is not specified, all archives stored in the parent folder and its subfolders will be verified. 2.1.3.6 deploy_mbr harddisk:[disk number] Specifies the basic hard disk to restore the MBR from.
2.1.3.9 list filename:[filename] With this option, the image contents are displayed. When listing image contents, partition numbers may not coincide with those in the drives/partitions list, if the image does not contain all the disk partitions. For example, if the image contains partitions 2-3 and 2-5, they will be listed as 2-1 and 2-2.
2.1.3.10 asz_create password:[password] a) Password for the archive, if the archive location is other than ASZ. b) Password for the ASZ, if archive location is ASZ. harddisk:X Specifies the hard disk number where the Acronis Secure Zone will be created. partition:[partition number] Specifies partitions from which free space will be taken for Acronis Secure Zone. size:[ASZ size in sectors | unallocated] Sets the Acronis Secure Zone size (in sectors).
The following command will check if there are licenses assigned to the local machine on the license server: trueimagecmd --ls_check The result is a list of used licenses. For example: Acronis Backup & Recovery 10 Advanced Server Acronis Backup & Recovery 10 Advanced Server (trial) invalid valid The following command will create an image named backup.tib of partition 1-1: trueimagecmd --partition:1-1 --filename:backup.
The following command will restore the MBR from partition image D1 to the hard disk 1: trueimagecmd --deploy_mbr --filename:/usr/backups/D1.tib --harddisk:1 The following command will export the "archive1" archive from the root folder to the new archive named "archive2" in the "exported" folder: trueimagecmd --export --vault:/ --arc:archive1 --target_vault:/exported \ --target_arc:archive2 The following command will export the "archive1" archive from managed vault "vault10" to the network share:
Where /mnt/backups/my_host/backup.tib is the name and path of the image. The second executable file is needed to initiate daily creation of incremental images: #!/bin/bash /usr/sbin/trueimagecmd --create --incremental --partition:2-1 \ --filename:/mnt/backups/my_host/backup.tib If needed, users can set up their own backup schedule. For more information, see Help on the cron service. 2.3 Restoring files with trueimagemnt The trueimagemnt tool is designed to restore files from partition/disk images.
-o|--loop A test command. Mounts a file, specified in the -f|--filename option, containing a valid Linux filesystem, as if it were an Acronis Backup & Recovery 10 archive. The command may be used, for example, to estimate an image compression level, by comparing the time, necessary for copying a file from the image, with the time for copying the mounted (non-compressed) file. trueimagemnt supports the following command options: -f|--filename archive filename The image file name.
2.3.2 Trueimagemnt usage examples The following command will list the mounted archives: trueimagemnt --list The following command will mount the archive backup.tib of the partition with index 2, to /mnt/backup: trueimagemnt --mount /mnt/backup --filename backup.tib --index 2 The following command will unmount a partition mounted at /mnt/backup: trueimagemnt --umount /mnt/backup 55 Copyright © Acronis, Inc.