You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Article Contents

\n \n \n
\n

Overview

\n

Performing regular backups of your up.time DataStore is a highly recommended practice. The DataStore is the up.time backbone and holds all configuration information and historical performance data. This article outlines five common methods for backing up your DataStore.

\n \n

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

\n \n
\n

Option 1: Creating a tar or zip Archive

\n

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

\n \n

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 up.time services are stopped and that you delete the existing /datastore files before extracting your archive.

\n \n
    \n
  1. Stop the up.time services. \n

    On a Windows platform, stop the following Windows services in the specified order:

    \n

    \n net stop "up.time Web Server"
    \n net stop "up.time Data Collector"
    \n net stop "up.time Data Store" \n

    \n

    On a UNIX platform, run the following commands in the specified order to stop the up.time services:

    \n

    \n # /etc/init.d/uptime_httpd stop
    \n # /etc/init.d/uptime_core stop
    \n # /etc/init.d/uptime_datastore stop

    \n
  2. \n
  3. Archive the datastore directory. \n

    On a Windows system:

    \n
      \n
    1. Locate the up.time install directory (default C:\Program Files\uptime software\up.time).
    2. \n
    3. Archive the \datastore directory (using an archiving tool such as Winzip).
    4. \n
    5. Move the zip archive to another system or drive.
    6. \n
    \n

    On a Unix system, enter the following commands:

    \n

    \n # cd /usr/local/uptime OR cd /opt/uptime
    \n (depending on the OS)
    \n # tar -cvf uptime_backup.tar datastore
    \n # gzip uptime_backup.tar

    \n
  4. \n
  5. Restart the up.time services. \n

    On a Windows platform, start the following Windows services in the specified order:

    \n

    \n net start "up.time Data Store"
    \n net start "up.time Data Collector"
    \n net start "up.time Web Server"

    \n

    On a UNIX platform, run the following commands in the specified order to start the up.time services:

    \n

    \n # /etc/init.d/uptime_datastore start
    \n # /etc/init.d/uptime_core start
    \n # /etc/init.d/uptime_httpd start

    \n
\n \n
\n

Option 2: Using the mysqldump Tool

\n

mysqldump is a free utility included with the standard up.time 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.

\n \n

NOTE: The following sample commands are provided with the assumption that you are executing them from the up.time installation directory and that the default database access options have not been changed. If any parameters have changed, refer to your uptime.conf file for the correct port, user, password and database access information.

\n \n

The standard format for the mysqldump command is as follows:

\n

\nmysqldump --single-transaction -u[username] -p[password] -P[port #] --protocol=tcp [dbname]

\n \n

By adding > mybackup.sql to the commands below, all mysqldump data will be directed to the mybackup.sql file. The mybackup.sql file name should be changed to a date-stamped file name for easy reference.

\n \nExporting Your Entire DataStore \n

\nmysql/bin/mysqldump --single-transaction -uuptime -puptime -P3308 --protocol=TCP uptime > mybackup.sql \n

\n \n

Note: The [dbname] variable may be uptime_v4 if your database was created in up.time 4.

\n \n
Exporting Only Your Configuration Information \n

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

\n \n
Exporting Only Your Historical Performance Data \n

\nmysql/bin/mysqldump -uuptime -puptime -P3308 --protocol=tcp uptime
\nperformance_aggregate
\nperformance_cpu
\nperformance_disk
\nperformance_esx3_workload
\nperformance_fscap
\nperformance_lpar_workload
\nperformance_network
\nperformance_nrm
\nperformance_psinfo
\nperformance_sample
\nperformance_vxvol
\nperformance_who
\nerdc_decimal_data
\nerdc_int_data
\nerdc_string_data > mybackup.sql

\n \n
Importing Your Backup Data \n \n

NOTE: Before importing data, you must stop the up.time services (see steps outlined in the Creating a tar or zip Archive section).

\n \n

To import your backup data, run the following command:

\n

\nmysql/bin/mysql -q -f -u uptime -puptime -P3308 --protocol=tcp uptime < mybackup.sql

\n \n

This process will attempt 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 data in your existing DataStore; be absolutely sure that a full backup recovery is your best option before running this command.

\n

\nresetdb really --nodata \n

\n \n
\n

Option 3: MySQL Replication

\n

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.

\n \n

Information on starting replication can be found at:

\n \n \n \n
\n

Option 4: Oracle Data Pump

\n

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:

\n \n \n
\n

Option 5:SQL Server Backup

\n

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:

\n \n \n
\n

Other Files to Backup

\n

The following files are not part of the DataStore but should also be backed up on a regular basis, especially if they have been modified or tuned.

\n
    \n\t
  • &LT;uptime_dir&GT;/uptime.conf \n\t
  • &LT;uptime_dir&GT;/license.dat \n\t
  • &LT;uptime_dir&GT;/wrapper.conf (Windows OS) \n\t
  • &LT;uptime_dir&GT;/uptime.lax (Unix OS) \n\t
  • &LT;uptime_dir&GT;/apache/conf/httpd.conf \n
  • No labels