How to Export or Import .BIN (Jobs and Folders) Using a Command Line Interface Tool (CMD) in Ghost Solution Suite
search cancel

How to Export or Import .BIN (Jobs and Folders) Using a Command Line Interface Tool (CMD) in Ghost Solution Suite

book

Article ID: 178411

calendar_today

Updated On:

Products

Deployment Solution

Issue/Introduction

You would like to export and possibly import some folders and their nested jobs from the Ghost Solution Suite console.  You would like to do this using a command line interface, such as CMD.exe.  Is there a way to accomplish this?

Environment

Ghost Solution Suite 3.x

Resolution

There are two executables located in C:\Program Files (x86)\Altiris\eXpress\Deployment Server.  AxImport.exe and AxExport.exe.  You can run each with a /? to get all options.  

Running the following command:  AxExport.exe TestFolderExport /f "ExportMe" /s will export the contents of my ExportMe folder, including the nested folder and job to a file called TestFolderExport

Running the following command:  AxImport.exe TestFolderExport will import the ExportMe folder structure and job.  

Be careful when running the import command, because it seems to import the content regardless if it exists or not, and could cause duplicates. Of course this would not be an issue if your use case is to export the folders/jobs from one server and import them into another server.

Question

Is it possible to use axImport.exe to import a job or folder of jobs starting at any level other than the root (or base) of the Jobs pane, or one folder into the folder structure?

Answer

No, the axImport.exe utility is only designed to import the jobs and folders directly into the Jobs pane (by default), or into a subfolder, but no deeper than that.

When a job is imported with axImport, it can only be placed in the root of the jobs pane, or in a subfolder no more than 1 level deep.

For example:

axImport.exe "test.bin" /f \myJobs\Jobs1\Jobs2 will not create a folder myjobs with a subfolder Jobs1 and a subfolder under Jobs1 named Jobs2.  Rather, this example will create a folder in the root of the jobs pane named "\myJobs\Jobs1\Jobs2"

axImport will import to the root of the jobs pane or a folder in the root, but not to any subfolders.

For example:

axImport.exe "test.bin"
will import directly to the Jobs pane
axImport.exe "test.bin" /f "myJobs"
will import into the myJobs folder

The workaround is to create a skeleton folder structure, and move the folder to be imported into that structure, then export the whole structure from the parent folder.

To do this, using the example above:

On the first server, create a folder named myJobs, and under it a subfolder named Jobs1.  Once this has been done, copy Jobs2 into Jobs1, and then export the myJobs folder including all subfolders.  When importing, import directly to the Jobs pane, and the jobs in the Jobs2 folder will be placed in \myJobs\Jobs1\Jobs2.