Page 1 of 2

Client-side backups using " dscmdexport"

Posted: Wed May 18, 2005 8:23 am
by ArndW
At 7.5 I am using the dscmdexport client program to do a backup of my projects late at night [triggered by having to wait more than a day for a unix-level restore]. I have written a small windows .BAT to loop through all my projects and create a backup file with the date/time. I am calling the program from the Windows XP scheduler and the backup(s) themselves are going just fine - except at the end I get a pesky popup window telling me all about the read-only objects that were omitted from the export :shock: How can I either get the export not to generate that popup window or how can I make the batch mechanism ignore this window?

Posted: Wed May 18, 2005 8:27 am
by roy
Hi,
from the client performing the exports perform a manual export and in the option tab check the read only objects.
after that you should be fine.

IHTH,

Posted: Wed May 18, 2005 8:29 am
by chulett
Switch from the roll-your-own batch file to the spanky one available out on ADN. :wink: It doesn't have that issue, creates daily backup directories and has hooks for compressing all of my exports into a single zip. Not sure what it does special to avoid your issue, however.

Are you redirecting the output of the export command to some sort of log file?

Posted: Wed May 18, 2005 8:48 am
by roy
:oops: using that one myself

Posted: Wed May 18, 2005 9:02 am
by ArndW
Cool - I'll hop over to ADN and perform my first download.

Thanks for the advice.

Posted: Thu May 19, 2005 12:33 am
by roy
1 more thing,
though the gzip is disabled I enabled it and in fact am zipping my dsx files.
note that I did download a gzip utility since winzip insists on poping an interactive window even in certified version.

Posted: Thu May 19, 2005 1:01 am
by ArndW
Roy,

just as a note, you can download the command-line WinZip interface and I've used that for .bat programs and I haven't seen any popups.

Posted: Thu May 19, 2005 4:42 am
by PhilHibbs
roy wrote:Hi,
from the client performing the exports perform a manual export and in the option tab check the read only objects.
after that you should be fine.

IHTH,
Also, make sure you don't do a DS Manager export as .xml before running the backup. The dscmdexport chokes if the setting in the registry is for xml, see viewtopic.php?t=88214 for details. You are probably having a similar problem with a registry setting that is set by DS Manager.

Posted: Thu May 19, 2005 7:02 am
by chulett
ArndW wrote:just as a note, you can download the command-line WinZip interface and I've used that for .bat programs and I haven't seen any popups.
Which is exactly what I am using for this as well. You will have to have a real live registered version of WinZip before you can use the command line option. The -m or move option (don't recall the exact syntax) made it even nicer. :wink:

Posted: Tue May 24, 2005 2:49 am
by PhilHibbs
chulett wrote:You will have to have a real live registered version of WinZip before you can use the command line option.
Although I have a licenced copy of WinZip, I use the info-zip version:

http://www.info-zip.org/pub/infozip/

Posted: Tue May 24, 2005 6:51 am
by chulett
That's fine. Just wanted people to understand that while WinZip does have a command line option, it is only available if you actually own a registered copy. If you are still "evaluating" it after all these years, then you are out of luck. :wink:

Posted: Tue Jun 28, 2005 6:34 am
by garthmac
Arnd,

I'm in the process of setting up a .bat file to automatically create backup files of my projects, but I'm not sure of the syntax for putting a date/time as part of the filename. I would like to have "projectnameYYYYMMDD.dsx"
How did you do this? Surely this is straight forward, but initial searching on the internet has not been fruitful.

Thanks

Posted: Tue Jun 28, 2005 6:39 am
by chulett
If you are registered at ADN you could download their batch file that does all of that already and save yourself alot of trouble.

Posted: Tue Jun 28, 2005 6:41 am
by ArndW
Garth,

I use a windoze .bat file as follows, but I get the popup windows, if you change the backup command to dscmdexport it will work flawlessly:

Code: Select all

@Echo OFF
REM ***************************************************************************
REM ** Accept the name of a DataStage Project and create the backup of that  **
REM ** project in the current directory with the Date and Time appended to   **
REM ** project name.                                                         **
REM **                                                                       **
REM ** Revision: $Id$                                                        **
REM ** CR: 01422892                                                          **
Rem **                                                                       **
REM ** Vers. Date       User     Comments                                    **
REM ** ===== ========== ======== ============================================**
Rem ** 1.0.0 18-05-2005 AWussing Initial coding, testing & Implementation.   **
Rem ** 1.0.1 26-05-2005 AWussing Changed filenames around.                   **
Rem **                                                                       **
REM ***************************************************************************
   Rem ** Define constants **
   Rem **********************
   Set DataStageUserId=dsdev
   Set DataStagePassword=NoWayAreYouGettingMyPassword
   Set DataStageServer=mucfsd11
   Set CURRDATE=CurrentDate.Tmp
   Set CURRTIME=CurrentTime.Tmp
   Set LogFile=BackupLogFile

   Rem *************************
   Rem ** Begin program logic **
   Rem *************************
   TITLE BackupProjects
   IF %1.==. GoTo USAGE

   Rem ****************************************************
   Rem ** temporarily write current date & time to files **
   Rem ****************************************************
   DATE /T > %CURRDATE%
   TIME /T > %CURRTIME%

   Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
   For /F %PARSEARG% %%i in (%CURRDATE%) Do SET YYYYMMDD=%%l%%k%%j

   Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
   For /F %PARSEARG% %%i in (%CURRTIME%) Do Set HHMM=%%i%%j%%k

   c:\Progra~1\Ascential\DataST~1.5\dsexport.exe /H=%DataStageServer% /U=%DataStageUserId% /P=%DataStagePassword% %1 %YYYYMMDD%%HHMM%_%1.dsx
   GoTo END


:USAGE
   Echo Usage: ProjectBackup.bat {ProjectName }
   Echo Backs up DataStage project {ProjectName} to local file YYYYMMDDHHMMSS{ProjectName}.dsx
   Echo This is designed to be run at night as it does no error checking, i.e. when users are 
   Echo still logged into the project.

   GoTo END

:END
REM
TITLE Command Prompt


Posted: Tue Jun 28, 2005 6:45 am
by garthmac
Thanks Arnd and Craig, amazingly quick replies! :)