Backup Still....

Hi - I have 3 scripts.

1 shutsdown proservice

1 backups

1 restarts proservice

...

I have been backing up a database, now I am trying to backup another database which is more heavily used. I have edited the script with the 2nd command but it doesn't work...help is required - the backup script is below..

Code:
set DLC=c:\DLC
set PATH = %PATH;%DLC%\bin

cd: c:\

call %DLC%\bin\probkup.bat c:\eureka\db\eureka E:\ProgressBackups\eureka%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt

call %DLC%\bin\probkup.bat C:\EUREKA\Eureka 2007\db\eureka E:\ProgressBackups\2007eureka%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt
the 2nd command is the one which doesn't work. The first works fine...what could be causing this and does anyone have a solution.
 

LarryD

Active Member
The second one has a space in the directory name...

Try putting quotes around
"C:\EUREKA\Eureka 2007\db\eureka"
 
Hi,

it didn't make a difference.

The 1st line still completes but the 2nd command fails. No message in the log either.
 

TomBascom

Curmudgeon
Both lines are very long and the 2nd line is longer.

I vaguely recall that DOS has a line length limit.

You might want to try cd'ing to the directort 1st and then doing the backup instead of using such long path names.
 

LarryD

Active Member
Tom is right... it's 127 characters.

Another option is to set the directories in a variable:

Code:
set DLC=c:\DLC
set PATH = %PATH;%DLC%\bin
set ddir = "C:\EUREKA\Eureka 2007\db"
set bdir = E:\ProgressBackups

cd: c:\

call %DLC%\bin\probkup.bat c:\eureka\db\eureka E:\ProgressBackups\eureka%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt

call %DLC%\bin\probkup.bat %ddir%\eureka %bdir%\2007eureka%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt
 
There you go learnt something else new.

Thanks - I won't be able to test for a week unfortunately but I will let you know.

the 1st line has 143 characters but has been successful...

Alex
 
This is the content of probkup.bat
#probkup.bat
@echo off
if "%DLC%"=="" set DLC=C:\Progress\OpenEdge
type "%DLC%"\version
if ""%1"" == ""online"" goto Online
if ""%1"" == ""ONLINE"" goto Online
:Offline
"%DLC%\bin\_dbutil" probkup %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO End
:Online
"%DLC%\bin\_mprshut" %2 -C backup online %3 %4 %5 %6 %7 %8 %9
GOTO End
:End

set ddir = "C:\EUREKA\Eureka 2007\db" is expanding into two parameters due to the space between Eureka and 2007. Since it's 2009 set ddir to Eureka2009 and you'll probably be ok. :eek:
 

LarryD

Active Member
set ddir = "C:\EUREKA\Eureka 2007\db" is expanding into two parameters due to the space between Eureka and 2007. Since it's 2009 set ddir to Eureka2009 and you'll probably be ok.

Cecil, that's why I put the quotes around the directory in ddir... the parameter is not expanded with the quotes around the space embedded value. It does the replacement for %1 in offline mode as "C:\EUREKA\Eureka 2007\db"\eureka (which is 1 parameter, not 2), which when tested works on DOS (at least as far as if you try cd goes). Don't have a Windows version of the probkup to test though.
 
Run this

set DLC=c:\DLC
set PATH = %PATH;%DLC%\bin
set ddir = "C:\EUREKA\Eureka 2007\db"
set bdir = E:\ProgressBackups
echo DLC = %DLC%
echo PATH = %PATH%
echo ddir = %ddir%
echo bdir = %bdir%


only DLC and ddir are set correctly. bdir isn't set due to space after = without quotes and %PATH without trainling %

if you set DLC path ddir and bdir correctly, a command lind of

call probkup %ddir%\eurka %ddir%\eureka %bdir%\2007eureka%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt

should work.
 
So the script should contain:

set DLC=c:\DLC
set PATH = %PATH;%DLC%\bin
set ddir = "C:\EUREKA\Eureka 2007\db"
set bdir = E:\ProgressBackups


call %DLC%\bin\probkup %ddir%\eureka %bdir%\2007eureka%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt
call %DLC%\bin\probkup.bat c:\eureka\db\eureka %bdir%eureka%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt

I tried various things last night without success - I will try this again tonight but it complains it cannot find the specified path. I typed this line by line and when checking the variables bdir and ddir were fine - I used "set" to check.
 

LarryD

Active Member
As Cecil stated earlier:

set PATH=%PATH%;%DLC%\bin

add the % at that back.

and as Cecil noted, NO SPACES around the "="

so it would be:
set PATH=%PATH%;%DLC%\bin
set ddir="C:\EUREKA\Eureka 2007\db"
set bdir=E:\ProgressBackups

if you still can't get it to work then I'd suggest not worrying about setting the database directories into environment vars, and just cd into the directory before performing each probkup (as Tom suggested earlier).
 
hi

I manually typed into cmd prompt the code to backup the db I am having trouble with and I am getting the error: " Unable to perform the backup at this time"

So I CD'd into c:\eureka\eureka 2007\db and tried from there and I am recieving the error :"Database in use or multi user mode"

Any suggestions?!?!
 

LarryD

Active Member
Well, the error tells you that the db is online and running, not shut down (you should re-read your other post on this topic).

If the server is running then use "probkup online" not just "probkup".
 
when i try an online backup via proenv it states there is "no server" for the database in c:\....

is there a command to check the status of the database...

when trying to backup I have always used the same script to shut the database down - it includes call %DLC$\bin\pccmd proservice stop.
 

TomBascom

Curmudgeon
You might want to try posting the actual commands that you actually and truly use for the complete process. Dribbling out information a little bit at a time obviously isn't working.

Remind me, what version of Progress is this?
 
You don't want to know what version it is - from what i remember I think 8.3E
To shutdown Proservice:
PHP:
set DLC=c:\DLC
set PATH = %PATH;%DLC%\bin

cd: c:\

call %DLC$\bin\pccmd proservice stop
To Backup Databases (obviously - the 2nd command is failing)

PHP:
set DLC=c:\DLC
set PATH = %PATH;%DLC%\bin

cd c:\


call %DLC%\bin\probkup.bat c:\eureka\db\eureka E:\ProgressBackups\eureka%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt
rem call %DLC%\bin\probkup.bat "C:\EUREKA\Eureka 2007\db\eureka" E:\ProgressBackups\eureka2007%date:~6,4%-%date:~3,2%-%date:~0,2%.pbk -com >>c:\backups\backuptask\log.txt

To restart proservice:

PHP:
set DLC=c:\DLC
set PATH = %PATH;%DLC%\bin

cd: c:\

call %DLC$\bin\pccmd proservice start

The 3 scripts are scheduled 10minutes apart.
 
Top