Dump the STA Database

Perform a full dump of the STA database on the current STA server.

  1. Display the size of your current STA database.
    1. Open a browser window and log in to STA.
    2. Click About in the Status Bar.
    3. In the About dialog box, scroll down to where the Database Current Size is displayed, and record the value.
  2. Verify that the location where you want to dump the database has sufficient space.
    1. Open a terminal session on the STA server, and log in as the Oracle user.
    2. Display the space available in the database dump destination, and verify it is sufficient for the dump file. The following example checks the space in /tmp.
      $ df -h /tmp
      Filesystem                        Size  Used Avail Use% Mounted on
      /dev/mapper/sta_server-STA_DbVol  200G   53G  243G  27% /
      
  3. Stop all STA processes:
    $ STA stop all
    
  4. Restart the MySQL server:
    $ STA start mysql
    
  5. Dump the STA database into a single file. Enter the database root user password when prompted. For example:
    $ mysqldump -u root -p --opt --add-drop-database --comments --complete-insert --dump-date --events --flush-logs --routines --single-transaction --triggers --databases stadb > /tmp/160115_SavedSTADatabase.sql
    Enter password: 
    $

    where:

    • -u root specifies the STA database root username.
    • -p indicates to prompt for the user password.
    • --flush-logs indicates to flush the MySQL server log files before starting the dump.
    • --databases stadb specifies the name of the database to dump.
    • /tmp/160115_SavedSTADatabase.sql specifies the name of the dump file to create. The name must end with .sql.
    • For descriptions of the other options, see the MySQL Reference Manual.

    Note:

    Do not use the --verbose command option, as it displays many messages in the terminal window and can significantly slow down the command process for large databases.

  6. Verify the dump file has been created, and note the size. You will use the size information in the next procedure. For example:
    $ cd /tmp
    $ ls -l 160115*sql
    -rw-r--r-- 1 oracle oinstall 3875509 Jan 15 14:05 160115_SavedSTADatabase.sql
    
  7. To reduce the dump file size by approximately 50 percent, compress the file. For example:
    $ zip 160115_SavedSTADatabase.sql
    $ ls -l 160115*gz
    -rw-r--r--   1 oracle oinstall 365282 Jan 15 14:34 160115_SavedSTADatabase.sql.gz