• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Automat backup

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends Im here with a big headache,

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
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a process should trigger automatically from the server and take all the backups daily or whatever.

Are you referring to backups of your database? Please clarify.
 
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Jenn Person
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you need job scheduling mechanism, try Quartz


Sample uses of job scheduling with Quartz:

  • 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.

  •  
    Ranch Hand
    Posts: 2308
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Hussam Bamatraf:
    If you need job scheduling mechanism, try Quartz



    Quartz is a very sophisticated tool for this purpose.If is a simple backup program then you even might consider java's Timer and TimerTask classes.
     
    Bartender
    Posts: 6663
    5
    MyEclipse IDE Firefox Browser Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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.
     
    Ranch Hand
    Posts: 160
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic