Backup Exec: Start a Backup Job from the Commandline


Today I found some information about the tool called bemcmd.exe. With this little tool you can run and create backup jobs in Symantec Backup Exec.

If you run bemcmd.exe /? >c:\bemcmd.txt a help file will be created. You can also download the file here: bemcmd.pdf

You can run a created job with the following command:

C:\Program Files\Symantec\Backup Exec\bemcmd.exe -o01 –j<backupjob>

image

As you can see, the backup job is started in Backup Exec.

image

Advertisements

8 thoughts on “Backup Exec: Start a Backup Job from the Commandline

  1. Frank

    Thanks this is fantastic. I had been trying to figure out a way to string jobs together (run one job when the other completes) and this works great. I am using this to run my SQL Truncate job as soon as my SQL Full backup job completes.

    Reply
  2. Anuj Kumar

    Thats really great.. I was looking for it since last 2 days. Strange that Symantec do not published about it much in users guide (or may be i missed to read).

    Reply
  3. Pingback: Veeam Backup and Symantec Backup Exec side by side « ICT-Freak.nl

  4. Bd2tech

    Hi,

    Can someone help me please. When I try to trigger a job in Symantec Backup Exec 12 from the command line using the bemcmd.exe I keep on getting a return value: -1

    I know this means the command didn’t trigger, but I can’t find out why it didn’t trigger

    The command I’m using is…

    C:\Program Files\Symantec\Backup Exec>bemcmd.exe -o01 -jBd2Testbackup

    RETURN VALUE: -1

    I can run the job manually within Backup Exec, but can’t seam to trigger it from the cmd.

    If someone could help me out it would me appreciated.

    Thanks in advance 🙂

    Reply
  5. Bd2tech

    Hi All,

    Just managed to figure it out….

    You have to exclude the net send with in the job.

    Problem
    Bemcmd -o1 returns “-1” when backup job is configured with notification recipients

    Solution
    Bemcmd -o1returns the output -1 when the following conditions are met:

    – In Backup Exec the Recipient Type “Net Send” has been configured.
    – Backup job has notification recipients configured.
    – Backup job in Backup Exec is on hold.
    – Command “bemcmd -o1 -j is executed.

    Event ID 57345 is recorded in the Windows Event Viewer with the following description:

    ********************************************************************************************
    Description:
    Database Exception Context:m_QueryTimeoutInSeconds=30
    sql={CALL DBO.SAVERECIPIENT(?,?,?)} Error:-536837662: :: -2147217900:
    The Job-Recipient relationship already exists in the database.
    :: DB Error Set 0: native=0x61040010 source=Microsoft OLE DB Provider
    for SQL Server hr=0x80040e14 The Job-Recipient relationship already
    exists in the database.
    ********************************************************************************************

    Looks like I might have to upgrade Backup Exec to 2010 😦

    Cheers!

    Reply
  6. James Cleverly

    i know this may not be the place for it, but is there anything like this the opposite way so .
    in the post command you can add C:\post.bat -%job%, the job being some data from backup exec you could do this manually for each job but it would be use for things like runtime of the job and condition. hope you see what i mean

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s