Hello Fabrice, I can't answer your second question, but maybe I can help with your other question, even if I make it a slightly different. To backup my database I call dbmcli and it will create a file i.e. "mybackupfile". Afterwards I do a 'mv' to rename my file with the current date as suffix, so it will not be overwritten on the next backup. Here is my mv-command (maybe it helps):
mv /<my>/<path>/mybackupfile /<my>/<name>/mybackupfile.`date +%Y%m%d` Afterwards it looks like this: mybackupfile.20050428 So I have added the current date to my backupfile. To import it on Windows maybe you can go the other way around: rename file to mybackupfile and then import it. Just my 2 cents. Hope that helps a bit Peter -----Urspr�ngliche Nachricht----- Von: Fabrice Bourdel [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 29. April 2005 11:23 An: maxdb Betreff: how to automate backup and restore with a filename that vary Hello, i have to automate (via cron sheduler) then backup and restore from a maxdb 7.5.0.26 database on winxp to a maxdb 7.5.0.26 linux database. I want to do a full backup and then a restore with initialisation on another machine. I will tell cron to do this job dayly But i have problem to send a parameter, a suffix to the backup file name. Context : - the database to backup is on a winxp machine - the cron and dbmcli and "restore database" is on the linux machine - because the os's are different, i do a loadsystab - actually (but temporary), the 2 databases (backup and restored) are with the log overwrite to on > the restored database need to get telled to set the log to be overwrited The file witch will be launched dayly by the cron task : >>> File mycommand.sh #!/bin/sh # SUFFIX=`date +%y%m%d%H%M` dbmcli -n machine -d DB -u XXX,XXX -i mybackup.txt $SUFFIX dbmcli -d DB -u YYY,YYY -i myrestore.txt $SUFFIX >>> EOF The $SUFFIX variable is intended to get the date in the form YYMMDDHHMM But then $SUFFIX variable is interpreted as a dbmcli commande and naturally, this command doesn't exist. >>> File mybackup.txt db_admin util_connect medium_put Master$1 H:\MasterBackup\MASTER_COM_$1 FILE backup_start Master$1 DATA db_online quit >>> EOF $1 is intended to get le suffix parameter, but don't work >>> File myrestore.txt db_admin util_connect medium_put Master$SUFFIX /pathtodatabase/MASTER_COM_$1 FILE DATA db_activate RECOVER Master$1 DATA load_systab -u YYY,YYY -ud ZZZ util_connect util_execute SET LOG AUTO OVERWRITE ON util_release db_online quit>>> EOF $1 is intended to get le suffix parameter too, but don't work too How to write correcty to pass the suffix parameter to the backup file ? And another question : is it better to get the database in admin mode, or is it no problem to let the database running ? Thanks for responses -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
