Backing Up and Restoring Prime Infrastructure
As with any other system upon which your organization relies, you will need to ensure that Cisco Prime Infrastructure is backed up regularly, so it can be restored in case of hardware or other failure.
Types of Prime Infrastructure Backups
Prime Infrastructure creates two types of backup files:
- Application backups: These contain all application code and data, but do not include host-specific settings, such as the server hostname and IP address. You can create these backups using the Prime Infrastructure interface or the command line. By default, Prime Infrastructure creates one application backup every day, automatically, in the default local backup repository.
- Appliance backups: These contain all application code, data, and host-specific settings, including the hostname, IP address, subnet mask, and default gateway. You can create appliance backups from the command line only. Prime Infrastructure does not take appliance backups automatically.
By default, application backup files are stored in the /localdisk/defaultRepo repository. You can change this default, including specifying remote or local backup repositories, when you run an application or appliance backup from the command line. You can also specify a remote or local backup repository to use for automatic application backups.
All backups created automatically or on-demand from the Prime Infrastructure interface are assigned a filename with the format host-yymmdd-hhmm.tar.gpg, where host is the hostname of the server from which the backup was taken, and the other values are the date and time the backup was taken. Backups taken from the command line have the format filename-yymmdd-hhmm.tar.gpg, where filename is the filename you specify.
Taking Application Backups From the Interface
You can take an immediate application backup using the Prime Infrastructure interface.
You can also run an on-demand application backup from the command line (see Taking Application Backups From the Command Line).
Step 1
Choose Administration > Background Tasks.
Step 2
Under Other Background Tasks, find the Prime Infrastructure Server Backup task.
If you want to change the backup repository and maximum number of backups, see the steps under Scheduling Automatic Application Backups.
Step 3
Select the Prime Infrastructure Server Backup task check box.
Step 4
From the Select a command drop-down list, select Execute Now.
Step 5
Click Refresh to see the current status of the task.
Taking Application Backups From the Command Line
You can take an immediate application backup using the command line. Taking an application backup from the command line allows you to specify the backup repository and filename.
You can also take an on-demand application backup using the Prime Infrastructure user interface (see Taking Application Backups From the Interface).
Step 1
At the Prime Infrastructure virtual appliance, exit to the command line.
Step 2
At the command line, log in using the administrator ID and password used to install Prime Infrastructure.
Step 3
Enter the following command to display the list of backups:
#
show repository repositoryName
Where repositoryName is the repository alias on which you want to create the backup (for example, RemoteFTP
).
Step 4
Enter the following command to back up the application:
#
backup filename repository repositoryName
application NCS
Where:
- filename is the name you want to give the application backup file (for example,
myBackup).
The host name, date and time of the backup and the tar.gpg filename extension will be appended to the filename you specify.
- repositoryName is the name of the repository where you want to store the backup (for example,
RemoteFTP).
Scheduling Automatic Application Backups
You can schedule regular application backups using the Prime Infrastructure user interface.
Note
Backing up affects the performance of the server. You should schedule application backups to run when the server is less active (for example, in the middle of the night).
Before You Begin
If you want to back up to a new local or remote repository, you must first create it:
To schedule automatic backups of the Prime Infrastructure application:
Step 1
Choose Administration > Background Tasks.
Step 2
From Other Background Tasks in the left sidebar menu, click Prime Infrastructure Server Backup.
Step 3
Enter the required information.
Step 4
Click Save.
The backup file is saved in ftp-server/directory (if you have configured a remote FTP repository) or in /localdisk/defaultRepo with a filename of the format hostname- yymmdd -hhmmss.tar.gpg (for example, MyHost-120806-1748
. tar.gpg)
.
Taking Appliance Backups
Appliance backups are not automatically created. You may create them as needed, using the command line.
Step 1
At the Prime Infrastructure virtual appliance, exit to the command line.
Step 2
At the command line, log in using the administrator ID and password used to install Prime Infrastructure.
Step 3
Enter the following command to display the list of appliance backups:
#
show
repository repositoryName
Where repositoryName is the repository alias on which you want to create the appliance backup (for example, RemoteFTP
).
Step 4
Enter the following command to back up the appliance:
#
backup filename
repository repositoryName
Where:
- filename is the name you want to give the appliance backup file (for example,
myBackup).
The date and time of the backup and the tar.gpg filename extension will be appended to the filename you specify (for example, myBackup-130615-1256.tar.gpg
).
- repositoryName is the name of the repository where you want to store the appliance backup (for example,
RemoteFTP).
Using Local Backup Repositories
If you want to create local repository, follow these steps:
Step 1
At the command line, log in with the administrator ID and password used to install Prime Infrastructure.
Step 2
Enter the following commands:
#
configure terminal
#
repository repositoryName
#
url disk: /foldername
#
end
Where disk represents localdisk.
You can create new backup repositories as needed, then specify one of them when scheduling an automatic backup or before performing an on-demand backup.
If you want to use a local repository, entering a new repository alias in the Name field and clicking Submit will create the new repository as a subdirectory with the name you specified on the Prime Infrastructure server.
If you want to use a repository located on a remote FTP server, see Using Remote Backup Repositories.
Step 1
Choose Administration > Background Tasks.
Step 2
Under Other Background Tasks, click Prime Infrastructure Server Backup.
Step 3
Click Create.
Step 4
Enter a unique name for the backup repository.
Step 5
Click Submit.
Using Remote Backup Repositories
You can create backup repositories on a remote FTP server and set up the Prime Infrastructure server to use them. Remote repositories are recommended, as they help ensure that your network management data backups are protected from site failures.
The FTP server hosting your backups can be set up anywhere in your network, as long as the FTP server:
- Has an IP address accessible from the Prime Infrastructure server.
- Has a user with write access to the FTP server disk.
- Has a local subdirectory that matches the repository Name you specify on the Prime Infrastructure server.
Although not required, Cisco strongly recommends that you configure the FTP server backup repository before setting up Prime Infrastructure to use it. If you do not configure it before the first on-demand or automatic backup is triggered, the backup will fail without warning.
Step 1
At the Prime Infrastructure virtual appliance, exit to the command line.
Step 2
At the command line, log in with the administrator ID and password used to install Prime Infrastructure.
Step 3
Enter the following command to enter server configuration mode:
#
configure terminal
Step 4
Enter the following commands to configure a symbolic link to the remote FTP server:
#
repository repositoryName
#
url ftp://serverIPorHostname
#
user name password plain userPassword
Where:
- repositoryName is the name of the remote repository on the FTP server (for example,
RemoteFTP
).
- serverIPorHostname is the IP address or hostname of the remote FTP server (for example,
ftp://192.198.110.100/
).
- name is the name of a user with write privileges to the repository on the FTP server.
- userPassword is the corresponding password for that user.
When you are finished, press Ctrl+z to exit configuration mode.
Step 5
Verify creation of the symbolic link using the following command:
#
show repository repositoryName
Step 6
In the Prime Infrastructure interface, choose Administration > Background Tasks > Other Background Tasks.
Step 7
Click Prime Infrastructure Server Backup.
Step 8
Click Create.
Step 9
Enter the name of the remote FTP repository.
Step 10
Select FTP Repository.
Step 11
Enter the serverIPorHostname and the name and userPassword of the FTP user.
Step 12
Click Submit.
Types of Prime Infrastructure Restore
Prime Infrastructure creates two types of restore files:
- Application restore: These contain all application code and data, but do not include host-specific settings, such as the server hostname and IP address. You can restore application data from application backup using command line only.
- Appliance restore: These contain all application code, data, and host-specific settings, including the hostname, IP address, subnet mask, and default gateway. You can restore appliance data from appliance backup using command line only.
Restoring From Application Backups
Follow the steps below to restore Prime Infrastructure from an application backup using the command line. You cannot restore an application backup using the Prime Infrastructure user interface.
You can restore an application backup to the same host you were using or to a different host. Note that you can restore an application backup from an Express to a Standard or Pro installation, or from a Standard to a Pro installation. You cannot restore an application backup taken from a larger installation to a smaller installation (see Migrating to Another OVA Using Backup and Restore).
Application backup files created using the Prime Infrastructure user interface as a scheduled background task are assigned generic filenames of the format hostname-yymmdd-hhmm .tar.gpg (for example, MyHost-120806-1748.tar.gpg
). Application backups created using Prime Infrastructure interface or the the command line will have the filename the user specified in place of the hostname.
Step 1
At the Prime Infrastructure virtual appliance, exit to the command line.
Step 2
At the command line, log in using the administrator ID and password used to install Prime Infrastructure.
Step 3
Enter the following command to display the list of application backups:
#
show repository
repositoryName
Where repositoryName is the repository alias from which you want to restore the application backup. (for example, RemoteFTP).
Step 4
Identify the application backup file you want to restore and then enter the following command to restore from that file:
#
restore
filename
repository
repositoryName
application NCS
Where filename is the name of the application backup file from which you want to restore (for example, myHost-131216-1256.tar.gpg)
Note
In case of older version restore, if the restore is done with NCS process down, then you have to manually make the process up after completion of restore.
Restoring From Appliance Backups
Follow the steps below to restore Prime Infrastructure from an appliance backup using the command line. You cannot restore from an appliance backup using the Prime Infrastructure user interface. You can restore to the same host you were using, or to a different host.
Once the restore is complete, you may need to change the restored server’s IP address, subnet mask, and default gateway. These changes are required when:
- The restored host is on the same subnet as the old host, and the old host is still active.
- The restored host is on a different subnet from the old host.
Although not required, we also recommend changing the server hostname under these conditions.
Step 1
At the Prime Infrastructure virtual appliance, exit to the command line.
Step 2
At the command line, log in using the administrator ID and password used to install Prime Infrastructure.
Step 3
Enter the following command to display the list of appliance backups:
#
show repository
repositoryName
Where repositoryName is the repository alias from which you want to pull the appliance backup (for example, RemoteFTP).
Step 4
Identify the appliance backup file you want to restore and then enter the following command to restore from that file:
#
restore
filename
repository
repositoryName
Where filename is the name of the appliance backup file from which you want to restore (for example, myHost-131216-1256.tar.gpg).
Step 5
Once the restore is complete, if needed, use the command line to change the IP address, subnet mask, default gateway and (optionally) the host name on the restored server. For example:
Admin# conf t
Admin# int GigabitEthernet 0
Admin# ip address
IPAddress
subnetMask
Admin# ip default-gateway
GatewayIP
Admin# hostname
hostname
Admin# exit
Migrating to Another OVA Using Backup and Restore
You will need to migrate your Prime Infrastructure data from an existing installation to a new one whenever you want to:
- Replace the old host entirely, such as after a catastrophic hardware failure. In this case, you can simply use your old OVA installation media to create the new host.
- Use Prime Infrastructure to manage more of your network and when you want to ensure you have adequate processing capacity. In this case, you will want to download installation files for the larger OVA before retiring the smaller one.
It is relatively easy to do this by restoring to the new host an application backup from the old host, as explained in the steps below.
Step 1
If you have not already done so, set up a remote backup repository for the old host, as explained in Using Remote Backup Repositories.
Step 2
Take an application backup of the old host on the remote repository, as explained in Taking Application Backups From the Interface.
Step 3
Install the new host as explained in the Cisco Prime Infrastructure 2.0 Quick Start Guide.
Step 4
Configure the new host to use the same remote backup repository as the old host, as explained in Using Remote Backup Repositories.
Step 5
Restore the application backup on the remote repository to the new host, as explained in Restoring From Application Backups.
Log Information
Database backup and restore related information can be obtained from the below logs:
/opt/CSCOlumos/logs/rman.log
/opt/CSCOlumos/logs/dbadmin_StdOut.log