# Daily database export?

**URL:** <https://forum.inductiveautomation.com/t/daily-database-export/34264>\
**Category:** Ignition\
**Tags:** ignition80, database\
**Created:** [April 28, 2020, 1:25pm UTC](https://forum.inductiveautomation.com/t/daily-database-export/34264 "2020-04-28T13:25:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [April 28, 2020, 1:25pm UTC](https://forum.inductiveautomation.com/t/daily-database-export/34264/1 "2020-04-28T13:25:44Z")

</div>

My Vision app has a gateway script that runs a batch a file every 2 am to export our MySQL 5.6 database. This worked well enough for a while until another developer deleted a column from a table that was used in a view, and this caused the export command to fail, but I had no knowledge of until checking our file system and seeing we didn’t have any backups from the last week. Ignition I suppose isn’t able to catch errors once it dispatchs the batch file to run, that becomes it’s own process. It was pretty hard to troubleshoot in it’s own right.

Now, I am having issues again, my batch file isn’t working, I cannot I cannot tell why, and I AM able to successfully export from MySQL Workbench without issue. If I trigger the gateway script it seems to work sometimes and not others, and I have no clue why. My question is, is there a different way I can back up my database daily with Ignition so that any errors I would see logged?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 28, 2020, 1:53pm UTC](https://forum.inductiveautomation.com/t/daily-database-export/34264/2 "2020-04-28T13:53:43Z")

</div>

Why not put your batch file into the Windows Task Scheduler?

Also, the batch file should be writing to a log file of some sort so you can see what it’s doing. Use ignition to monitor the log file.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [April 28, 2020, 2:20pm UTC](https://forum.inductiveautomation.com/t/daily-database-export/34264/3 "2020-04-28T14:20:22Z")

</div>

Ok these are good suggestions. I have to learn more about Batch files first I suppose ha. Thanks.
