Loading...

Knowledge Center


How to back up the ePolicy Orchestrator databases using OSQL commands
Technical Articles ID:   KB59562
Last Modified:  7/9/2018
Rated:


Environment

McAfee ePolicy Orchestrator (ePO) 5.x

Microsoft OSQL utility

Summary

This article describes how to back up an ePO database from the command line using OSQL commands.

Solution

IMPORTANT: These instructions are intended for use by database (DBA) and ePO administrators only. McAfee cannot assume responsibility for damages incurred by these instructions.
 
NOTE: As a precaution, the value databasename is enclosed in square brackets [databasename], in case the server name contains a hyphen or underscore (Examples: Server_1 or Server-1). If the server name does not contain either of these characters, the brackets are not necessary.

How to back up an ePO database using OSQL commands:
  1. See KB51465 to verify the authentication type and whether an instance name (if any) is being used:

    NOTE: If the Database server instance field shows an instance name, the server name\instance name must be included in the OSQL command.

  2. Click Start, Run, type cmd, and click OK.
  3. Type the appropriate command from the following list, and press ENTER:
     
    • SQL authentication without an instance name:
      osql -U <username> -P <password> -S <servername> -n -Q "BACKUP DATABASE [<databasename>] TO DISK = 'c:\<filename>.bak' WITH INIT,SKIP"
       
    • SQL authentication with an instance name:
      osql -U <username> -P <password> -S <servername>\<instancename> -n -Q "BACKUP DATABASE [<databasename>] TO DISK = 'c:\<filename>.bak' WITH INIT,SKIP"
       
    • NT authentication without an instance name:
      osql -E -n -Q "BACKUP DATABASE [<databasename>] TO DISK = 'c:\<filename>.bak' WITH INIT,SKIP"
       
    • NT authentication with an instance name:
      osql -E -S <servername>\<instancename> -n -Q "BACKUP DATABASE [<databasename>] TO DISK = 'c:\<filename>.bak' WITH INIT,SKIP"

      Example 1: If the ePO server name is TEST, and the login is sa with a password of test, the command to execute will resemble:
      osql -U sa -P test -n -Q "BACKUP DATABASE epo_TEST TO DISK = 'c:\msdebackup.bak' WITH INIT,SKIP"

      Example 2: If the ePO server name is test-server, and the login is sa with a password of test, the command to execute will resemble:
      osql -U sa -P test -n -Q "BACKUP DATABASE "epo_test-server" TO DISK = 'c:\msdebackup.bak' WITH INIT,SKIP"
       
  4. Verify the .BAK file has been created.
 

Rate this document

Beta Translate with

Select a desired language below to translate this page.

Glossary of Technical Terms


 Highlight Glossary Terms

Please take a moment to browse our Glossary of Technical Terms.