The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cron jobs and phpmyadmin [moved]

Discussion in 'Data Protection' started by cry8wolf9, Jul 30, 2006.

  1. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    i was looking for the command to back up the database in phpmyadmin threw the cron jobs liek every week that part i can do but i need the comand to do it


    and also a list of other commands and what they do would be cool too
     
  2. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    does anyone know ?

    i mostly want a a way to back up my sql database threw cronjobs but i dont know the command

    and the reason i wanted teh list of the other commands is so i can set up a backup system for my forum

    so please help
     
  3. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    ok can someone tell me if its possible or not? ive used the search funtion but nothing use full turned up i just want a list of the commands ive looked in google but htey went help ful
    so is backing up your sql not possible using cron jobs??????
     
  4. systemtek

    systemtek Member

    Joined:
    Jul 21, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Staffordshire, England
    Something like :

    mysqldump -u "database user" -p"password" "databasename" > "backup file name"

    Please make sure that you do not give gap in between "p" and the password for the database user in the above format.
     
  5. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1

    for the back up file name what would i put for the whole data base and this is for the sql fight?
     
  6. systemtek

    systemtek Member

    Joined:
    Jul 21, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Staffordshire, England
    Example if your MySQL database is called phpbb_sales and the user is phpbb_sales and the password is hello :

    mysqldump -u phpbb_sales -phello phpbb_sales > /home/USERNAME/public_html/backup/phpbb_sales.sql

    It will put the file in the backup directory, ensure that if you do this the directory exists with correct permissions.
     
  7. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    oh ok thanks
     
  8. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    /bin/sh: line 1: /home/www/sql_back_up/kazuma_forums.sql: No such file or
    directory


    keep gettign that
     
  9. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    ?????anyone help please
     
  10. systemtek

    systemtek Member

    Joined:
    Jul 21, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Staffordshire, England
    As said before, If your a user on the server it will be something like :

    Example if your MySQL database is called phpbb_sales and the user is phpbb_sales and the password is hello :

    mysqldump -u phpbb_sales -phello phpbb_sales > /home/USERNAME/public_html/backup/phpbb_sales.sql

    It will put the file in the backup directory, ensure that if you do this the directory exists with correct permissions.

    Your error message makes no reference to your USERNAME ?

    Does the folder sql_back_up exist under www ? with correct permissions ?
     
  11. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    mysqldump -u kazuma_forums -p**** kazuma_forums > /home/www/sql_back_up/kazuma_forums.sql

    thats the exact line and the its under the www dir and it has 777 seet
     
  12. systemtek

    systemtek Member

    Joined:
    Jul 21, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Staffordshire, England
    Can i ask why there is no home/USERNAME ?
     
  13. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    ?????i dont usederstand
     
  14. systemtek

    systemtek Member

    Joined:
    Jul 21, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Staffordshire, England
    Well if you dont own your own server and like most people you have just had a domain name and or space from a web host, then when you login to cPanel you will login with a username and password, it is generally this username you need.

    Example if your MySQL database is called phpbb_sales and the user is phpbb_sales and the password is hello :

    mysqldump -u phpbb_sales -phello phpbb_sales > /home/USERNAME/public_html/backup/phpbb_sales.sql

    It will put the file in the backup directory, ensure that if you do this the directory exists with correct permissions.

    Replace USERNAME with your username that you use.

    Thanks
     
  15. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    ok im trying it know but just outa question will it make a new file every time it runs? or does it date the file and you can have a bunch of them at once?
    or is there a cron job that can replace the name with the date that it is run?

    also

    /bin/sh: line 1: /home/kazuma/public_html/sql_back_up/kazuma_forums.sql: No such
    file or directory
     
    #15 cry8wolf9, Aug 11, 2006
    Last edited: Aug 11, 2006
  16. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
  17. cry8wolf9

    cry8wolf9 Member

    Joined:
    Jul 30, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    *bump* anyone
     
Loading...

Share This Page