How to Schedule an Automated Backup

This just in from a customer “can I schedule the backups?“You can schedule just about anything using MetaManager™ Command Line Interface. Instead
of managing several complex command line switches we developed a mechanism in MetaManager™
called MMX (MetaManager™ eXecution) files. In modules that support an Open and Save
button on the toolbar (see screenshot) you can Save an MMX file so that you
can later re-open the module where you left off. This is useful when you perform
a repetitive task in a module. In addition the MMX file can be fed in on the command
line to execute what had been set up in interactive mode. This allows you to design
what you want to do visually but then run it non-interactively. One of the benefits
of this approach is the MMX file contains the information about which IBM Cognos
Connection to use and assuming security has been saved for the connection it doesn’t
need to be passed in on the command line. This really simplifies setting up the
scheduled process.In order to backup from the command line you need to go into the Backup/Restore/Deploy
module, as normal, and drag the items that you want to make backups of over to the
backup pane. From there, specify where you want to store the archive, just like
you are doing it in interactive mode. I would strongly encourage you to use the
“Append Timestamp” option if you are planning on saving the backups for more than
just the previous day or else you risk overwriting your files each time it is run.
Instead of clicking the “Backup” button you will instead click on the “Save” icon
on the toolbar to save these settings as an .mmx file.Once you have the .mmx file created, you will be able to schedule your job to run.
In order to run the Backup/Restore/Deploy module from the command line the minimum
you would need to include is below:

 

ControlPanel.exe -run -f=””

Insert the path to wherever you saved your .mmx file after the -f flag, ensuring
that it was placed in quotes and the ControlPanel.exe is the MetaManager™ executable.
To test the MMX file you can simply right click on it and choose the option “Run”.

There is a whole section in the MetaManager™ User’s Guide that provides more information
on the different flags that you can use with the command line. Here is an excerpt
from the documentation for the command line switches.

-open Specifies that the –f file should be opened in MetaManager™ in interactive
mode.

-run Specifies that the –f file should be ran in MetaManager™ in command line
mode.

-f=”filename” Specifies the .mmx file to open or run -o=”filename” Specifies
the name and location of the output results xml file. If this parameter is omitted
a file in the same location of the mmx file with be created with the same name of
the mxx file but with a .xml extension.

-hd=”domain” Specifies the HTTP Domain to be used for HTTP Basic Security
(used in conjunction with –hu and –hp) -hu=”username” Specifies the HTTP Username
to be used for HTTP Basic Security.

-hp=”password” Specifies the HTTP Password to be used for HTTP Basic Security.

-n Specifies a Cognos Namespace to log into before processing. Only a single
namespace can be used on the command line. To log into multiple namespaces create
a connection in interactive mode and save multiple logon credentials.

-u Specifies the Username to use when logging into the –n namespace.

-p Specifies the Password to use when logging into the –n namespace.

-d Specifies that a dataset file should be created when processing is complete.
The name of the dataset file will be the same as the input mmx file with “_dataset.xml”
appended to the end of the filename. -d=”filename” Specifies that a dataset file
should be created when processing is complete. The name and location of the dataset
file is supplied as filename. This is useful when the dataset file is being used
as a datasource and running MetaManager™ should update the dataset file that Cognos
is pointing to.