Managing Databases

This chapter contains the following sections:

Working with Databases

This section describes how to enable, start and stop, as well as backup and restore a database.

Stopping the Database

You can halt the mysql daemon (mysqld) by choosing the Stop Database option. This option stops all of the following Cisco services:
  • Broker

  • Controller

  • Eventmgr

  • Client

  • Idaccessmgr

  • Inframgr

  • Websock (VNC interface)

  • Tomcat

  • Flashpolicyd


    Step 1   From the Cisco UCS Director Shell menu, choose the Stop Database option.
    The following information is displayed:
    Do you want to stop database [y/n]? : y
    Stopping database...
    Database stopped.
         Stopping broker [PID=13113]/[Child=13115]
         Stopping controller [PID=13139]/[Child=13142]
         Stopping eventmgr [PID=13146]/[Child=13149]
         Stopping client [PID=13153]/[Child=13156
    13167
    13173]
         Stopping idaccessmgr [PID=13163]/[Child=]
         Stopping inframgr [PID=13170]/[Child=]
         Tomcat is running with [PID=13216]. Stoping it and its child process
         Flashpolicyd is not running
    Stopping websock[PID=13342]
    Database stopped
    Press return to continue ...
    Step 2   Choose Display Service Status option to verify that the Cisco services have been stopped on the database. The database status displays as down with no connections.

    Starting the Database

    You can start the mysql daemon (mysqld) by choosing the Start Database option.


    Note


    This option starts the appliance database only.



      Step 1   From the Cisco UCS Director Shell menu, choose the Start Database option.
      Step 2   Press Enter.
      The following information is displayed:
      Starting database...
      Database started.
      Press return to continue ...
      Note   

      The Cisco services are not started automatically when you start the appliance database. Choose the Start Services option to start the Cisco services.

      Step 3   Choose Display Service Status option to verify that the Cisco services have been started on the database. The database status displays as up and list the number of connections.

      Backing Up the Database

      You can backup the appliance database to an FTP server. Before you begin the backup process, you must first stop the Cisco services. To stop the services, choose the Stop Services option.

      You need the following information in order to execute the task:
      • FTP server's IP address (where the database is backed up)

      • FTP server's login credentials


      Note


      After the FTP credentials are provided, the entire database of the Cisco UCS Director appliance is backed up at the specified FTP location. You then can start the Cisco services by choosing the Start Services option.


      Before You Begin

      Stop the Cisco services by using the Cisco UCS Director Shell Stop Services option.


        Step 1   If you have not already done so, stop the Cisco services by using the Stop Services option. Refer to the Shell documentation about using that option.
        Step 2   From the Cisco UCS Director Shell menu, choose the Backup Database option.
        Step 3   Press Enter.
        The following information is displayed:
        Backing database......
        Backup will Upload file to an FTP server. Provide the necessary access credentials
        
           FTP Server IP Address: xxxx.xxxx.xxxx.xxxx
           FTP Server Login: 
        
        Step 4   Enter your FTP Server IP address and press Enter.
        Step 5   Enter your FTP Server login name and press Enter.
        Step 6   Enter your FTP Server password and press Enter.

        Messages appear to confirm the progress of your backup.

        Restoring the Database

        Before restoring the database, stop the Cisco services. To stop the services, choose the Stop Services option. Provide the following information in order to execute the task:
        • FTP server's IP address (from where the database is restored)

        • FTP server's login credentials

        • Restore filename

        • Confirm to restore


        Note


        After FTP credentials are provided, the entire database of the Cisco UCS Director appliance is restored from the specified FTP location. You can then start the Cisco services by choosing the Start Services option.



          Step 1   From the Cisco UCS Director Shell menu, choose the Restore Services option.
          Step 2   Press Enter.
          The following information displays:
           
          Restore database......
          Restore will recover file from an FTP server. Provide the necessary access credentials
          
             FTP Server IP Address:
             FTP Server Login: root
             FTP Server Password:
          
          Step 3   Enter your FTP server IP address and press Enter.
          Step 4   Enter your FTP server login and press Enter.
          Step 5   Enter your FTP server password and press the Enter.
          Step 6   Follow the onscreen prompts to complete the process.
          Step 7   Choose the Start Services option to restart the Cisco services.