Client-side backups using " dscmdexport"

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Client-side backups using " dscmdexport"

Post 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?
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

:oops: using that one myself
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Cool - I'll hop over to ADN and perform my first download.

Thanks for the advice.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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.
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post 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.
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post 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/
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
garthmac
Charter Member
Charter Member
Posts: 55
Joined: Tue Oct 21, 2003 9:17 am
Location: UK

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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

garthmac
Charter Member
Charter Member
Posts: 55
Joined: Tue Oct 21, 2003 9:17 am
Location: UK

Post by garthmac »

Thanks Arnd and Craig, amazingly quick replies! :)
Post Reply