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.