Beruflich Dokumente
Kultur Dokumente
Guide
PowerSchool
Student Information System
Contents
Introduction ........................................................................................................... 4
Terminology ......................................................................................................... 4
Understanding Oracle Backup and Recovery .......................................................... 5
Backups ............................................................................................................... 5
Oracle File Structure .............................................................................................. 5
Disaster Recovery Concepts.................................................................................... 6
Backup ................................................................................................................... 7
Manually Initiating a Backup ................................................................................... 8
Datapumps........................................................................................................... 8
Restore and Recovery .......................................................................................... 11
Data Replication to a Different Server using the Datapump Utility ........................ 11
Administration ..................................................................................................... 12
Flash Recovery Area ............................................................................................ 12
Backup Retention Policies ..................................................................................... 13
Removing Previous Server Information .................................................................. 13
Modifying Oracle User Password ............................................................................ 14
Disabling Production-Impacting Settings and Functionality ....................................... 14
Oracle Jobs Email Settings ................................................................................... 15
Contents
Introduction
This guide describes the backup and recovery process and the steps necessary to restore
the PowerSchool 7.0 or later database server from a database backup created within the
previous seven days. For recoveries that require data older than seven days, or to restore
data to a different server, contact PowerSchool Technical Support.
This guide is intended for PowerSchool system administrators. To use this guide, you must
be familiar with Windows 2008 and the Oracle database. You must also have PowerSchool
7.0 or later installed and operating correctly.
Please refer to the appropriate section for step-by-step instructions:
Terminology
The following table describes terminology used in this document.
Term
Definition
Flashback
Full Backup
Incremental Backup
Retention Policy
Introduction
Backups
When you make a change in PowerSchool, modifying or creating data, the change is written
to the Oracle database. Oracle records the change to the database data file, and then writes
the change to another file called a redo log. Redo logs are also known as online logs, or
online redo logs.
Writing changes to both the data file and the redo log ensures that every change made to
the database is immediately backed up.
Redo logs make it possible to undo changes made to the database, and also make it
possible to restore the database in case of data loss due to hardware failure or user error.
This is a very simple overview of the core concept of backup and recovery in an Oracle
database. Oracle records and backs up every change to the database almost immediately.
There are five redo logs configured in the installation of Oracle with PowerSchool. Oracle
writes to each of them one at a time. When the current redo log reaches 512 megabytes in
size, Oracle stops writing to it and starts writing to the next redo log. When Oracle changes
to a new redo log, the previous redo log is backed up, to an archive log so the previous redo
log can be reused. Oracle cycles through the five redo logs, continuously reusing them and
backing them up over and over. Backed up redo logs are called archive logs.
Archive logs are not reused; they are backed up into backup sets and deleted nightly. Each
night, the scheduled Oracle jobs backup all the days archive logs into backup sets (a set of
backup files). Once the archive logs become part of the backup sets, the archive logs are
deleted.
By default, PowerSchool will keep 31 days of the backup sets. Oracle jobs that perform
backups run nightly. Once a week there is a full backup generated, and incremental backups
are made the other six days of the week. Incremental backups contain only the changes
made to the database since the previous backup.
The following tables list the directory locations for backing up Oracle data:
Windows
Directory Location
Online Backup
oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN
oracle\product\11.2.0\dbhome_1\database
oradata\[SID]\DATAFILE
oradata\fast_recovery_area\[SID]\backupset
oradata\fast_recovery_area\[SID]
Note: [SID] is the SID entered during the Oracle installation (commonly and by default
PSPRODDB).
Backup
Backups are automatically set and configured using the Configure PowerSchool Backup Jobs
link in the PowerSchool Installer. There are configuration options that you can change to
meet your needs.
During the Configure PowerSchool Backup Jobs configuration stage, the email parameters
are entered, which determine who receives notification that the backup has completed.
A full backup is performed automatically every Saturday at 1:15 a.m. An incremental
backup runs nightly at 1:15 a.m. and will backup all data changed since the most recent full
backup.
The Oracle scheduler executes the backup scripts. An email notifies the designated
administrator that a backup is completed and directs the administrator to check the log
output. Log files are available in the Flash recovery area. The Flash recovery area location is
based on the database layout configured during installation. For more information, see the
Database Layout section of the PowerSchool 7.x Upgrade and Installation Guide or the
Sybase to Oracle Migration Guide on PowerSource.
The default recovery span is 31 days, which means that backups can be recovered up to 31
days in the past.
Note: The steps outlined in this document address recoveries that require data from the
past seven days. Any recoveries older than seven days may require PowerSchool Technical
Supports intervention.
There are several ways to back up PowerSchools associated database files.
Online backups are created while PowerSchool and Oracle are running and
accessible.
With PowerSchool and Oracle running there are several directories to backup to
assure recovery in the event of disaster.
Important: If other Oracle related files are backed up while PowerSchool and Oracle
are online, possible data corruption can occur within Oracle tablespaces (datafiles)
resulting in the need for server downtime while PowerSchool Technical Support
repairs the database or recovers a backup from before the incident occurred.
Offline backups, or cold backups, are created while PowerSchool and Oracle are not
running and not accessible. All files can be backed up in offline status.
With both PowerSchool and Oracle not running, there are several directories to
backup. By backing up these directories, a snapshot is taken of archive (redo) logs,
flash recovery logs and the weekly and nightly backups that occur at 1:15 a.m.
every morning. These directories are locked while Oracle is running and the
operating system does not allow them to be backed up.
When generating offline or online backups, it is recommended that you copy the backups
from the nightly volume to a separate storage area in case of a disaster. Pearson
recommends moving a copy of the backup to a separate physical location such as an
establishment that specializes in media storage.
Backup
[Oracle binaries
drive]\oracle\scripts\[SID]\backup\ps_weekly_backup.bat
[Oracle binaries
drive]\oracle\scripts\[SID]\backup\ps_daily_backup.bat
3. Press Enter/Return.
4. Check the RMAN output log for any errors:
Datapumps
The datapump scripts rely on the data pump directory. The export script automatically
exports files to the data pump directory, and the import script automatically looks for files
to import in that same directory.
Seven days worth of data pumps are maintained. The data pumps are named based upon
the day of the week in which the export occurred. For every 10K students, allocate 25GB of
additional disk space. Pearson strongly recommends including these data pumps as part of
your offsite backup strategies. To disable this feature, set the PS.DAILY_FULL_EXPDP job to
false in PowerSchool Administrator.
The data pump directory is found in the following locations:
Windows
The drive location is dependent on the database layout selected during installation. If one
drive was selected for the database installation, the directory is located on that drive in the
following directory:
[drive]:\oradata\PSPRODDB\data_pump_dir
If two or more drives were selected for the database installation, the data pump directory is
located on the second drive in the same path listed above.
Backup
Backup
Backup
10
Remove any existing data on the target server (run the DropSchema script as
instructed in the How to Run a Datapump Import procedure in the Backup section).
Import data into the target server (see How to Run a Datapump Import in the
Backup section).
Configure Oracle Jobs through the Configure PowerSchool Backup Jobs link in
the PowerSchool Installer.
Modify the PS user password, if applicable (see Modifying Oracle User Permissions in
the Administration section).
The three scripts listed below are included in the Oracle installer to simplify the import and
export process. These scripts are located on the same drive on which the Oracle binaries are
installed (Drive 1). See How to Run a Datapump Export in the Backup section for details on
export.
[drive]:\oracle\scripts\Export.bat
[drive]:\oracle\scripts\DropSchema.bat
[drive]:\oracle\scripts\Import.bat
Two of the scripts execute the export or import of data. The DropSchema script deletes
existing schema, which is necessary when importing into an Oracle database with an
existing dataset.
11
Administration
How to Unlock the Database User Accounts
If you have been locked out of the database, a generic error stating that PowerSchool
cannot connect to the database appears. There are several reasons why this error occurs.
Use the following procedure to unlock the database user accounts.
1. On the database server, on the command prompt type sqlplus /@PSPRODDB as
sysdba
Note: If you used a Database SID other than PSPRODDB, substitute it in the above
command.
2. You are now logged into Oracle using local authentication. On the command prompt
type Alter user PS account unlock;
3. Press Enter.
4. Type Alter user PS_MGMT account unlock;
5. Press Enter.
6. Type exit
7. Press Enter.
Search the root of all the drives for oradata. This directory may contain a folder
called fast_recovery_area. The location is dependent on how many drives were
selected during the initial Oracle installation. The oradata directory may be located
on multiple drives, but only one of these directories will contain the
fast_recovery_area folder.
Administration
12
Note: If you do not perform this procedure, backup space on the server could reach
capacity limit, resulting in server downtime and the need for PowerSchool Technical Support
intervention.
1. Open the Command Prompt.
2. Enter sqlplus / as sysdba
3. Press Enter/Return.
4. Enter ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=[new_size];
(where [new_size] is the size decided on using the formula above). For example:
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=580G;
5. Press Enter/Return.
6. Enter Exit.
7. Press Enter/Return.
Administration
13
Installer. The Import.bat now requires a third parameter that takes a Y or N for cleaning
these settings.
For Example
Import.bat [SID] [Filename] Y: This command will clear tables. This will not disabled
Email, SIF, or AutoComm/AutoSend items.
Import.bat [SID] [FILENAME] N: This command will import data as it was exported from
your production server. This is not recommended for any test server.
Outgoing Email On the test server, select the hidden menu between the
PowerSchool and Help menus and select Set Email off and remove SMTP settings
from the following location to ensure that automatic and user-generated email is not
sent from the test environment:
Start Page > System Administrator > System Settings > Email Setup
Administration
14
Administration
15