How do I back up my MailMarshal or WebMarshal database?


This article applies to:

  • Trustwave MailMarshal (SEG)
  • Trustwave ECM/MailMarshal Exchange
  • WebMarshal
  • Microsoft SQL Server

Question:

How do I back up my MailMarshal or WebMarshal database?

Procedure:

To back up your MailMarshal or WebMarshal database, you can use any of the following three options:

Option 1

Use Microsoft SQL Management Studio to back up the database. Please refer to the Microsoft documentation for these instructions.

  • For full licensed versions of SQL, you can automate backup with SQL scheduling (Maintenance Plans).

Option 2

Use the SQL osql command line utility along with transact SQL statements:

  1. Open the command prompt on your Microsoft SQL/MSDE Server.
  2. Enter the following commands:

    osql -U SA -P YOURPASSWORD
    BACKUP DATABASE DATABASENAME  TO DISK='c:\MMDBBackup.dat'
    go

    Command Options

    SA Specifies the default sa account. You can use any other account with backup permissions on the MailMarshal or WebMarshal database.
    YOURPASSWORD Specifies the password for the account.
    DATABASENAME Specifies the database to be backed up.
    MMDBBackup.dat Specifies the backup database file. Specify a unique descriptive name and a location with sufficient free space.

 

Option 3

Automate the backup process using a batch file and a SQL script.  The batch file will connect to the SQL server, and the SQL script will execute the transact SQL statements required for a backup.

  1. Create your batch file.
    1. Open notepad.exe.
    2. Save the file as MMDBBackupAutomation.bat.
  2. Enter the following text in the MMDBBackupAutomation.bat file:
     
    osql -S SERVERNAME -U SA -P YOURPASSWORD -i MMBackupScript.sql


    Command Options

    SERVERNAME Specifies the database server which hosts the database to be backed up.
    SA Specifies the default sa account or other account with backup permissions on the MailMarshal or WebMarshal database.
    YOURPASSWORD Specifies the password for the account.

    • Save the MMDBBackupAutomation.bat file.
    • Create your SQL script.
      1. Open notepad.exe.
      2. Save the file as MMBackupScript.sql.
    • Enter the following text in the MMBackupScript.sql file:

      BACKUP DATABASE DATABASENAME  TO DISK='c:\MMDBBackup.dat'
      go



      Command Options

      DATABASENAME Specifies the database to be backed up.
      MMDBBackup.dat Specifies the backup database file.
    • Save the MMBackupScript.sql file.
    • To run the backup, execute the batch file or schedule a task to execute the batch file using the Windows Task Scheduler.

     

    Notes:

    To restore the database at a later time, enter the following commands:

    osql -U SA -P YOURPASSWORD
    RESTORE DATABASE DATABASENAME  FROM DISK='c:\MMDBBackup.dat'
    go

    Related Articles:

    • Q10403: How do I manually force a purge of a SQL or MSDE database?
    • Q10410: How do I move my MailMarshal SQL or MSDE database to a new server?

    This article was previously published as:
    NETIQKB29284
    Marshal KB178

     

     


    Last Modified 4/1/2020.
    https://support.trustwave.com/kb/KnowledgebaseArticle10221.aspx