Introduction :
This blog will provide you the shell script to schedule MaxDB automatic backup with Linux OS. I have also explained how to create a DATA backup catalogue as well.
Contents in this blog :
Creating a DATA backup catalogue for Maxdb databaseScript for automatic backup of Maxdb DATA
Steps to create a DATA backup catalogue :
Login to the DBMCLI utility using control user or higher privilege user.
./dbmcli -d <SID> -u control,<PASSWORD>
Command for creating a DATA backup template
Backup_template_create <datatemplatename> to file </location/filename> CONTENT DATA
Shell Script for automatic backup of MaxDB DATA backup
#!/bin/bash
# Define the dynamic file name
BACKUP_DIR=”/maxdbbackup”
DATE=$(date +”%d-%m-%Y”)
#Defining location and name of backup file with date & time
BACKUP_FILE=”${BACKUP_DIR}/SID-DBBackup-${DATE}”
# MaxDB commands
/sapdb/SID/db/bin/dbmcli -d <SID> -u control,<password> <<EOF
backup_template_create DBACK TO FILE ${BACKUP_FILE} CONTENT DATA
db_connect
backup_start DBACK
EOF
In the above script, the below can be modified according to your system
DBBACK –> data backup template
Use this script with Cronjob schedule in linux with the required frequency according to your need.
Introduction :This blog will provide you the shell script to schedule MaxDB automatic backup with Linux OS. I have also explained how to create a DATA backup catalogue as well.Contents in this blog :Creating a DATA backup catalogue for Maxdb databaseScript for automatic backup of Maxdb DATASteps to create a DATA backup catalogue : Login to the DBMCLI utility using control user or higher privilege user. ./dbmcli -d <SID> -u control,<PASSWORD> Command for creating a DATA backup template Backup_template_create <datatemplatename> to file </location/filename> CONTENT DATA Shell Script for automatic backup of MaxDB DATA backup#!/bin/bash# Define the dynamic file nameBACKUP_DIR=”/maxdbbackup”DATE=$(date +”%d-%m-%Y”)#Defining location and name of backup file with date & timeBACKUP_FILE=”${BACKUP_DIR}/SID-DBBackup-${DATE}”# MaxDB commands/sapdb/SID/db/bin/dbmcli -d <SID> -u control,<password> <<EOFbackup_template_create DBACK TO FILE ${BACKUP_FILE} CONTENT DATAdb_connectbackup_start DBACKEOFIn the above script, the below can be modified according to your systemDBBACK –> data backup templateUse this script with Cronjob schedule in linux with the required frequency according to your need. Read More Technology Blogs by Members articles
#SAP
#SAPTechnologyblog