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 :
Steps to create a DATA backup catalogue :
./dbmcli -d <SID> -u control,<PASSWORD>
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 26 | |
| 26 | |
| 21 | |
| 21 | |
| 19 | |
| 14 | |
| 14 | |
| 14 | |
| 14 | |
| 10 |