 |
 |
 |
 |
Registered: 06/07/07
Posts: 4
|
|
|
 |
 |
 |
 |
|
 |
 |
 |
 |
#184181 - 05/12/07 02:18 PM
Cron + Backup Database
|
Carpal Tunnel
|
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
|
|
I do think this is somthing all Threads 7 users should know. Cron + Backup Database. Hi ive been rummaging around the tinternet, and looking for a solution to backup mysql database and also make it into a cron job for nightly back ups. Why?Well coming from classic we didnt have to worry about databases and looking after them, so if there was documentation covering this with Thread 6 then i dont have that documentation.So now i'm on V7 Threads, and its all new, i'm now getting worried about backups and making sure i have steps in place if somthing was to go wrong or DIE. Currently i'm manually downloading them via my server control panel not phpadmin but via Direct Admin.(cp) But there only about 30mb .tar.gz But that is sure to grow and grow and then my problems will start. So i'm asking for help with this as i have read on numerous occasions that once your database gets to xx size or time out your asking for problems, and i would like to at the least begin to address this before its too late. MySQL Export: mysqldump -uusername -ppassword dbname > dbname.sql MySQL Import: mysql -h localhost -uusername -ppassword dbname < dbname.sql I want be able to make a cron job (Script) to automate this in the night. Links or any Help and advice would be appreciated.  Rather than tears later. Thanks.
_________________________
Version v7.5.6 < Threads satisfaction status People who inspire me Rick Gizmo Ian David jgeoff ntdoc Oooo i hear 8 is coming? just after 7 my friend.
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
|
Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#184187 - 05/12/07 04:41 PM
Re: Cron + Backup Database
[Re: Philipp]
|
Carpal Tunnel
|
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
|
|
Thank you  I have the option via my cp (Direct Admin) to select the path where the script would be located, and the cron can run from there, well that's what I'm going to try. What's your thoughts on this one? I found it on a google search ? Good or Bad ? Its big but covers a lot of things too, e-mailing when done? Or is it just over the top. Link Thanks for any help 
Edited by Mark S (05/12/07 08:27 PM) Edit Reason: Removed the copy and paste as it was Huuuuuge lol
_________________________
Version v7.5.6 < Threads satisfaction status People who inspire me Rick Gizmo Ian David jgeoff ntdoc Oooo i hear 8 is coming? just after 7 my friend.
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#184190 - 05/12/07 06:22 PM
Re: Cron + Backup Database
[Re: gliderdad]
|
Carpal Tunnel
|
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
|
|
Help i have a problem  Its either something stupid or something worse? I'm in at root and i'm running the command just to test the paths before a start any scripts. I get this error and a google search shows 5 results  mysqldump: Got error: 1103: Incorrect table name 'test.sql' when doing LOCK TABLES To get that error i'm typing in the following. User name and passwords are changed. mysqldump -uXXXX -p1234 my_table test.sql Ive been trying to sort it for hours now  My Table name does have something similar too my_table but that's it? i can connect in via the command line. and if i run the mysqldump with out a file name mysqldump -uXXXX -p1234 my_table it wizzes past my screen in Putty and stops thankfully. Any ideas Help !?
_________________________
Version v7.5.6 < Threads satisfaction status People who inspire me Rick Gizmo Ian David jgeoff ntdoc Oooo i hear 8 is coming? just after 7 my friend.
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#184343 - 05/17/07 10:26 AM
Re: Cron + Backup Database
[Re: Gizmo]
|
Carpal Tunnel
|
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
|
|
Ive decided to go for a re-install ;( Its the only way to be sure about the ownership of the file being correct and preventing future problems too. I tweaked one of my forums today and got a snotty reply. /home/domains/mysite.co.uk/public_html/forums/libs/mysql.inc.php on line 210 As i'm still finding that ownerships are still messed up, but give me some credit ?? I fixed it went in and made the mysql permissions back to mysql, and it seems to be working now. In a spooky kind of a way ive learned so much in a short time, and continue to learn 
_________________________
Version v7.5.6 < Threads satisfaction status People who inspire me Rick Gizmo Ian David jgeoff ntdoc Oooo i hear 8 is coming? just after 7 my friend.
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#184396 - 05/17/07 07:08 PM
Re: Cron + Backup Database
[Re: Mark S]
|
|
Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
|
|
|
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
|
|