Backup the Database(s) for SAP HANA Express – by t...
Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
In this playlist you will find video tutorials on miscellaneous topics; some included in the Getting Started with SAP HANA express edition guide (PDF) that comes with the download, others not (yet).
How to backup a (tenant) database is such a topic.
If you are not familiar yet with the topic of backup and recovery for SAP HANA in general, please see my blog or check out the Backup and Recovery playlist on the Academy: http://bit.ly/2eNfXJf
There a three tools you can use to make a backup of your SAP HANA database:
SAP HANA cockpit
SAP HANA studio
hdbsql
For the VM, I should maybe add that you can also - of course - create a snapshot of the VM but this does require quite a bit of hard disk space.
SAP HANA cockpit
Using the SAP HANA cockpit is probably the easiest way to perform database backups.
To enable this, you have to add the backup administrator role.
See below for a tutorial video on how you can add the hostname of the VM to the hosts file of your PC or Mac.
Select the tile to open the Backup Catalog app and click Create Backup. Optionally, edit the backup type, prefix, or destination and select Back Up.
SAP HANA studio
To backup a database using SAP HANA studio, just open the Backup Editor in the Systems View and open the Backup Wizard. The SYSTEM user already has the BACKUP ADMIN system privilege so there is no need to add any privileges to use this tool.
See below for a tutorial video on how you can connect SAP HANA studio to the SAP HANA express edition VM.
In the wizard you can then specify the backup settings, same as for SAP HANA cockpit.
Command line (hdbsql)
Finally, you can use the command line tool to perform the backup using SQL. This way you can easily automate the backup to be executed at a set time (using cron), for example, each time you start the VM.
To do this securely, it is recommended to use a secure store key file and use the restricted privileges of the BACKUP OPERATOR role.
## execute command with user key
# hdbuserstore -i SET backup hxehost:30013 backup_operator
hdbsql -U backup "backup data using file ('$BACKUP_PREFIX')"
hdbsql -U backup "backup data for $TENANT using file ('$BACKUP_PREFIX')"
If you have setup shared folders for the VM, you can even copy a zipped backup directly to the host computer.
The SAP HANA Academy provides free online video tutorials for the developers, consultants, partners and customers of SAP HANA.
Topics range from practical how-to instructions on administration, data loading and modeling, and integration with other SAP solutions, to more conceptual projects to help build out new solutions using mobile applications or predictive analysis.