| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

IXS based database export and backup

Page history last edited by PBworks 16 years, 10 months ago

 

This snippet of code (running on iSeries cat34) exports the contents of a mySQL database stored on IXS WWW1, placing it in the IFS where the normal iSeries backup will take care of it.

 

RMVLNK OBJLNK('/mysqlbackup/notabilitydb.sql')

   MONMSG CPFA0A9  /* File not present - ignore */

SBMNWSCMD CMD('net use y: \\cat34\root') SERVER(WWW1) AUTDMN(*LOCAL)

SBMNWSCMD CMD('c:\mysql\bin\mysqldump -uroot notabilitydb +

            >y:\mysqlbackup\notabilitydb.sql') +

            SERVER(WWW1) AUTDMN(*LOCAL)

SBMNWSCMD CMD('net use y: /delete') SERVER(WWW1) AUTDMN(*LOCAL)

/* Check success by making sure file now exists */

DSPLNK OBJ('/mysqlbackup/notabilitydb.sql') OUTPUT(*PRINT)

SNDDST TYPE(*LMSG) TOUSRID((SHAWM CATALYST)) +

         DSTD('MySQL dump successfully created') +

         LONGMSG('MySQL dump successfully +

         created') SUBJECT('MySQL dump +

         successfully created')

 

Comments (0)

You don't have permission to comment on this page.