Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
Overview
Option 1: Creating a tar or zip Archive Option 2: Using the mysqldump Tool Option 3: MySQL Replication
Option 4: Oracle Data Pump Option 5:SQL Server Backup
Other Files and Directories to Backup

...

maxLevel2
minLevel2

...

Performing regular backups of your Uptime Infrastructure Monitor DataStore is a highly recommended practice. The DataStore is the Uptime Infrastructure Monitor backbone and holds all configuration information and historical performance data. This article outlines five common methods for backing up your DataStore. It is recommended to choose at least one of these methods to back up your Uptime DataStore. For added safety, you can implement more than one of the options below in case one of the methods should falter. Only one of the options below can be used to restore a backup; the methods cannot be merged when restoring the backup.Image Removed Note

Info

These backup methods are intended for a single Monitoring Station. Never attempt to merge two or more Monitoring Station configurations in a single database.

In addition to backing up the Uptime DataStore, it is also important to back up the Uptime configuration files and any customized files. Be sure to follow the recommendations in the Other Files and Directories to BackupBack up section at the bottom of this article.

...

...

Option 1: Creating a tar or zip

...

archive

One backup option is to regularly create tar or zip archives of your /datastore directory. This is the most straightforward method but requires Uptime Infrastructure Monitor to be stopped during the backup period.

To use this method, simply include the /datastore directory in the tar/zip archive. If you need to recover your DataStore from a tar/zip archive, ensure that all Uptime Infrastructure Monitor services are stopped and that you delete the existing /datastore files before extracting your archive.

  1. Stop the Uptime Infrastructure Monitor services. - Review Starting (or restarting ) and Stopping Uptime Infrastructure Monitor
  2. Archive the datastore directory.
    • On a Windows system:
      1. Locate the Uptime Infrastructure Monitor install directory (default C:\Program Files\uptime software\uptime).
      2. Archive the \datastore directory (using an archiving tool such as Winzip).
      3. Move the zip archive to another system or drive.
    • On a Unix system, enter the following commands:
      Code Block
      languagesql
      # cd /usr/local/uptime OR cd /opt/uptime 
      (depending on the OS)
    • 
      # tar -cvf uptime_backup.tar datastore 
      # gzip uptime_backup.tar


  3. Start the Uptime Infrastructure Monitor services. -Review Starting (or restarting) and Stopping Uptime Infrastructure Monitor

...

  1. stopping UIM

...

Option 2: Using the mysqldump

...

tool

mysqldump is a free utility included with the standard UIM MySQL database. This tool exports DataStore contents into a human readable .sql file that you can use to recreate your DataStore. The commands below detail how to export both configuration and performance data using mysqldump.

Info

The following sample commands are provided with the assumption that you are executing them from the UIM installation directory and that the default database access options are unchanged since installation. If any parameters changed, refer to your uptime.conf file for the correct port, user, password, and database access information.

The standard format for the mysqldump command is as follows:

