Hi QM, The upload is being done within the servlet itself. So I would, as you suggest, put the backup at the head of that.
The OS is linux, and I note your comment about the potential memory issues. Can you think of any other issues with running Runtime.getRuntime().exec(String cmdline) from within a Servlet -- for example, whether Tomcat has privileges to access the script, etc.? I'm just trying fathom, as quickly as possible, whether there are any "show stoppers" in using this solution. Thanks, Frank. ----- Original Message ----- From: "QM" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Wednesday, May 19, 2004 2:52 PM Subject: Re: Database backups initiated from Tomcat > On Wed, May 19, 2004 at 02:04:33PM +0100, Frank Burns wrote: > : I have an urgent requirement where I have to initiate a database backup (of > : three mySQL tables) prior to performing an upload and update of the > : database. > > How is the update/upload being done? commandline/mysql session, within > the servlet itself, etc? You could put the backup at the head of that > procedure. > > > : 1) tell me whether this is possible -- i.e., running the mysqldump script > : from a servlet > > The one way that comes to mind is Runtime.exec(), but that may cause > memory issues since (under Unix-like OSs) it calls fork(). If the > container has been allocated a lot of memory, well... > > > : 2) give me any clues/details on the best way to do this? > > If this *must* be done within a servlet, I don't see many options other > than Runtime.exec()... > > -QM > > ps- please create a new message when posting to the list. Replying to > an old (unrelated) message causes hell on thread-aware mailers, even if > you change the subject. Thanks. > > > -- > > software -- http://www.brandxdev.net > tech news -- http://www.RoarNetworX.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
