Oracle Backup Restore Ug
Oracle Backup Restore Ug
Oracle Backup Restore Ug
Restore Guide
PowerSchool Student Information Systems
Updated: July 29, 2021
Document Owner: Documentation Services
This edition applies to Release 20.4.0.0 of the PowerSchool SIS software and to all subsequent releases and modifications until
otherwise indicated in new editions or updates.
The data and names used to illustrate the reports and screen images may include names of individuals, companies, brands, and
products. All of the data and names are fictitious; any similarities to actual names are entirely coincidental.
PowerSchool SIS is a trademark, in the U.S. and/or other countries, of PowerSchool Group LLC or its affiliate(s).
Copyright © 2005–2021 PowerSchool Group LLC and/or its affiliate(s). All rights reserved.
All trademarks are either owned or licensed by PowerSchool Group LLC and/or its affiliates.
PowerSchool.com
Oracle Database Backup and Restore Guide
Contents
Introduction ...................................................................................................................................... 4
Terminology ........................................................................................................................................... 4
Understanding Oracle Backup and Recovery ....................................................................................... 6
Oracle 12c Migration Prerequisites ............................................................................................... 6
Backups .................................................................................................................................................. 6
Files Not Backed Up by Oracle ...................................................................................................... 7
Oracle File Structure .............................................................................................................................. 7
Disaster Recovery Concepts .................................................................................................................. 8
Backup .............................................................................................................................................. 9
Manual Backup .................................................................................................................................... 10
Datapumps .......................................................................................................................................... 10
Restore and Recovery ...................................................................................................................... 13
Data Replication to a Different Server using the Datapump Utility .................................................... 13
Administration................................................................................................................................. 14
Fast Recovery Area .............................................................................................................................. 14
Backup Retention Policies ................................................................................................................... 15
Removing Previous Server Information............................................................................................... 16
Configure Document Server ................................................................................................................ 16
Disable Production-Impacting Settings and Functionality .................................................................. 17
Oracle Jobs Email Settings ................................................................................................................... 17
Contents 3
Oracle Database Backup and Restore Guide
Introduction
This guide describes the backup and recovery process and the steps necessary to restore the
PowerSchool 12.x or later database server from a database datapump. For recoveries that require
restoring the RMAN backups or restoring to a point-in-time, contact PowerSchool Technical Support.
This guide is intended for PowerSchool system administrators. To use this guide, you must be familiar
with Windows Server 2012 R2 or Windows 2016 and the Oracle database. You must also have
PowerSchool 12.x or later installed and operating correctly.
Please refer to the appropriate section for step-by-step instructions.
Important Note: If your district uses Unified Classroom, do not use the Restore and Recovery process
listed in this guide. Contact PowerSchool Technical Support for specific instructions.
Terminology
The following table describes the terminology used in this document.
Term Definition
Flashback The PowerSchool SIS database no longer supports Flashback, but certain
Oracle functions such as datapump exports still utilize it.
Flashback is an optional feature of an Oracle database that is enabled by
default with the installation. Flashback is dependent on the amount of
undo data in the system. The undo data is what keeps track of the
changes made to the Oracle database. It recognizes which Oracle redo
logs, archive files, or backup sets hold the data for any given point in
time within the flashback retention period. The datapump export uses
Flashback to maintain table consistency and is set to a default retention
period of 24 hours.
Full Backup An operation that backs up all RMAN database files. Files are backed up
whether they have changed since the last backup. Also known as a Level
0 RMAN backup.
Note: Archivelogs are included in the backup and are deleted each time
a backupset is created.
Incremental Backup An operation that backs up only the database files that have changed
since a previous backup. Oracle supports nine different incremental
backup levels for file system backups. A differential incremental backup
copies data that changed since an incremental backup at the same or
lower level. Incremental backups are also referred to as Level 1 RMAN
backups.
Introduction 4
Oracle Database Backup and Restore Guide
Term Definition
Retention Policy The length of time that data in one or more backupsets (a set being a
full backup and all of its subsequent incremental backups) is not eligible
to be overwritten. Data can be restored to a point in time between the
current time moving backward bound by the retention policy window
(for example, the current date subtracts retention policy days).
Introduction 5
Oracle Database Backup and Restore Guide
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 the
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 make it possible to restore the
database in case of data loss due to hardware failure or user error.
This is a 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 archivelog 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
archivelogs.
Archivelogs are not reused; they are compressed into backup sets and deleted nightly. Each night, the
scheduled Oracle jobs back up all the day's archivelogs into backupsets (a set of backup files). Once the
archivelogs become part of the backupsets, the archivelogs are deleted from the file system.
By default, PowerSchool will keep 31 days of the backupsets. Oracle jobs that perform backups run
nightly. Once a week, a full backup is 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.
oracle\product\[Oracle Yes No
Version]\dbhome_1\NETWORK\ADMIN
oradata\[SID]\DATAFILE No Yes
oradata\fast_recovery_area\[SID]\backupset Yes No
oradata\fast_recovery_area\[SID] No Yes
Note: [SID] is the SID entered during the Oracle installation (commonly and by default PSPRODDB).
Backup
Backups (both RMAN and datapump) are automatically set and configured during the 12c installation
process. If email parameters were entered in your previous Oracle installation, they will be carried over
to your new installation.
If you need to change the email parameters, the Configure PowerSchool Backup Jobs configuration page
can be used. The email parameters entered determine who receives a notification when the full (RMAN)
backup has been completed.
A full backup is performed automatically by default every Saturday at 1:15 a.m. An incremental backup
runs nightly all other days of the week at 1:15 a.m. and will back up all data changed since the most
recent full backup. This backup includes reports added to the Enterprise Reporting application using the
Oracle Application Express (APEX) report builder but does not include reports created outside of
the Enterprise Reporting application. The backupsets and archivelogs that are compressed in the full
backup are located in the fast recovery area directory. The fast recovery area location is based on the
database layout configured during installation. For more information, see the Database Layout section
of the installation guide.
A datapump export is also completed as part of the nightly backup process. The datapump export runs
by default at 4:30 a.m. daily. The export is a complete backup of the database that includes table data,
object metadata, and control information. This back up also includes application 100 and 200 reports
added to the Enterprise Reporting application using the Oracle Application Express (APEX) report builder
by default but does not include reports created outside of the Enterprise Reporting application. This
backup provides a portable solution for restoring data and is located in the datapump directory which is
further explained in the Datapumps section of this document.
The Oracle jobs scheduler executes all of the backup scripts. An email notifies the designated
administrator when a full (RMAN) backup is completed and directs the administrator to check the log
output. The RMAN log files are available in the oracle\scripts\[SID]\backups folder. The datapump
export log files are available in the datapump directory
The default recovery span for the full backup is based on the retention policy and is set to a default of 31
days, which means that backups can be recovered up to 31 days in the past. These RMAN backup files
are maintained in the fast recovery area directory. The datapump export files and logs are retained for 7
days in the datapump directory.
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 Support's intervention.
There are several ways to back up PowerSchool's 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 a 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.
Backup 9
Oracle Database Backup and Restore Guide
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. PowerSchool recommends moving a copy
of the backup to a separate physical location such as an establishment that specializes in media storage.
Manual Backup
There are two types of RMAN backups generated through the Oracle Jobs. There is a full backup that is
run weekly and an incremental backup runs daily. In the backup set folder, the file names of the backups
are dated and either has an L0 (Level 0) in the file name for the weekly backup, or an L1 (Level 1) for the
incremental backup.
1. On Windows, open the Command Prompt.
2. Enter the following:
Datapumps
The datapump scripts rely on the datapump directory. The export script automatically exports files to
the datapump directory, and the import script automatically looks for files to import in that same
directory.
Datapumps are maintained for seven days. The datapumps are named based upon the day of the week
in which the export occurred. For every 10K students, allocate 25GB of additional disk space.
PowerSchool strongly recommends including these datapumps as part of your offsite backup strategies.
To disable this feature, set the PS.DAILY_FULL_EXPDP job to false in PowerSchool Administrator.
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\[SID]\data_pump_dir
Backup 10
Oracle Database Backup and Restore Guide
If two or more drives were selected for the database installation, the datapump directory is located on
the second drive in the same path listed above. For more information, see the Database Layout section
of the installation guide.
• [SID] is required. It is the SID entered during the Oracle installation (commonly and by
default PSPRODDB).
• [Filename] is required. It is the name you provide for the file that includes the export
dataset. The filename can be anything you choose in any format.
• [FLASHBACK/NOFLASHBACK] is optional. The default is FLASHBACK. NO_FLASHBACK
should not be used without assistance from PowerSchool Support.
• NO_APEX is optional. Without this parameter, Apex configuration data is exported with
the PS schema. If NO_APEX is present, then the Apex data is not exported, and any
existing Apex configuration will not be replaced when this datapump is imported.
NO_APEX should not be used without assistance from PowerSchool Support.
7. Press Enter/Return.
8. The datapump export is now in the folder [drive]:\oradata\[SID]\data_pump_dir.
Note: Previous days' datapumps can be backed up while the database is online.
Backup 11
Oracle Database Backup and Restore Guide
7. Enter [drive]: where [drive] is the drive on which the Oracle binaries are installed.
8. Press Enter/Return.
9. Enter cd \oracle\scripts.
10. Press Enter/Return.
11. If this server currently has a PowerSchool database installed, enter DropSchema.bat [SID] and
press Enter/Return.
12. Enter Import.bat [SID] [Filename] [Y/N] [ALL/DEFAULT]. If you are importing a datapump file on
to a test server, then use ImportTestServer.bat [SID] [Filename] [Y/N] [ALL/DEFAULT].
• [SID] is required. It is the SID entered during the Oracle installation (commonly and by
default PSPRODDB).
• [Filename] is required. It is the name of the datapump file that is in the
[drive]:\oradata\[SID]\data_pump_dir.
• [Y/N] is required. Y will delete production server connection information for
PowerSchool, PowerTeacher Gradebook, ReportWorks, and Document Attachments.
This is useful if the datafile originated from another server with different connection
information. For datafiles originating on the same server, a value of N will retain the
connection settings.
• [ALL] is optional. The default value is DEFAULT. DEFAULT only imports PS and
PS_MGMT. ALL imports all schema in the datapump. ALL should not be used without
assistance from PowerSchool Support.
Note: This setting will not disable email, SIF, or AutoComm/AutoSend events.
• For test servers, the ImportTestServer.bat script will disable common settings and
services from a live production server that should not typically be active on a test server,
such as Email, AutoComm, and AutoSend. This script is not installed if you are using
Oracle 12.1.0.2.
13. Press Enter/Return. The import process displays the progress on-screen as it works through the
import. Occasionally errors may be reported, some of which can be ignored. Review DB Import
Errors and Warnings to understand the errors that can occur during the import process, and
what actions may need to be taken.
14. On the application server, open the Microsoft Management Console, navigate to Services, and
then right-click on PowerSchool Message Service and select Restart from the pop-up menu.
15. On the PowerSchool Installer Configure Server page, click Start PowerSchool/PowerTeacher
Services. On the Confirmation page, click Confirm. PowerSchool/PowerTeacher Services are
started.
16. On the Configure Server Page, click Start ReportWorks Services. On the Confirmation page, click
Confirm. ReportWorks services are started.
17. On the application server, navigate to Program Files > PowerSchool and double-click
PowerSchool Installer.html to open the PowerSchool Installer.
18. Click Configure PowerSchool Backup Jobs and follow the on-screen instructions. Note:
Configure backup jobs on the database node.
Backup 12
Oracle Database Backup and Restore Guide
Administration
Administration 14
Oracle Database Backup and Restore Guide
Administration 15
Oracle Database Backup and Restore Guide
Administration 16
Oracle Database Backup and Restore Guide
4. On the next screen, verify your Document Server Storage Quota (In GB) value is correct.
5. Click Next.
6. On the next screen, click Confirm.
7. When Confirmation Required screen appears, select the appropriate value. If the previous
screens were verified properly, this should be Yes.
8. Click Confirm.
9. After PowerSchool restarts, sign in to PowerSchool.
10. Navigate to System > Special Operations.
11. Select Rebuild Document Attachment Metadata from Document Storage Server from the pop-
up menu.
12. Click Submit.
13. Click Rebuild.
Note: This process should only be done if the imported data is the same dataset as the last one
utilized. If the dataset is different, this process will orphan records that will need to be manually
reattached.
14. Click Confirm Rebuild.
Administration 17
Oracle Database Backup and Restore Guide
FROM address (rman_email_from), the TO address (rman_email_to), and the SMTP Server address
(smtp_out_server).
Administration 18