Command line interface in Adobe Campaign server provides an easy way to manage and configure a various aspect of Adobe Campaign. Either you can use these command directly in your command console, or you can use “nlserver module” activity available in Adobe Campaign workflow to execute these commands.

nlserver module activity(Command line) in Adobe Campaign

nlserver module activity in Adobe Campaign

There is two part for every nlserver module command in Adobe campaign, namely command and command options. Let’s see what various available commands in Adobe campaign and usage of these commands are.

List of nlserver commands

Usage in Console: 

nlserver <command> <arguments of command>.

Usage in nlserver module: 

<command> <arguments of command>
example: tracking -instance:<%= instanceName %> -download -update
Adobe Campaign Command Command Usage
aliasCleansing cleanse enumeration values
billing creation of an activity report for the system
cleanup database cleanup
config modifying server configuration
copybase copy a database
export Command line export
fileconvert fixed width file conversion
import Command line import
inMail Inbound mail processing
interactiond Write server for inbound Interaction events
javascript JavaScript execution
job command line processing
merge merge forms
midSourcing retrieve delivery information using mid-sourcing mode.
monitor display status of server processes and scheduled tasks, per instance.
mta main Message Transfer Agent
package import/export file based entity package
pdump display status of server processes
pipelined Pipeline Services
prepareda prepare a delivery action
restart partial restart of the system
runwf execution of a workflow instance
shutdown full stop of the system
sms processing of SMS notifications
sql SQL script execution
start additional starts
stat Maintains MTA connection statistics
stop partial stop of the system
submitda submit a delivery action
syslogd log and trace writing server
tracking consolidation and retrieval of tracking logs
trackinglogd tracking log writing and purge server
watchdog start-up and monitoring module (watchdog)
web The Web(HTTP and SOAP), application server
wfserver workflow server

List of Arguments of command

Usage Example: 

nlserver [-verbose:] [-?|h|H] [-version] [-noconsole]
[-tracefile:] [-tracefilter:<[type|!type],...>]
[-instance:] [-low] [-high] [-queryplans] [-detach] [-svc]
[-pidfile:]
Arguments of command Usage of arguments
-verbose  verbose mode
-?  show this help message
-version  Show version number
-noconsole  do not display logs and traces on the console
-tracefile  name of trace file to generate (without extension)
-tracefilter  Filter to generate traces. E.g. wdbc,soap,!xtkquery.
-instance  instance to use (‘default’ instance if none specified).
-low  start with low priority
-high  start with high priority (not recommended)
-queryplans  Generates traces with execution plans of SQL queries.
-detach  detaches the process from its parent (internal option)
-svc  starts as a Windows service
-pidfile  file in which the process ID is written

Import/Export packages using the command line or nlserver Module:

Create a Package Definition

  • Go to Administration >> Configuration >> Package Management >>Package Definition.
  • Create a new package definition using a proper naming convention and Meaningful Label.
  • Add the appropriate filters to add configuration/content/code to the package definition.
Package creation in Adobe Campaign

Package creation in Adobe Campaign

Once you have created the package and defined its contents, copy the Internal package name created in this step. You will need to use this name in the next step.

Export a Package in Adobe Campaign using command line

Using Adobe Campaign server command line console:

  • Start the command line console from Adobe campaign server or using SSH.
  • Use the following sample command to export the package created above
nlserver package -instance:[instance_name_ofyour_Adobe_Campaign_server] -export:[target_file_name] -spec:[package_name_created_in_step_1] -verbose

Description of parameters used above:

  • instance_name_ofyour_Adobe_Campaign_server: the name of the Adobe Campaign instance. You can find the same under con directory of your server, i.e.,  in the config-[local_au].xml.
  • target_file_namethe file/SFTP location+filename, Which will be used to write the content of the package. You need to ensure that campaign system user has required permissions to write in the directory. This option will create the file automatically. So you need not provide an existing name.
  • package_name_created_in_step_1: the name of the package defined in step 1, we have used mcb:testPackage in the example.
  • verbose argument is used to get more details about command execution in the console.

Sample execution of the above command and its console output:

C:\root\nlserver\bin>nlserver package -instance:local_au -export:C:\root\backup\packages\testPackage.xml -spec:mcb:testPackage -verbose
11:39:56 > Application server for Adobe Campaign Version 6.1.1 (build 8757) of 24/07/2017
11:32:47 > Loading configuration for instance 'local_au'
11:32:47 > Starting 1 connection(s) on pool 'default local_au' (PostgreSQL, server='localhost', login='local_au:local_au')
11:32:47 > Library 'libpq.dll' loaded from 'C:\root\nlserver\bin\lib\pq.dll'
11:32:47 > Exporting package 'mcb:testPackage'...
C:\root\nlserver\bin>

Import a Package in Adobe Campaign using command line

Once the package is exported, it can be shared with other team members or It can modify or distribute as a vendor as needed. To import the package into the same or a different instance, execute the command:

nlserver package -instance:[instance_name_ofyour_Adobe_Campaign_server] -import:[target_file_name] -spec:[package_name_created_in_step_1] -verbose

Description of parameters used above:

  • instance_name_ofyour_Adobe_Campaign_server: the name of the Adobe Campaign instance. You can find the same under con directory of your server, i.e.,  in the config-[local_au].xml.
  • target_file_namethe file/SFTP location+filename, Which will be used to write the content of the package. You need to ensure that campaign system user has required permissions to write in the directory. This option will create the file automatically. So you need not provide an existing name.
  • package_name_created_in_step_1: the name of the package defined in step 1, we have used mcb:testPackage in the example.
  • verbose argument is used to get more details about command execution in the console.

Sample execution of the above command and its console output:

C:\root\nlserver\bin>nlserver package -instance:local_au -import:C:\root\backup\packages\testPackage.xml -verbose
11:37:29 > Application server for Adobe Campaign Version 6.1.1 (build 8757) of 24/07/2017
11:37:29 > Loading configuration for instance 'local_au'
11:37:29 > Starting 1 connection(s) on pool 'default local_au' (PostgreSQL, server='localhost', login='local_au:local_au')
11:37:29 > Library 'libpq.dll' loaded from 'C:\root\nlserver\bin\lib\pq.dll'
11:37:29 > Importing package 'C:\root\backup\packages\testPackage.xml'...
11:37:57 > Enumerating the file entities...
11:37:57 > Writing entities in the database...
11:37:57 > Saving data related to packages...
11:37:57 > Package 'mcb local_au Package': Saving entities of type 'nms:customer'...
11:37:57 > Package 'mcb local_au Package': Saving entities of type 'xtk:specFile'...
11:37:57 > Installation of packages successful.

Using Adobe Campaign nlserver module to export/import package:

It is exactly similar to this process except you can use nlserver module activity to execute this commands in a workflow and you can even use the scheduler to run these command periodically, i.e., automated way.

Examples of commands:

What is the command to list the absent modules in Adobe Campaign?

What is the command to list all modules in Adobe Campaign?

How to update/change the database password in Adobe Campaign?

I am confident that this article will help my fellow Developers and Architects to leverage command line interface to improve their productivity. Feel free to ask any question in the comments section.

Note: Commands are best suited for the experienced developer as there is no roll back.


Amit Kumar

Results driven Adobe Certified Architect with extensive experience managing and implementing marketing Strategies to drive business growth. Enjoy optimizing the customer experience through the use of data, futuristic thinking + channel mixing – e.g., using creative combinations of traditional methods + shiny new toys like automation platforms.

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *