×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Hardcoding a destination path in my backup file script

Hardcoding a destination path in my backup file script

Hardcoding a destination path in my backup file script

(OP)
Can anyone please advise if the following is possible ...

I have a backup script (.bat file) shown below, that copies certain files on my computer to a backup location using a scheduled task.

At the moment, the script copies the files to an undesirable path, would it be possible to copy the backup files to H:\Backup\

Best regards

@echo off
REM *************************************************************************\
REM Program Title: backup.bat
REM Code Type : DOS Batch
REM Date : 2005-5-3
REM Called By : command line
REM Purpose : To backup DFE core configurations.
REM
REM Usage : backup [option] [filepath]
REM
REM default : backup will be created in %UNICORN_DATA% directory if filePath not provided.
REM
REM *************************************************************************

if "%MOBIUS_HOME%" == "" (
echo ERROR: MOBIUS_HOME not found in your environment.
echo you must set MOBIUS_HOME variable in your environment... exiting...
echo
goto EOF
)

if "%MYSQL_HOME%" == "" (
echo ERROR: MYSQL_HOMEnot found in your environment.
echo you must set MYSQL_HOME variable in your environment... exiting...
echo
goto EOF
)
if "%UNICORN_DATA%" == "" (
echo ERROR: UNICORN_DATA not found in your environment.
echo you must set UNICORN_DATA variable in your environment... exiting...
echo
goto EOF
)
if "%UNICORN_BASE%" == "" (
echo ERROR: UNICORN_BASE not found in your environment.
echo you must set UNICORN_BASE variable in your environment... exiting...
echo
goto EOF
)

::#######################
:: Setup the classpath
::#######################
set DEFAULT_DIR=%CD%
echo Checking configurations ...
call "%MOBIUS_HOME%\tools\reports\setupReportCP.bat"

cd /D %MOBIUS_HOME%\exe\tomcat\webapps\prodflow\web-inf
echo --------------------------------
%JAVA_HOME%\bin\java -cp %CLASSPATH% -Dtomcat.home=%MOBIUS_HOME%\exe\tomcat -Dmobius.home=%MOBIUS_HOME% com.hp.cp.psp.utils.backuprestore.Backup %1
goto EOF

:EOF
if not "%drive_letter%" == "" (
subst /d %drive_letter%
)
set CLASSPATH=
set cp=
set drive_letter=
cd /D %DEFAULT_DIR%



RE: Hardcoding a destination path in my backup file script

If you are trying to back up a server running apache, you might be better off asking in an apache forum here. With that said, how is the undesirable path being passed in? As parameter %1? If so just change the parameter when the batch file is called.

RE: Hardcoding a destination path in my backup file script

(OP)
Many thanks!

I'll investigate that; I think the web server is tomcat, I also noted that there is a secondary .bat nested in this script that I need to investigate.

Best regards

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close