Im developing a web base app in windows xp environment. Im using servlets and jsp. Im using tomcat as the web container and mysql as the backend. I need to automate the backup process (ie) a process should trigger automatically from the server and take all the backups daily or whatever.
Can anydoby help me to find a solution for this? plzzzzzzzzzzzzzzzzzzz
Servlets and JSP are not an appropriate technology choice for this.
Rather, you should use whatever facilities your native OS uses to schedule background operations. For example cron on Linux and OS X. Windows has some sort of scheduler thingy but I'm not sure of the details.
I agree with Bear, if you want to backup your database, then Servlets and JSP is a poor choice. You'll have to create something in DOS since you're using Windows to run a MySQL dump on the interval you want. [ May 15, 2007: Message edited by: Jenn Person ]
Driving Workflow: As a new order is initially placed, schedule a Job to fire in exactly 2 hours, that will check the status of that order, and trigger a warning notification if an order confirmation message has not yet been received for the order, as well as changing the order's status to 'awaiting intervention'.
System Maintenance: Schedule a job to dump the contents of a database into an XML file every business day (all weekdays except holidays) at 11:30 PM.
SCJP 90%<br />FileNet Certified Professional: Content Management Developer 92%<br />FileNet Certified Professional: Business Process Management Developer 92%
Where do you need to backup the DB ? As others have mentioned, servlets and JSPs wont do good here. They are not meant to do database backups. What you need is a scheduler or a DB specific tool that does auto back ups.
As mentioned before, the backup process should be handled outside of your web container.
mysqldump is the appropriate tool. Window has a scheduling facility, "Scheduled Tasks", and even a Cron service with Windows SFU. You can also schedule backups from within MySQL (MySQL Admin->backup->new project->schedule).
In addition, I would suggest using a separate machine for backups. This machine should be well suited for the task, providing redundant disk storage of your data. It is not a bad idea to keep an archive of the backups either.
I use MySQL on Linux. Without giving to much away about our configuration, here is some information about our backups.
The backup user (username something other than backup), has a limited shell. The backup user only has read access and can only connect from a particular IP/hostname. no user besides root and the backup user can view the backup home dir, script, or resulting dump files. The dump files are compressed and encrypted