Results 1 to 10 of 10
  1. #1

    Cron job request

    would you give me a script for cronjop to be able to restore db

  2. #2
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    If you are adding a cron job to restore a database, you will need to drop that database first., or the restore will give error.
    Something like this will do.

    mysqladmin -f drop dbname
    mysqladmin create dbname
    mysql dbname < path to the sql file

    Add this to a file and run the file as the cronjob.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  3. #3
    Quote Originally Posted by david510
    Add this to a file and run the file as the cronjob.
    Which file ?

    Where file ?

  4. #4
    man cron
    man crontab
    Dan - Vice President - [email protected]
    BurstNET Technologies - http://www.burst.net

  5. #5
    Quote Originally Posted by burstdan
    man cron
    man crontab
    can i run folllowing commands using cron

    HTML Code:
    mysql -u zodehala -p123 db < backup.sql
    HTML Code:
    mysqldump -u zodehala -p123 db | bzip2 -c > backup.sql

  6. #6
    Join Date
    Nov 2003
    Location
    India
    Posts
    152
    Hello
    But why do you want to do it via cronjob?

    cronjob/crontab is used to do some task repeatedly at certain interval of time, do you want to restore some db every few hours or minutes? if not then you don't need do it via cronjob

    Greets
    Last edited by funtoosh; 12-21-2006 at 05:54 AM.

  7. #7
    Quote Originally Posted by funtoosh
    Hello
    But why do you want to do it via cronjob?

    cronjob/crontab is used to do some task repeatedly at certain interval of time, do you want to restore some db every few hours or minutes? if not then you don't need do it via cronjob

    Greets
    there are no SSH an any restore tools

    how can i restore db (my db is 750MB)?
    Last edited by zodehala; 12-21-2006 at 07:57 AM.

  8. #8
    Join Date
    Dec 2006
    Location
    Germany
    Posts
    3
    zodehala: what exactly do you have to work with? without ssh it's gonna be difficult. most web interfaces have a limit on the amount of data that can be uploaded.

    chuck

  9. #9
    Join Date
    Nov 2003
    Location
    India
    Posts
    152
    Quote Originally Posted by zodehala
    there are no SSH an any restore tools

    how can i restore db (my db is 750MB)?
    Just upload it via ftp and ask your web hosting provider (as you don't have ssh access so i take for granted you don't have root access on it) to restore it for you

    Regards

  10. #10
    Thanks for all

    İ know db master in my hosting can restore db instead of me and
    i know restore / back up db using ssh (phpmyadmin for small db )

    and

    i want to know that is there any way to restore db except aboves ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •