on 12-23-2010 1:49 PM
Hello,
i have a problem.
We want to use the backup_start for filersnapshot.
When i open one session
dbmcli -d TST -u dbadmin,dbadmin -uUTL
dbmcli -> backup_start backupmedium
dbmcli -> backup_finish backupmedium externalbackupid 0
it's ok.
When i use
dbmcli -d TST -u dbadmin,dbadmin -uUTL -c backup_start backupmedium
dbmcli -d TST -u dbadmin,dbadmin -uUTL -c backup_finish backupmedium externalbackupid 0
-24984,ERR_MENOVALID: Invalid medium definition
i become an errormessage.
how can i make a script ?
dbmcli -d TST -u dbadmin,dbadmin -uUTL -c backup_start backupmedium
wait 120
dbmcli -d TST -u dbadmin,dbadmin -uUTL -c backup_finish backupmedium externalbackupid 0
i have also tested with shell-script
cmd=`cat <<EOF | dbmcli -d $DB_NAME -U c_J2EE -uUTL 2>&1
......
but in dbmcli there no sleep or wait.
When i leave the session i become the error "Invalid medium definition".
Thanks.
Rainer
Does anyone know a solution for a Windows System?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Thomas,
it would be great, if you would add an example for the line "create a backup medium".
I tried some different dbmcli commands, but all of them failed "-24984,ERR_MENOVALID: invalid medium definition".
thank you,
Reinhard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rainer
i have the same problem. I could solved them the following way:
Preparation:
1. create a backup medium snapshot_medium type EXTERNAL
2. create a file "start_backup" with the following 2 lines:
backup_start snapshot_medium DATA
!snapshot_script.sh
3. create a script "snapshot_script.sh" where you make the external backup (like tar, cp, snap create a.s.o)
In this script you check the saving and depending of the returncode
you write to the pipe the appropiated backup_finish command like "backup_finish snapshot_medium FAILED WITH ERROR 4" or "backup_finish snapshot_medium EXTERNALBACKUPID MONDAY 0".
In this script you must also write the "exit" command for dbmcli
4. create a pipe: mknod pipe p
Execution:
1. start dbmcli reading a pipe:
dbmcli -u control,control-pwd -d SID -uUTL control,control-pwd -ics pipe &
2. write to the pipe:
cat start_backup > pipe
Now the dbmcli start and first it start the backup_start command. After this, the external script "snapshot_script.sh" will be started. Here, the data will be saved and depending of the return code a backup_finish command will be generated and written to the pipe "pipe". Also the "exit" command must be written to the pipe.
With this method, all actions occurs in the same dbmcli-session
I hope, it helps
Greeze
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rainer,
yes you are right. When the dbmcli session ends the underlying maxdb snapshot is automatically removed, so the backup is not successfully finished.
Some days ago i got 3 hints from SAP side to address this:
1) Open a pipe to the dbmcli command so that you can read and write to/from dbmcli to execute commands. Maybe perl with the IPC::Open2 module can manage that.
2) dbmcli is able to execute os commands with the exclamation mark. So you might be able to trigger your external filercommands within dbmcli.
3) Maybe the use of schedule commands can address your requirements. See dbmcli documentation
Hope that helps, regards
Stefan
Edited by: Stefan Dietz on Jan 3, 2011 4:51 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Rainer
Check this installation guide - http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e01ca61c-0c69-2a10-b087-ce76cfae6...
Regards,
Sen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.