Code Block
languagesql
Wiki Markup
\\
mysqldump is a free utility included with the standard Uptime Infrastructure Monitor MySQL database. This tool will export DataStore contents into a human readable .sql file that can later be used to recreate your DataStore. The commands below detail how to export both configuration and performance data using mysqldump.
\\
!worddav48b349cb6b49ea9a5426b008b97e0c8e.png|height=16,width=16! <span style="color: #333333"><strong>Note</strong></span>
<span style="color: #333333">The following sample commands are provided with the assumption that you are executing them from the Uptime Infrastructure Monitor installation</span> <span style="color: #333333">directory</span> <span style="color: #333333">and</span> <span style="color: #333333">that</span> <span style="color: #333333">the</span> <span style="color: #333333">default</span> <span style="color: #333333">database</span> <span style="color: #333333">access</span> <span style="color: #333333">options</span> <span style="color: #333333">have</span> <span style="color: #333333">not</span> <span style="color: #333333">been</span> <span style="color: #333333">changed.</span> <span style="color: #333333">If</span> <span style="color: #333333">any</span> <span style="color: #333333">parameters</span> <span style="color: #333333">have</span> <span style="color: #333333">changed,</span> <span style="color: #333333">refer</span> <span style="color: #333333">to</span> <span style="color: #333333">your</span> <span style="color: #333333"><em>uptime</em></span>
<span style="color: #333333"><em>.conf</em> file for the correct port, user, password and database access information.</span>
The standard format for the mysqldump command is as follows:
\\
mysqldump --single-transaction -u\[username\] -p\[password\] -P\[port #\] --protocol=tcp \[dbname\]
\\

By

...

adding

...

>

...

mybackup.sql

...

to

...

the

...

commands

...

below,

...

all

...

mysqldump

...

data

...

is directed

...

to

...

the

...

mybackup.sql

...

file.

...

Change the mybackup.sql

...

file

...

name

...

to

...

a

...

date-stamped

...

file

...

name

...

for

...

easy

...

reference.

Exporting your entire datastore

Code Block
languagesql

Exporting Your Entire DataStore
mysql/bin/mysqldump --single-transaction -uuptime -puptime -P3308 --protocol=TCPtcp uptime > mybackup.sql !worddav81a2f5861b9291cc8f3c6eaa1054bb9b.png|height=16,width=16! <span style="color: #333333"><strong>Note</strong></span>
<span style="color: #333333"><ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ca442062-98bf-46bb-bd74-f9755138c14b"><ac:plain-text-body><![CDATA[The \[dbname\]
Info

The [dbname] variable may be uptime_v4 if your database was created in Uptime Infrastructure Monitor 4.

...

Exporting Only Your Configuration Information

...

Exporting only your configuration information

In Uptime Infrastructure Monitor 7.2

...

or

...

later

...

there

...

is

...

the

...

feature

...

to

...

generate a problem report with configuration via the command line. You can schedule the execution of the command line problem report with a cron job or scheduled task.

Code Block
languagesql
 a Problem Report with Configuration via the command line. One can schedule the execution of the command line Problem Report with a cron job or scheduled task.
prexport \[-p\] \[-cN\] 
Options: 
-p to dump last hour of data 
-c dump historical configuration; N is number of months defaults to 3 months
\\

Alternatively,

...

here

...

are

...

the

...

configuration

...

tables:

Code Block
languagesql

mysql/bin/mysqldump -uuptime -puptime -P3308 --protocol=tcp
--ignore-table=uptime.erdc_decimal_data
--ignore-table=uptime.erdc_int_data
--ignore-table=uptime.erdc_string_data
--ignore-table=uptime.ranged_object_value
--ignore-table=uptime.performance_aggregate
--ignore-table=uptime.performance_cpu
--ignore-table=uptime.performance_disk
--ignore-table=uptime.performance_esx3_workload
--ignore-table=uptime.performance_fscap
--ignore-table=uptime.performance_lpar_workload
--ignore-table=uptime.performance_network
--ignore-table=uptime.performance_nrm
--ignore-table=uptime.performance_psinfo
--ignore-table=uptime.performance_sample
--ignore-table=uptime.performance_vxvol
--ignore-table=uptime.performance_who
--ignore-table=uptime.archive_delenda 
uptime > mybackup.sql

Exporting only your historical performance data

Code Block
languagesql

\\
Exporting Only Your Historical Performance Data
\\
mysql/bin/mysqldump -uuptime -puptime -P3308 --protocol=tcp uptime 
performance_aggregate
performance_cpu 
performance_disk 
performance_esx3_workload 
performance_fscap 
performance_lpar_workload 
performance_network 
performance_nrm 
performance_psinfo 
performance_sample 
performance_vxvol 
performance_who 
erdc_decimal_data 
erdc_int_data
erdc_string_data > mybackup.sql

Importing

...

your backup data

Info

Before importing data, you must stop the

...

UIM services. For more information, see the topic above regarding Creating a tar or zip Archive

...

.

To import your backup data, run the following command:

Code Block
languagesql
mysql/bin/mysql -q -f -u uptime -puptime -P3308 --protocol=tcp uptime < mybackup.sql

This process will attempt attempts to insert any non-duplicate data that is found in your mybackup.sql file. If you need to rebuild your database from scratch, run the resetdb utility before importing your backup file. This utility will erase ALL erases all of the data in your existing DataStore; be . Be absolutely sure that a full backup recovery is your best option before running this command.

Code Block
languagesql
resetdb really --nodata

...

Option 3: MySQL

...

replication

MySQL replication is the most complex backup method but is the most powerful for quick recovery. MySQL's built-in replication feature will maintain a completely up-to-date copy of your DataStore on another database instance (on the local system or a secondary server). This copy can be quickly set up to act as the primary DataStore in the event of a failure, or can be easily copied from the replication server to the primary server in the event of an outage.

Information on starting replication can be found at:Image Removed

  • MySQL Online Documentation: How to

...

...

...

...

Option 4: Oracle

...

data pump

If your DataStore is running on Oracle, you can use the Data Pump utility to export data from an Oracle database. Refer to the Oracle database utilities page for more information: Image Removed

...

Option 5: SQL Server

...

backup

If your DataStore is running on Microsoft SQL Server, you can use the SQL Backup tool to export data. Refer to the Microsoft Developer Network for more information:Image Removed

...

...

Other

...

files and

...

directories to

...

back up

The following files and directories listed in this section are not part of the DataStore but should also be backed up on a regular basis as well.

Code Block
languagesql
<uptime_dir>/license.dat

...


<uptime_dir>/UptimeDataCollector.ini (Windows OS)

...


<uptime_dir>/uptime.conf

...


<uptime_dir>/uptime.jcnf (Linux OS)

...


<uptime_dir>/apache/conf/httpd.conf

...


<uptime_dir>/apache/conf/php.ini (Linux OS)

...


<uptime_dir>/apache/php/php.ini (Windows OS)

...


<uptime_dir>/dashboards

...


<uptime_dir>/gadgets

...


<uptime_dir>/plugins

...


<uptime_dir>/scripts

...


<uptime_dir>/xml

If you have configured SSL browsing in Apache, don't forget remember to back up the cert files in the <uptime_dir>/apache/conf directory.

If you have added MIB files to the <uptime_dir>/mibs directory, you will want to should also back up those custom files up as well.