Now many companies have felt the benefits gained by using the SAP HANA database on SAP Business One. Many features and functions are only available when using the SAP Hana database.
This is because the SAP HANA database uses the concept of in-memory computing, which makes the process of retrieving and placing data into the database faster.
And the same thing with the others, this SAP HANA database must also have the ability and convenience to do backup & restore when needed.
Backup specific databases manually:
- Access the HANA Studio that has been installed, log in as SYSTEM user / other users that have been created and has privileges such as SYSTEM (in the example using DBADMIN)
- Next, in NDB (SYSTEM) / DBADMIN, click on Catalog until the database list appears and right-click on the database / DB that you want to backup, then select Export.
Example: database MPC
- The Export layer will appear, making sure that on the right the database that has been selected.
Example: in the DB MPC. - Click next to the next Export screen.
- In Column Table Format: select BINARY in the dropdown (default).
- Select Export catalog objects on server if you want to put the backup results on the HANA server / linux server. For directory by default, navigate to /usr/sap/NDB/HDB00/work. But if we want to change the directory, we only need to unthicked the “Use default directory”. Make sure the HANA server / Linux server already has a directory that we want and also do chown ndbadm:sapsys namafolder in the directory folder to give SAP account privileges to put the backups to that directory through the terminal. (In SAP version 9.3 and above this does not need to be done because SAP creates an automatic path / folder if the folder is not available). Tick pada Replace existing export in specified directory untuk menimpa backup yg lama menjadi backup yang baru di directory tersebut.
Pada Contoh kita menempatkan backup di folder MPC_20191201 di dalam /usr/sap/NDB/HDB00/work’ dan lakukan chown (chown ndbadm:sapsys MPC_20191201) di folder work. - Pilih Export catalog objects to current client bila ingin meletakkan hasil backup di client Pilih directory yang diinginkan dengan menekan tombol browse…
- Number of Pararell Threads, dapat diisi sesuai dengan spesifikasi thread pada masing2 engine/mesin server.
- Kemudian klik Finish hingga muncul loading bar di sebelah kanan bawah, tunggu hingga 100%, selesai.
Cara untuk restore specific database secara manual:
- To move the backup results to another machine you can use the WinSCP application.
- To do a restore we use Hana Studio. Access through Hana Studio which is already installed, login user as a SYSTEM, and make sure it points to the machine that we want to restore.
- right-click on user/system and select Open SQL Console.
- Enter the following script into the editor section.
import "DB NAME"."*" FROM 'The folder where the DB is located' WITH IGNORE EXISTING rename schema "NAMA DB" to "NEW DB NAME" THREADS 20;
Example:
import "MPC"."*" FROM '/usr/sap/NDB/HDB00/work' WITH IGNORE EXISTING rename schema "MPC" to "MPC_BACKUP" THREADS 20;
- import “MPC”.”*” FROM ‘/usr/sap/NDB/HDB00/work/MPC_20191201/ ‘
This means that we import the backup DB named MPC in the location folder that we have placed, namely MPC_20191201. - WITH IGNORE EXISTING
This means that we ignore the old DB with the same name, if it turns out that there is already a DB with the same name it will still be restored/overwritten.
- rename schema “MPC” to “MPC_BACKUP” THREADS 20;
This means that we are restoring the MPC DB with a new DB name, namely MPC_BACKUP without overwriting/deleting the MPC DB on the server and also using Threads 20 according to the existing server specifications.
- import “MPC”.”*” FROM ‘/usr/sap/NDB/HDB00/work/MPC_20191201/ ‘
- Then, run the script with the green button in Hana Studio at the top right of the editor. So that the loading bar appears on the bottom right, wait until the process is complete.
- Wait for the process to finish, refresh by right-clicking on the Catalog, and restore the old DB to the new DB that has been completed.
Also read: