
Setting Up vFoglight 103
Backing Up, Upgrading, and Restoring vFoglight
SQL> @ <foglight_home>/scripts/sql/oracle_drop_db.sql
Note The files oracle_drop_dp.sql and oracle_drop_db.sql are included with vFoglight
when you use an Oracle database, The are located in the
<foglight_home>/scripts/sql directory.
or
• Execute the drop user command from the command line using the following
syntax:
drop USER <db_usr> cascade;
3
Create the new database using the following syntax:
sqlplus <dbadmin_usr>/<dbadmin_pwd>@<ORACLE_SID>
SQL> @ <path_to_sql_script>/oracle_create_db.sql
4
Import the database export file into the Oracle database using the following
syntax:
cd $ORACLE_HOME/bin
imp<db_usr>/<db_pwd>@<ORACLE_SID>
file=<export_filename>.dbdump full=yes
Note The “.dbdump” is the backup file you must create in order to restore your Oracle
database (see “To back up an Oracle database used by the vFoglight Management
Server” on page 92).
The Oracle database is now restored.
To restore a MySQL database from the database export file:
1
Log into the MySQL server machine.
2
Delete the database you are going to restore, so that all the tables in the database
are deleted (i.e., drop the database).
a
Log into the MySQL database and execute the following command:
mysql -u root
b
Execute the following SQL statement:
DROP DATABASE <database name>
3
After running mysql -u root, execute the following SQL statement:
CREATE DATABASE <database name>
4
After running mysql -u root, run the SQL script created by the backup. Use
the following syntax:
Comentarios a estos manuales