HP 3PAR StoreServ 7400 2-node HP 3PAR Policy Server Administrator's G - Page 54

Restoring the Database, Important

Page 54 highlights

If the database is shut down when you attempt to perform a backup, you will see an error message and the backup is NOT created. Make sure the database is running before a backup operation is run. Note: The backup utility does not perform syntax checking on the command. If, for example, you enter backup_database 4.5, the utility is expecting an integer for the backup count but does not check that what you entered was an integer. Instead, it takes the first digit (4 in this case) for the number of backups to retain. This utility is intended to be invoked from the system task scheduler (cron on UNIX or Scheduled Tasks on Windows), but it can be invoked manually as well. In either case, the utility must be invoked on the system that runs the HSQL database server. If you run scheduled backups, be aware that when the maximum number of backups is reached, the oldest backup is removed. This feature means that you never have to manually remove old backup files. If you perform a backup manually and specify a smaller number of backups to keep than was previously set, the oldest backups are removed to satisfy the smaller number of backups to keep. Again, you do not have to remove them manually. HSQLDB creates backups that contain enough data to restore the database to a previous state. The backup file contains the following files:  apm.properties  apm.script  apm.data The log and backup files may not (and do not need to) be in sync with these files. Restoring the Database To make it easy to restore the database to previously known state, the Policy Server installation includes a restore utility called restore_database (restore_database.bat on Windows). This utility restores the HSQL database from a single backup archive (tar.gz file) that was previously created by the backup_database utility. Important! Before performing a restore operation, you must first stop the HP 3PAR Policy Server service and then stop the HP 3PAR Policy Server Database service. Once you've stopped the services, you can run the restore utility. Invoking the utility with no parameters selects the most recent available backup by default. Alternatively, to see a list of all the available backups, run the utility with the "list" command line option. You must type this option using all lowercase letters. The backups are listed in reverse chronological order (that is, the newest backup is at the top of the list). For example: $ /opt/Axeda/HP3PS/hsqldb/bin/restore_database list Available backups in /opt/Axeda/HP3PS/hsqldb/backups: apm-20110922T112110.tar.gz apm-20110922T112005.tar.gz apm-20110922T110830.tar.gz apm-20110922T110825.tar.gz HP 3PAR Policy Server 6-4

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87

HP 3PAR Policy Server
6-4
If the database is shut down when you attempt to perform a backup, you will see an error message and the
backup is NOT created. Make sure the database is running before a backup operation is run.
Note: The backup utility does not perform syntax checking on the command. If, for example, you enter
backup_database 4.5
, the utility is expecting an integer for the backup count but does not check that
what you entered was an integer. Instead, it takes the first digit (
4
in this case) for the number of
backups to retain.
This utility is intended to be invoked from the system task scheduler (cron on UNIX or Scheduled Tasks on
Windows), but it can be invoked manually as well. In either case, the utility must be invoked on the system
that runs the HSQL database server.
If you run scheduled backups, be aware that when the maximum number of backups is reached, the oldest
backup is removed. This feature means that you never have to manually remove old backup files. If you
perform a backup manually and specify a smaller number of backups to keep than was previously set, the
oldest backups are removed to satisfy the smaller number of backups to keep. Again, you do not have to
remove them manually.
HSQLDB creates backups that contain enough data to restore the database to a previous state. The backup
file contains the following files:
apm.properties
apm.script
apm.data
The log and backup files may not (and do not need to) be in sync with these files.
Restoring the Database
To make it easy to restore the database to previously known state, the Policy Server installation includes a
restore utility called
restore_database
(
restore_database.bat
on Windows). This utility restores the HSQL
database from a
single
backup archive (
tar.gz
file) that was previously created by the
backup_database
utility.
Important!
Before performing a restore operation, you must first stop the HP 3PAR Policy Server
service and then stop the HP 3PAR Policy Server Database service.
Once you've stopped the services, you can run the restore utility. Invoking the utility with no parameters
selects the most recent available backup by default. Alternatively, to see a list of all the available backups,
run the utility with the “
list
” command line option. You must type this option using all lowercase letters.
The backups are listed in reverse chronological order (that is, the newest backup is at the top of the list). For
example:
$ /opt/Axeda/HP3PS/hsqldb/bin/restore_database list
Available backups in /opt/Axeda/HP3PS/hsqldb/backups:
apm-20110922T112110.tar.gz
apm-20110922T112005.tar.gz
apm-20110922T110830.tar.gz
apm-20110922T110825.tar.gz