Skip to end of metadata
Go to start of metadata


Regularly backing up your SAP HANA cockpit (the cockpit) is an essential task to minimize data loss in the event of an unforeseen problem. This article describes how to backup the persistence and application server that your cockpit runs on, effectively backing up your landscape configuration; and how to recover your database.

It's important to understand that the persistence for the cockpit is an SAP HANA express edition (HXE) database that is used to store all the cockpit's metadata. The application server is SAP HANA extended services, advanced model (XSA). Both the HXE database and XSA are automatically installed and configured when you install the cockpit.

Note: The procedure below can be used to recover a cockpit to either the same or a different machine. Recovering to a different machine essentially means that you are migrating your cockpit from one server to another. 


Backing Up Cockpit

Prerequisite: The SAP HANA express database that your cockpit is running on (your home system) is already registered as a resource in cockpit.

Step 1) Log into your cockpit, and navigate to the System Overview page of your home system. Under the DB Administration tile, click the Manage database backups link. Note that you will only be able to access the Manage database backups link if the database user you are connected as has sufficient privileges. 

Step 2) Clicking the Manage database backups link will lead you to the Backup Catalog page, where you can view a list of previously created backups and details associated with them. Click the Create Backup button to manually create a backup. 

Step 3) Click the radio button Complete to ensure you are taking a complete data backup. Differential or incremental backups won't work for this procedure. If you wish, you can change the backup prefix, backup destination, and/or add any comments at this point. Once you are done configuring your backup settings, click the Back Up button. 

OPTIONAL: If your backup is taking a long time, you can choose to run your backup in the background by clicking the Run in Background button.  

Step 4) Once your backup has finished, you will be presented with the Backup Details page. 

Step 5)  At this point, you can switch to an secure shell (SSH) session or an alternative file transfer application to copy the files below from your cockpit to your backup location. This step is only necessary if you are migrating your cockpit from one server to another. 

    • /usr/sap/<SID>/SYS/global/xsa/security/ssfs/data/SSFS_<SID>.DAT 
    • /usr/sap/<SID>/SYS/global/xsa/security/ssfs/key/SSFS_<SID>.KEY 

You have now successfully created a full backup of your cockpit.

Recovering Cockpit

Prerequisite: You are restoring a system with the same SID as the backup you made and your SAP XSA version is greater than v1.0.34. If your XSA version is less than or equal to v1.0.34, please follow the instructions in SAP Note 2300937 to recover your database. 

NOTE: Although the cockpit can be used to recover databases, since the system being recovered has to be offline, in order to recover the cockpit, commands must be executed from an SSH session. 

Step 1)  Log on to your target SAP HANA system as the <sid>adm user. 

Step 2) Execute cd /usr/sap/<SID>/HDB<instance number> and then execute the ./HDB stop command to stop your system.

      • Below is a sample out the output you will see 
h4cadm@<host name>:/usr/sap/H4C/HDB96> ./HDB stop
Stopping instance using: /usr/sap/H4C/SYS/exe/hdb/sapcontrol -prot NI_HTTP -nr 96 -function Stop 400
09.06.2017 20:48:51
Waiting for stopped instance using: /usr/sap/H4C/SYS/exe/hdb/sapcontrol -prot NI_HTTP -nr 96 -function WaitforStopped 600 2

09.06.2017 20:48:51
hdbdaemon is stopped.


Step 3) Restore the following files from your backup location to their respective places. This step is only necessary if you are migrating your cockpit from one server to another server. 

    • /usr/sap/<SID>/SYS/global/xsa/security/ssfs/data/SSFS_<SID>.DAT 
    • /usr/sap/<SID>/SYS/global/xsa/security/ssfs/key/SSFS_<SID>.KEY 

Step 4) Restore the database by executing the following command: --command="RECOVER DATA USING FILE ('<file path to backup>') CLEAR LOG" --wait.

    • NOTE: When a backup is created in cockpit, you will actually have 2 files in the backup location. One will have the suffix "databackup_0_1" and the other will have the suffix "databackup_1_1". When specifying the file path to your backup in the above command, specify the path to the file without either suffix. 
        • For example, if you named your backup "backup_cockpit", in the actual folder you will see that you have a file named "backup_cockpit_databackup_0_1" and a file named "backup_cockpit_databackup_1_1". The file path that you should use in this case should be "/usr/sap/H4C/HDB96/backup/data/SYSTEMDB/backup_cockpit"
    • Further information on the RECOVER DATA statement can be found here and further information on the file can be found here
    • Below is a sample of the output you should see after successful recovery of your database
