Migrating Software Delivery Tasks

Migrating Software Delivery Tasks

Part of nearly every Altiris Notification Server implementation includes Software Delivery. Software Delivery enables us to, well, deliver software, but also provides us distribution points, policy-based actions on client computers, and repeatable, dependent rollout of system and application changes. No doubt the longer you have utilized Software Delivery, the more collections, packages, and tasks you have created. When it comes time to rebuild your Notification Server or move to a new NS, migrating the SWD infrastructure can become very, very time consuming. This article will demonstrate how to migrate your existing SWD tasks to a newly built server without recreating all the necessary items by hand.

Software Delivery Solution Overview

A typical software delivery by Altiris has three components - a computer collection, a reference to a Windows program and package, and a software delivery task. The collection defines what computers will have this SWD task applied to, the Windows package defines the actual command line and package files used, and the task ties the collection and package together, controlling the schedule of when the program in the package will be run against the computers in the collection. It is these three pieces which must be exported out of the old Notification Server and into the new Notification Server.

Moving Items Manually

You can move a single item manually by going into the Altiris Console (I'll be using Console 6.5 for this article), right-clicking on an item on the Tree View, and choosing "Export".

You will be prompted to save an XML file, so save it anywhere you like. This XML file contains all the necessary about the item, including name, GUID, class type, resource associations, and parent folder guids. To import this file into the new Notification Server, go the location you want to import the item into, right-click on the folder you want the item imported in, and click "Import".

You can export and import one item at a time this way, and it works for nearly everything I the Notification Server.

Note: Some items are placed in a special folder, like the Windows packages items. If export a single package using this method, remember to import back into the Windows folder, or your Software Delivery Tasks will not see the package!

Moving Multiple/Large Items

Most of the time when migrating to a new server, you will want to move collections/packages/tasks in batches. Or perhaps you have an item that is simply too large to import into your new Notification Server and you receive the error: "Error importing item: The file is too big to open". Altiris provides a nice little utility to import batches of items and items that are simply too large to import on their own. This is called the importexportutil.exe. This file can be found in C:\Program Files\Altiris\Diagnostics (or wherever you installed your Notification Server, in the Diagnostics directory). Importexportutil.exe runs in a command prompt, and there is no GUI for it. It can be used both to import and export items as necessary.

Exporting with Importexportutil.exe

  1. Identify a file system folder you want the item(s) exported to (e.g. C:\Exported Items).
  2. Get the GUID of the item you want to export. You can do this by locating the item on your Notification Server on the Tree View or right-hand pane, right-clicking on the item and choosing Properties. A new window will open and display (among other things), the item's GUID. This will also work for folders so you can export the folder itself and all items within it!
  3. Go to the start menu, choose "Run". Type "cmd" in the Run box and hit enter.
  4. Go to the diagnostics directory of the Notification Server (e.g. "cd C:\Program Files\Altiris\Diagnostics").
  5. Type "importexportutil.exe <guid> <location to export to>" (e.g. ImportExportUtil.exe /export {cee52b96-748a-4dd2-bd67-064f019a9d24} "D:\Exported Items")
  6. Now go to your folder and verify you have one or more XMLs (you will have more than one if you exported a folder which contains items within it).

Importing with ImportExportutil.exe

  1. Go to the start menu, choose "Run". Type "cmd" in the Run box and hit enter.
  2. Go to the diagnostics directory of the Notification Server (e.g. "cd C:\Program Files\Altiris\Diagnostics").
  3. Type "importexportutil.exe <folder where the XML files are held> (e.g. "ImportExportUtil.exe /import "D:\Exported Items")
  4. Open your browser to the Altiris Console and verify the item exists in the same location as it existed in the previous Notification Server.

Some Things to Note:

  • With this method you can simply export the entire "Windows" folder for your Windows packages and it will import itself into the proper directory!
  • If your packages reference source files and those source files are on the first Notification Server, remember to copy the source files to your new Notification Server as the importexportutil.exe does not facilitate that.
  • If you export/import collections with inclusions and exclusions (either resource or collections), those additions will not be retained if those resources/collections do not exist in the Notification Server you are importing to. This is because the collection's XML file contains the GUIDs of the items being included and/or excluded, and that information will not import if it does not find these GUIDs in the database. When importing collections with inclusions or exclusions, make sure you import the excluded or included items before you import the collection which relies on the previous items.
  • This will not work for Sequential Software Delivery Tasks. They have many resource associations and dependencies and the importexportutil.exe does not properly export or import those. You can however, migrate the packages and collections it uses.
  • This will not work for Patch Management. This includes Software Update Tasks, Security Updates, and Security Bulletins. This is because the importexportutil.exe does not create the IIS virtual directories when you import a security update or bulletin. The IIS virtual directories are only created when staging a bulletin. This staging also generates a unique GUID that a Software Update Task uses to properly associate itself with the security update which provides it the command line. Since the staging creates unique GUIDs and the Software Update Task references these unique GUIDs, it does not help to import the Software Update Task. You can however, migrate the collections a software update task uses, if you maintain specific collections for the purposes of rolling out patches.
4
Average: 4 (13 votes)
Syndicate content