Introduction
The TPP backup feature backs up all TPP data folders on to a storage device which can be used to recover data in case of problems with the TPP server. TPP data folders include TPP server data, the Apache Tomcat data, and the MySQL database. The backup feature provides options to backup all or a subset of this data. With the release of TPP version 4.2, live backup is possible without taking the servers off line. The backup process creates a log file which can be used in case of failure to figure out where the error has occurred.
Table of Contents
Introduction ... 1
Table of Contents ... 1
Backup Processes ... 2
I. Auto Schedule using the TPP Web Client ... 3
II. Auto Schedule using TaskScheduler.bat... 7
III. Scheduling using Microsoft scheduler in Windows ... 11
IV. Running TPPServerBackup from Command Prompt ... 16
V. Recover Database from Live Backup ... 18
VI. Recover Database, configuration, and Meters_Home from Non-Live Backup ... 20 VII. Example TPP 4.7/4.8 (on a 32 bit Server) upgrade to TPP 5.0 (on a 64 bit Server)
Backup Processes
There are different ways to perform backups with TPP. The first 2 are the most commonly used. They are all outlined below:
• Schedule an auto backup for TPP, Tomcat and a live or non-live backup for MySQL
with the TPP web client. Scheduling an auto non-live backup may interrupt the application as the servers are shut down during the process. It is recommended to use live backups.
• Perform a backup during a TPP upgrade as recommended during a prompt.
• Execute the TPPServerBackup.bat script in this directory (the bin directory of your
TPP install) typically located in the "c:\Program Files\JDSU TPP\bin". (or c:\Program Files\Acterna FDM-250\bin.) When executing this with no parameters, the script will give you instructions on usage.
• Execute the TPPServerBackup.bat script regularly. Each execution of this script will
restart the TPP, Tomcat, and MySQL Servers. It is recommended to use the live backup option to backup the MySQL database without taking the server down.
• Auto Scheduling using Microsoft Scheduler.
Note:
It is recommended that the Apache Tomcat service should not be terminated at any time for the TPP application to run properly. If there is a need to terminate the Apache Tomcat service, always use the Control Panel to stop and restart it. Do NOT use the “End
Process” command via the Task Manager to terminate Apache Tomcat. If there is a scheduled backup process running, using “End Process” to terminate Apache Tomcat will not terminate the backup process.
I. Auto Schedule using the TPP Web Client
Using the TPP web client, it is easy to schedule the process for backups and database optimization. This is the recommended method.
Define the backup destination directory, number of backup copies to save before overwriting the last one, what directories need to be backed up, and the start and end dates for the backup jobs.
It is very flexible to edit or delete the old backup copies and view log files for backups. The Web client displays the status, cause of failure if any, last date when the job was run and the next scheduled date when the job will run. It gives you complete information necessary to run backups.
The following are the steps to schedule the automatic backups in the Web client.
1) Login to the TPP Web client and click on the “system preferences” link in the left panel.
3) Click on the “ADD” link at the top.
4) Fill in the form and click on “Save”. a) Task Name: - Name for Backup
b) Backup Destination Directory: - Directory to store backups c) Select one of the following radio buttons.
Note: Choosing the “Delete ArchiveWorkOrderReports Files” or “Delete TPP and Tomcat Log Files” options will permanently delete the respective files from your server. Use these options when you are absolutely sure that you no longer need these files. These files can be restored only if you have also chosen the “Backup ArchiveWorkOrderReports Files” and “Backup TPP and Tomcat Log Files” options.
e) Frequency: - How often do you want the process to run?
f) Time of Day: - What time of day do you want the process to run? g) Scheduled Start Date: - The start date of the scheduled backup.
h) Scheduled End Date: - The end date of the scheduled backup. If blank, it runs for ever.
i) Check Disk Space upon Save – Whether TPP should check if sufficient disk space is available now (when “Save” is clicked”) for taking the specified future backup.
j) Click on “Save” at the bottom when you are done.
If changes are necessary to the scheduled backup process, click on the “Edit” link in right most column in the job row. Click on “Delete” link in right most column in the job row to delete a scheduled backup job. Click on the “View Log” link to see the log files for a backup job.
II. Auto Schedule using TaskScheduler.bat
Note: For some Windows XP Home versions, TaskScheduler.bat doesn’t work as XP Home doesn’t allow you to schedule commands from the command prompt. Use step II instead.
1) The “bkup.properties” file should exist in the directory from where the script is launched or in the same folder as TaskScheduler.dat. If the property file is empty then the script runs with default options. Enter the following in the bkup.properties file:
TASK_NAME=JDSU TPP Backup
TASK_PATH=c:\program files\JDSU TPP\bin
(In case of upgrade setups it could also be TASK_PATH=C:\TPP\Acterna FDM-250\bin)
You can change the task name to anything you like and make sure the task path is a full path to TPPServerBackup.bat. If the properties file is not present then the script will use the above mentioned defaults.
2) At the command line run the following to schedule a task
TaskScheduler.bat -create
When the above command is executed, the script prompts you to enter your logon password. Enter your password. By default the task will be associated with the logged-in user. Make sure you have necessary privileges to run the task.
Running this command will auto schedule the TPP backup process for daily backups. If you like to schedule jobs other than daily basis then follow the steps outlined in “Scheduling using Microsoft scheduler”.
3) To delete a scheduled task run the following command
TaskScheduler.bat –delete
The name of the task is read from the bkup.properties file and the file should be in the same folder as the script. If no properties file is present, the script tries to delete the task with the default name “JDSU TPP BACKUP”.
1.
Scheduling a Task
To open Scheduled Tasks, click Start, then Settings. Point to Control Panel, and then click Scheduled Tasks.
To schedule a new task:
1. Double-click Add Scheduled Task to start the Scheduled Task Wizard, and then click Next in the first dialog box.
2. The next dialog box displays a list of programs that are installed on your computer, either as part of the Windows XP operating system, or as a result of software installation.
Use one of the following procedures:
1. If the program that you want to run is listed, click the program, and then click Next.
2. If you want to run a program, script, or document that is not listed, click Browse.
Click the folder and file that you want to schedule, and then clicking Open shows the following window.
•Daily •Weekly •Monthly •One time only
•When my computer starts (before a user logs on) •When I log on (only after the current user logs on)
Click Next, specify the information about the day and time to run the task, and then click Next.
4. Note that the information about the day and time to run the task vary
depending on the selection that you made in the previous wizard dialog box. For example, if you chose Weekly, you must indicate the day of the week, the time, and if the task should run every week, every 2 weeks, every 3 weeks, and so on.
5. Type the name and password of the user who is associated with this task. Make sure that you choose a user with sufficient permissions to run the program. By default, the wizard selects the name of the user who is currently logged on.
6. Click Next, and then click Finish after you verify the choices that you have made.
III. Scheduling using Microsoft scheduler in Windows
1.
Start Task Scheduler service if not running
Before scheduling a task make sure the “Task Scheduler” windows service is running, if not do the following.
Click Start, then Settings. On Control Panel, click on System and Maintenance and click on Administrative Tools. Go to “Start Task Scheduler service if not running” above and follow from step 1.
2.
Scheduling a Task
To open Scheduled Tasks, click Start, and select Programs. Point to Accessories, and on System Tools, click on Task Scheduler.
Click on “Task Scheduler Library” in the left panel in the opened wizard. In the right panel, click on “create task” and the following wizard opens.
Enter a name for a task, for example “JDSU TPP Backup” and select the option “Run whether the user is logged in or not”.
Click on the “Triggers” tab in the above wizard. When a wizard opens, click on the “new” button at the bottom. The following wizard should open.
Select how you want the task to run daily, weekly or monthly. Select start date and time. Select check box “stop task if it runs longer than” and select “12 hours” from drop down to the right. Select “Enabled” check box and click on ok. Click on “Action” tab and click on “new” at the bottom. The following wizard opens:
Browse to the bin directory under JDSU TPP install location and select “TPPServerBackup.bat” script. Usually it should be in “c:\Program
Files\JDSU TPP\bin\” (or c:\TPP\Acterna FDM-250\bin\) directory. Click on ok.
Click on “ok”.
Type the name and password of the user who is associated with this task. Make sure that you choose a user with sufficient permissions to run the program. By default, the wizard selects the name of the user who is currently logged on.
IV. Running TPPServerBackup from Command Prompt
1. Using the properties file
The “bkup.properties” file should exist in the directory from where the script is launched or in the same folder as TPPServerBackup.dat. If the property file is empty then the script runs with the default options. If the script does not find
bkup.properties file in any of the above mentioned locations then it stops. The following are the keys that a bkup.properties file can have:
TPP_DIR=c:\Program Files\JDSU TPP
(Previous release TPP_DIR=c:\TPP\Acterna FDM-250)
MYSQL_DIR=c:\Program Files\MySQL\MySQL Server 5.5 WINDOWS_DIR=c:\WINDOWS
BACKUPPREFIX_DEF=c:\Program Files\JDSU TPP
(Previous release BACKUPPREFIX_DEF=c:\TPP\Acterna FDM-250) BACKUPMID_DEF=-DB_Backup BACKUPSTOSAVE_DEF=7 DO_TPP=0 DO_TOMCAT=0 DO_MYSQL=1 DO_WINDOWS=0 DO_LIVEBACKUP=1 DO_DBOPTIMIZE=0 TPP_LOG=c:\temp\backup.log
For MySQL live database backup enter the following in bkup.properties
DO_MYSQL=1
DO_LIVEBACKUP=1
For DBOptimization enter the following in bkup.properties DO_DBOPTIMIZE=1
Execute the TPPServerBackup.bat script DO_ARCHIVEWORKORDER=1 DO_PURGEWORKORDER=1 DO_ARCHIVELOGS=1 DO_PURGELOGS=0 ARCHIVEWORKORDERDAYS=30 PURGEWORKORDERDAYS=30 ARCHIVELOGSDAYS=30 PURGELOGSDAYS=30
TPPServerBackup.bat –bkpProp “C:\temp\bkup.properties”
2. Using command line
TPPServerBackup.bat –mysql “C:\program files\MySQL\MySQL Server 5.5” – liveBackup
I.
Optional Solutions
1. Using MySQL Administrator to schedule backup.
This option will backup the MySQL database only. You cannot do a backup of the file system. You cannot backup the property file or Meters_Home with this option.
2. Auto Backup for MySQL by swordsky software (Not supported by JDSU) Auto Backup for MySQL is a powerful Windows program that makes it easy to schedule the backing up and restoring of your remote and local MySQL
databases. It's easy to back up one or many MySQL databases, and restore them to the same server, or to any server.
http://www.swordsky.com/pro_edition.html
3. Vembu StoreGrid (Not supported by JDSU)
Vembu StoreGrid is Disk to Disk (D2D) data backup software primarily used for online backups. When you installed StoreGrid in Windows, StoreGrid automatically starts as a Windows Service or a Windows Application (default option) depending upon the option you chose during the installation.
V. Recover Database from Live Backup
WARNING: this chapter does not describe the Meters_Home, cfg, and OTHER file restoration, that is described in the next chapter. This should be done before restarting the TPP server at the bottom of this page.
If the live backup option in the web client is selected or the “liveBackup” option is used with TPPServerBackup.bat, restore the database from the database.sql file.
NOTE: this assumes a running MySQL installation. In order to restore your MySQL installation or create a new MySQL data directory, you can run the TPP installer to “upgrade” to the same version while selecting the MySQL install option. An upgrade will give an error if a previous data directory is not found, but will still successfully create one.
1) Select Start -> Control Panel. Double click on Administrative Tools, then on Services.
NOTE: Meters cannot synchronize with TPP while the server is shut down. 2) Select Apache Tomcat and press the stop icon. The TPP service will be stopped. 3) There is no need to stop the MySQL server, though restarting MySQL is needed if
restoring the my.ini file is done as described in the next chapter. 4) Go to the bin directory in the MySQL install folder.
5) For example if MySQL is installed at c:\Program Files then go to a. C:\Program Files\MySQL\MySQL Server 5.5\bin>
6) At the prompt run the following command
mysql –uroot < “FILE_PATH\database.sql”
The * FILE_PATH is the full path to backup folder that has the database.sql file.
Restart the TPP server To restart the server
VI. Recover Database, configuration, and
Meters_Home from Non-Live Backup
Shut down the TPP and MySQL servers
1) Select Start -> Control Panel. Double click on Administrative Tools, then on Services.
NOTE: Meters cannot synchronize with TPP while the server is shut down. 2) Select Apache Tomcat and press the stop icon. The TPP service will be stopped. 3) Select MySQL and press the stop icon. (non-live backup specific step)
4) Locate the latest good backup folder containing your TPP data.
5) Locate the various BACKUP directories (folders) that were saved to a safe location.
NOTE: DO NOT accidentally delete these folders in following steps.
The TPP version for the backup must match the TPP version for the current installation.
Replace the Meters Home and cfg directories (if needed)
The Meters_Home folder mostly contains configuration files and firmware deployments deployed from the TPP Web Client that haven’t been synchronized yet for certain meters. Restoring it should be done when doing a server move. It is the administrator’s choice if restoring it from a backup should be done when there exists a newer last-active version with newer deployments (e.g. after a harddrive failure that may have affected other data). If not restoring this, then it is recommended to re-deploy important and/or recent deployments, like channel plans and limit plans, to all meters.
The cfg folder contains many files:
• Only cfg file to restore for most users:
o configuration.properties
• Files containing system defaults that are never customized (no need to
restore over a fresh install): o channelplan folder o default_limitplan folder o examples folder
o FDM-250.lic (license file installed during an install)
o webapp.properties (contains values that shouldn’t be upgraded upon a server move)
o windows.properties (contains a value that shouldn’t be upgraded upon a server move)
• File automatically created upon every TPP startup:
o mysql.info
1) In the JDSU TPP folder (or Acterna FDM-250 folder), move any files or folders located within the Meters Home and cfg directories (folders) to a tmpSave directory. The placement of the JDSU TPP (Acterna FDM-250) folder was determined when TechComplete™ Test Productivity Pack was installed. It is typically located in the C:\Program Files folder. (An upgrade from TPP v4.8 may have placed this file in the C:\TPP directory.)
2) COPY the BACKUP Meters Home and cfg directories (folders that you formerly copied to a safe location) into its original location within the JDSU TPP (or Acterna FDM-250) folder.
NOTE: When copying over a folder that already exists with the same name, you may be required to overwrite the existing folder with the new [backup] folder.
Replace the Database directory (non-live backup specific step)
1) It is critical that the MySQL service is stopped (as described at the top of this chapter) whenever copying files in to or out of the MySQL data directory.
2) In the MySQL Server 5.5 install folder, delete ALL files and folders located within the data directory (folder) or move to a temporary folder outside of the data directory. The data directory location above is assuming your installation left the datadir property unchanged in your my.ini configuration file located in the OS install folder, typically c:\Windows.
3) COPY the BACKUP directories into their original location within the data folder.
Replace OTHER files
In the BACKUP folder, there are other files that may contain customizations for some customers.
1) The WorkOrderReports folder may contain unparsed CMRS billing system files that typically belong in C:\Program Files\JDSU TPP\WorkOrderReports or
C:\TPP\Acterna FDM-250\WorkOrderReports. Files in this folder are usually parsed by TPP every 2 minutes and removed, so it is rare for files to be in this backup folder.
2) The windows folder may contain the my.ini MySQL configuration file that typically is located in C:\Windows. JDSU only supports 2 customizations to this file, so many customers do not need to restore this upon a server move:
a. A manually moved MySQL data directory is supported via changing the datadir property.
b. The “system preferences” – “database configuration” allows enabling “Remote SQL Access” by removing the bind-address property from this file.
3) The tomcat folder may contain various configuration files that typically are located in various folders within c:\Program Files\Apache Software
Foundation\Tomcat 7.0.
a. It is important to restore all of the following, when the hostname/IP address have not changed, so users don’t have to re-install the certificate used for logging in to TPP Web. These are located in the tomcat\conf backup folder.
i. In particular the certificate file “ActernaTPP.p12” which needs to be placed in the conf directory within the tomcat installation directory.
ii. Also the file “jdsu.cer” which needs to be placed in the following directories within the tomcat installation directory.
1. conf
2. webapps\ActernaTPP
Note: there is a duplicate backup copy of this file in the tomcat\webapps\ActernaTPP backup folder.
b. It is very important to restore the following at sites using Secure Sync™ with meter certificates. Not restoring this will invalidate all meter certificates for the site, thus preventing the meters from synchronizing outside of the internal company Internet until all of the meter certificates are regenerated via TPP Web and the meters do a sync on the internal network.
i. The certificate file “ActernaTPP_certPort.p12” needs to be placed in the conf directory within the tomcat installation directory.
all files available at the time the backup occurred.
Restart the TPP server To restart the server
1) Select Start>Control Panel; Double click on Administrative Tools; Double click on Services.
2) Select MySQL and press the start icon. (non-live backup specific step)
VII. Example TPP 4.7/4.8 (on a 32 bit Server) upgrade to
TPP 5.0 (on a 64 bit Server)
Note: reviewing the previous chapter is recommended, since it has some additional details.
1) Working with your IT, upgrade the Java JRE browser plug-ins for your TPP Client users. This is needed if your users don’t meet the new minimum (1.6.0_33) and/or recommended (1.7.0_17) version as seen in the TPP 5.0 release notes. This upgrade will be needed to use the Remote DSAM
application and view certain measurement file graphs in TPP Web, including those graphs in Home Certification files. Note: TPP 4.8 is not compatible with 1.7 JREs, so it may be better to delay this step until later.
2) To reduce downtime, it is recommended to setup a new server. Server specifications can be found in the TPP/FDM-250 Getting Started Guide, including which 64 bit operating systems are supported.
a. Configure the AntiVirus as specified in the TPP Release Notes. b. Configure the Server Firewall allowing connectivity as described in
the Secure Sync™ Application Note.
3) Send an e-mail request to [email protected] to get your previous TPP license file converted to work with the new server. You will need the MAC address of your new server for this request.
4) Install TPP 5.0 on the new server:
5) Assuming you’ll later change the new server’s IP Address and hostname to match the old server’s values:
6) If your TPP Web users refer to your old TPP server by multiple hostnames and/or IP Addresses, then specify those in the installer when prompted. It is important for all names and addresses be registered when creating the login page’s certificate due to browser TPP/SSL login requirements. Note: localhost and 127.0.0.1 don’t have to be specified, as they are automatically included for new certificates.
7) Otherwise, use the hostname or IP Address value previously specified (see the webapp.properties file from your old TPP’s cfg folder) when prompted by the installer. For this scenario, restore the ActernaTPP.p12 and jdsu.cer file (as previously described) after the install is complete.
8) If enabled on the old server, use the “system preferences” – “database configuration” page to enable “Remote SQL Access”
9) Stop the Apache Tomcat Service (which runs TPP)
10)Install the configuration.properties and ActernaTPP_certPort.p12 files as previously described.
Using ID=administrator and Password=fdm250 ii. Stop the Apache Tomcat Service and then MySQL iii. Warn meter and web users of the server downtime.
iv. Stop the fdm250service and then MySQL services on the old server
v. It is also recommended to disable those Windows Services to prevent accidental usage of this server again.
vi. Copy the MySQL data folder and TPP Meters_Home folder from the old to new server, keeping in mind that the old default install locations (in c:\TPP) differ from the new default locations (in c:\Program Files).
vii. Ensure that the folders did not get the Read-only attribute set during the copy
viii. It is critical that the MySQL service is off on both servers during the copy
ix. Turn off / Shutdown Windows on the old server (needed for the next step)
12)To avoid changing the TPP sync server configuration setting on all meters, we recommend changing the new server IP address and hostname to match the old server. This is also a convenience for all of the TPP web client users.
13)Start the MySQL and then the Apache Tomcat services on the new server. This may take time to upgrade to the 5.0 schema. It could be hours for a large database.
14)Test a web client login (as previously done), but using a login that was valid on the old server.
15)Test meter sync:
a. On the internal company network
b. On the internet to confirm the firewall, routing, and TPP Secure Sync™ certificates still work for meters out of the office.
16)Inform meter and web users of the upgraded server being back up with the same IP Address and hostname. Web users may have to install a new login-page certificate depending on the previous decisions made for hostnames and IP Addresses. Inform users that their thick clients (TPP 4.8 desktop application) has been replaced by the TPP Web Client. Give them the URL and ask them to make a favorite (bookmark) for it.
17)Work with IT to uninstall the JDSU TPP 4.8 Client (the thick client) from all applicable PCs. Some thick client users may have use the Applet launched thick client, so will not need to uninstall.