h4cadm@<host name>:/usr/sap/H4C/HDB96> --command="RECOVER DATA USING FILE ('/usr/sap/H4C/HDB96/backup/data/SYSTEMDB/backup_cockpit') CLEAR LOG" --wait 
[140670641022720, 0.001] >> starting recoverSys (at Fri Jun 9 21:47:56 2017)
[140670641022720, 0.002] args: ()
[140670641022720, 0.002] keys: {'command': "RECOVER DATA USING FILE ('/usr/sap/H4C/HDB96/backup/data/SYSTEMDB/backup_cockpit') CLEAR LOG", 'wait': True}
own pid: 57149
recoverSys started: 2017-06-09 21:47:56
testing master: <host name>
<host name> is master
shutdown database, timeout is 120
stop system
stop system: <host name>
stopping system: 2017-06-09 21:47:56
stopped system: 2017-06-09 21:47:56
creating file recoverInstance.sql
restart database
restart master nameserver: 2017-06-09 21:48:01
start system: <host name>
2017-06-09T21:48:06+00:00 P057297 15c8ed42386 INFO RECOVERY state of service: nameserver, <host name>:39601, volume: 1, RecoveryExecuteTopologyRecoveryFinished
2017-06-09T21:48:36+00:00 P057297 15c8ed42386 INFO RECOVERY RECOVER DATA finished successfully, reached timestamp 0001-01-01T00:00:00+00:00, reached log position 18446744073709551615

recoverSys finished successfully: 2017-06-09 21:48:37
[140670641022720, 40.806] 0
[140670641022720, 40.806] << ending recoverSys, rc = 0 (RC_TEST_OK), after 40.804 secs


Step 5) Start the system using the ./HDB start command. Allow a few minutes to pass to ensure all your XS apps are running before trying to access cockpit through your browser again.


Your cockpit should now be restored to the state it was in when you made your backup. 


If, after the recovery of the cockpit, when you are logged in as the COCKPIT_ADMIN user:

  1. The number of resources in cockpit landscape and resource directory are mismatched with the number of resources in the cockpit manager, and, 
  2. The Manage cockpit link is on the cockpit landscape page is gone

You can follow the steps below to rectify the issue. A situation like this can occur when you are recovering a database using a backup made with a different version of XSA. 

In the two screenshots below, notice how the cockpit landscape page says there are zero resources registered to the system but in the cockpit manager, it states that there are 2 registered resources. 

To fix this problem:

Step 1) Log on to your target SAP HANA system as the root user. 

Step 2) Navigate to the location where your cockpit installer script ( or is located and execute the command ./ or ./ to run the installer again

Step 3)  Select the index 1 to update the cockpit. Run the installer again without changing any parameters. 

SAP HANA Lifecycle Management - SAP HANA Cockpit
Choose an action
Index | Action             | Description
1 | H4C (update) |
| | System is incomplete due to failed installation or update (resume not possible)
| |
2 | install | Install new system
3 | Exit (do nothing) |
Enter selected action index [3]: 1


Step 4) After your cockpit has successfully upgraded, log on to your cockpit manager as the COCKPIT_ADMIN user to check that your resources are properly registered. You can now navigate to your cockpit landscape page and everything should be displaying normally. 

    • NOTE: If you log in to your cockpit manager as the COCKPIT_ADMIN user and find that you cannot see the Registered Resources tab and the Resources Group, logging out of the cockpit manager and logging in again should fix the issue. 



Your cockpit should now be functioning normally. 

Best Practices 

It is recommended that:

    • You create a weekly backup schedule to regularly take backups of your cockpit. 

        • To create a backup schedule, from Step 2) of the backup procedure, instead of clicking the Create Backup button, click the Create Schedule button.

    • You create a backup of your cockpit after registering a large amount of resources.
    • You create a backup of your cockpit prior to upgrading your system. 

Related Documents





  • No labels