• No results found

Managing Backups with piartool

In document PI Server System Management Guide (Page 106-109)

Chapter 12. Finding and Fixing Problems: the pidiag Utility

4.9 Managing Backups with piartool

4.9.1 Backup Command Summary

The piartool -backup commands are typically used for troubleshooting and for monitoring the course of a backup. The piartool -backup commands can also be used to start a non-VSS backup. The pibackup.bat script, for example, uses the piartool -backup commands to start non-VSS backups when the script is run on an operating system that does not support VSS backups.

The basic syntax for the piartool -backup command is

piartool -backup <Arg1> [Arg2] [Arg3] ...

where <> indicates a required parameter and [] indicates an optional parameter. If <Arg1>

4.9 - Managing Backups with piartool

non-VSS backup. If <Arg1> begins with a hyphen (-), then <Arg1> is assumed to be a backup command. The following backup commands are valid.

Backup Command Description

-abort Abort a current running backup. Example:

piartool -backup -abort -query [-verbose] The query command does the following.

ƒ Reports a list of subsystems that are currently registered for backup. ƒ If a backup is not in progress, the query reports the status of the last

backup.

ƒ If a backup is in progress, the type of backup and the status of the backup is reported.

Example:

piartool -backup -query -identify [-numarch

<number>] [-cutoff <date>] [-verbose]

The identify command reports the list of files that PI will backup. If the - verbose flag is specified, PI will report a list of files and components. A component is a logical grouping of files. For example, all of the files for the base subsystem are grouped under the pibasess component. The purpose of a component is to identify a group of files for backup. The -numarch and -cutoff flags have the same meaning as the backup command for non-VSS backups, which is described below.

The identify command creates a \pi\dat\pibackupfiles.bks file. This file is used in the pibackup.bat backup script to specify the list of files to backup using NTBackup. NTBackup is used by the backup script for performing VSS backups on Windows 2003 Server.

Example:

piartool -backup -identify -verbose

-trace <level> Debug messages are written to the log file when the trace level is non- zero. The higher the trace level, the more messages that are written. The maximum number of messages is written with a trace level of 100. Tracing should be off unless you are troubleshooting a problem to avoid unnecessary messages in the log file. If the trace level is non-zero, the trace level is displayed by the piartool -backup -query command. Example:

piartool -backup -trace 1 4.9.2 piartool -backup -query

When the PI System if first started and whenever the PI Backup Subsystem is restarted, the output of a piartool -backup -query will appear as follows once all of the subsystems have registered for backup.

e:PI\adm>piartool -backup -query Backup in Progress: FALSE Last Backup Start: NEVER VSS Supported: TRUE

Subsystems Registered for Backup

Name, Registration Time, Version, Status

pibatch, 29-Jul-05 12:09:36, 3.4.370.38, [0] Success pilicmgr, 29-Jul-05 12:09:52, 3.4.370.38, [0] Success piarchss, 29-Jul-05 12:10:37, 3.4.370.38, [0] Success pibasess, 29-Jul-05 12:11:53, 3.4.370.38, [0] Success pisnapss, 29-Jul-05 12:11:54, 3.4.370.38, [0] Success pimsgss, 29-Jul-05 12:11:56, 3.4.370.38, [0] Success

Last Backup Start will appear as Never when the backup subsystem is restarted because the backup subsystem does not keep track of previous backups between restarts. Pibatch may not appear in your list of subsystems that are registered for backup if you are not licensed to use the old batch subsystem.

If the PI System is started normally, then subsystems should appear as registered within about 30 seconds of the PI Backup Subsystem startup time. Normal startup is, for example, starting the PI System with the pisrvstart.bat command file or letting the PI System services

automatically start after a reboot. However, if the PI Backup Subsystem is shutdown and restarted, it may take up to 10 minutes for the individual subsystems to register for backup. All of the following subsystems must be running in order for a backup to succeed.

PI Network Manager PI Backup Subsystem

PI License Manager Registers for backup PI Message Subsystem Registers for backup PI Snapshot Subsystem Registers for backup PI Archive Subsystem Registers for backup PI Base Subsystem Registers for backup

PI Batch Subsystem Registers for backup if you are licensed to use the old PI Batch Subsystem

The other subsystems either do not have files that need to be backed up or they do not need to be running for a backup to succeed. The above subsystems that register for backup should appear in the list of registered subsystems in the output of the piartool -backup -query command.

After doing a backup, the query will show information about the last backup. The following shows an example of a query that was done after a successful non-VSS backup.

e:PI\adm>piartool -backup -query Backup in Progress: FALSE

Last Backup Start: 29-Jul-05 02:00:04 End: 29-Jul-05 02:01:11

Status: [0] Success

Last Backup Type: FULL, NON-VSS Last Backup Event: BACKUPSHUTDOWN Last Backup Event Time: 29-Jul-05 02:01:22

In document PI Server System Management Guide (Page 106-109)