Run backup / restore task from a command line interface

Summary

ActiveImage Protector provides command line interface. This article provides the command syntax to run backup / restore tasks from a command line interface.
* Depending on the OS, the install path differs.

Default path on Windows
C:Program Files (x86)<Actiphy or NetJapan>ActiveImage ProtectorAipControl.exe

Default path on Linux
/opt/<Actiphy or NetJapan>/aipcontrol

Details

Run backup task by using the specified profile.
Before running a backup task, you need to configure the schedule setting.

1) Profile Name
* Same as schedule name.
Command Syntax: profiles

> cd C:Program Files (x86)<Actiphy or NetJapan>ActiveImage Protector
> aipcontrol profiles
Actiphy Controller [Version 5.1.11.6500]
job ----Full backup profile name
jobINC ----Incremental backup profile name

2) Run backup task
Command Syntax: createimage <Profile Name >

> cd C:Program Files (x86)<Actiphy or NetJapan>ActiveImage Protector
> aipcontrol createimage job ---->Full backup task is executed.
> aipcontrol createimage jobINC ---->Incremental backup task is executed.

Sample
Batch processing to run incremental backup task 30 seconds later

@echo off
cd C:Program Files (x86)ActiphyActiveImage Protector
setlocal enableDelayedExpansion
for /l %%N in (30 -1 1) do (
   set /a "min=%%N/60, sec=%%N%%60, n-=1"
   if !sec! lss 10 set sec=0!sec!
   cls
   choice /c:CY1 /n /m "Do you want to run backup task? !min!:!sec! - Press "Y" to run backup task immediately or "C" to cancel." /t:1 /d:1
   if not errorlevel 3 goto :break
) 
cls
echo Do you want to run backup task? 0:00 - Press "Y" to immediately run backup task or "C" to cancel.
:break
if errorlevel 2 (
   aipcontrol createimage JobINC
)

Run restore task
Command Syntax: restoredisk <Image File Name> <Destination disk> diskmeta

Restore a disk from a specific image file.
* If you wrongly specify the destination in command syntax, the data in the destination will be overwritten. You are recommended to use GUI for running restore task.

Boot Environment (WinPE-based)

1) If you specify NAS for the destination, you need to enter credential information for authentication.
Command Syntax: networkuser <Host Name><User Name> <Password>

> cd x:Program FilesActiphyActiveImage Protector
> aipcontrol networkuser srv20administrator password123

2) Restore by disk

> aipcontrol restoredisk srv20sharew2012@test_d00_00001.aiv disk0 diskmeta

When the backup image is located on local drive, you do not need to enter credential information for authentication.

> cd x:Program FilesActiphyActiveImage Protector
> aipcontrol restoredisk z:w2012@test_d00_00001.aiv disk0 diskmeta

Boot Environment (CentOS-based)

1) When the backup image is located on NAS, please make sure the shared folder is mounted.

mount -t cifs //192.168.0.123/share /mnt -o user=administrator,password=test1234

2) Restore by disk.

# cd /opt/BE
# aipcontrol restoredisk /mnt/backup/w2012@test_d00_00001.aiv disk0 diskmeta

Target Product

– ActiveImage Protector 2018
– ActiveImage Protector 2022



?akb&p=3295

Table of Contents