Developing a Batch File to Back up a complete proyect

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

J.Calvo
Participant
Posts: 53
Joined: Fri Oct 09, 2009 4:21 am

Developing a Batch File to Back up a complete proyect

Post by J.Calvo »

Dear,

I have a problem with one of the tasks that i have to do now in my company. I explain:

I have to configure a new Datastage Server with a new repository, because of until now we haven't a disaster recovery plan for it.

I think that the best solution is to develope a batch files which will be executed weekly or daily at nights.

In our server we have three proyects, Production, Test and Development.

I have developed three scripts with commands like:

REM *****************************************
REM *****************************************

if not exist "c:\backups_dsx\ETL_Desarrollo\%DATE:/=_%" mkdir "c:\backups_dsx\MY_PROYECT\%DATE:/=_%"

c:\ibm\InformationServer\Clients\Classic\DsExport.exe /H=MY_SERVER /U=MY_USER /P=MY_PASSWORD MY_PROYECT C:\Backups_DSX\ETL_Desarrollo\%DATE:/=_%\MY_PROYECT.DSX

REM *****************************************
REM *****************************************

With this script i have been could to export datastage elements, but the read only elements have not been included.

what is the command to do it correctly?

Best Regards!
Best Regards,
Jorge Calvo
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Just download DataStageBackup.bat from my tips page.
Mamu Kim
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

If you are on release 8.1, and install the comprehensive IS Manager / istool patch for 8.1, you can use the new istool command to backup your entire project as well.

look for previous post I did on syntax.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
J.Calvo
Participant
Posts: 53
Joined: Fri Oct 09, 2009 4:21 am

Re: Developing a Batch File to Back up a complete proyect

Post by J.Calvo »

Hi, we have version 8.0 i think...

In designer when i clic on "Help > About to" I can read 8.0.

What i have to do? Upgrading server to 8.1 and installing a tool named "comprehensive IS Manager / istool patch for 8.1" the backup will be complete?

Please could you post the links to download the resources that i need?

Thanks
Best Regards,
Jorge Calvo
J.Calvo
Participant
Posts: 53
Joined: Fri Oct 09, 2009 4:21 am

Re: Developing a Batch File to Back up a complete proyect

Post by J.Calvo »

kduke: Thanks you, but in your script, the command whitch is generated is the same with the same options that mine when export, and i have the same problem, when the export is completed, some elements have not been exported, because are only read elements.
Best Regards,
Jorge Calvo
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What 'read only elements', precisely? Typically, they are the items you don't need to backup as they install with the product in every project. In other words, this may be a non-issue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
J.Calvo
Participant
Posts: 53
Joined: Fri Oct 09, 2009 4:21 am

Re: Developing a Batch File to Back up a complete proyect

Post by J.Calvo »

For example, some server jobs hasn't been exported.
Best Regards,
Jorge Calvo
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? Some server jobs? Because they're read-only or because they're locked? Are any other read-only jobs exported? All my projects outside of dev are read-only and export just fine. How are your jobs made read only - via Version Control or some other mechanism?

You need to do a little research here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
J.Calvo
Participant
Posts: 53
Joined: Fri Oct 09, 2009 4:21 am

Re: Developing a Batch File to Back up a complete proyect

Post by J.Calvo »

I'm not sure,
Is possible, the proyects may be locked, but i can open this in the server without any problem, Where and How can I test this point?
Best Regards,
Jorge Calvo
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not the project but asking if any of the jobs were locked when you exported. If you can open them in Designer, then they're not locked. Also, there's a "log" file that should be generated during the export that lists any issues, do you ever see that file afterwards?
-craig

"You can never have too many knives" -- Logan Nine Fingers
J.Calvo
Participant
Posts: 53
Joined: Fri Oct 09, 2009 4:21 am

Post by J.Calvo »

Yes, I have revised this point and I have checked that the jobs aren't locked.

When I export from command line, in the log only i'm advised which some elements have not been exported because are read only elements.

I try to export without command line tools, and I have selected "export read only items". Next I have edited the DSX file and I have replaced the string ReadOnly "1" to the string ReadOnly "0". Then this items are not read only items, but when i import the proyect i can see that some jobs are not been exported.

The Read Only Items wasn't the elements witch I have not found in the proyect export file. The problem may be other one.
Best Regards,
Jorge Calvo
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sounds like the problem is something else entirely, if objects get skipped the repository indexes may be corrupted. The ones that were skipped, can you export them individually, by component?
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's a good next step but you MUST ensure that there are no other processes of any kind in the project.
-craig

"You can never have too many knives" -- Logan Nine Fingers
J.Calvo
Participant
Posts: 53
Joined: Fri Oct 09, 2009 4:21 am

Post by J.Calvo »

I Have Rebooted the server, i have killed the sessions, and rebuild the indexes, ...

The export process is running now.... i will be waiting.
Best Regards,
Jorge Calvo
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

[crosses fingers]
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply