Author |
Thread |
gibaphp |
Published: 2005/6/27 3:58 Updated: 2005/6/27 3:58 |
Just popping in
Joined: 2005/2/8
From:
Comments: 4
|
 Re: Regular Database Backup with Cron(Updated)
Bello article, very good, congratz 
|
|
|
Guest |
Published: 2005/7/1 9:20 Updated: 2005/7/1 9:20 |
|
 Re: Regular Database Backup with Cron(Updated)
Yes. As many of webmasters, in our case xoops users, forget this point, it's a goog thing to talk about it. Hosts usually have backups and they use them in case of server crash/hack. We did experiment the use of our self backup one day on our portal. It was a big day with many solutions found on our support forum. In the middle of the day, hour host server went down (hacked). Less than a couple of hours, our site was online again... but a the last backup state : the day before ! Imagine what to tell to the people who worked arround our forums.... Lucky, we had just found this solution... We where able to restaure our backup in 5 minutes and we only lost a couple of topics. Now, the scripts are modularised. Conclusion : Backup your bases yourself and test script with high volumes... ++ R&B from http://www.WDForge.org
|
|
|
Guest |
Published: 2006/1/8 17:40 Updated: 2006/1/8 17:40 |
|
 Re: Regular Database Backup with Cron(Updated)
However the only problem is if you're host doesn't support cron jobs. In which case use one of the backup modules.
|
|
|
Guest |
Published: 2006/1/16 10:25 Updated: 2006/1/16 10:25 |
|
 Re: Regular Database Backup with Cron(Updated)
can you get the cron job to send backup to another server?
|
|
|
jseymour |
Published: 2006/1/16 12:39 Updated: 2006/1/16 12:39 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
Yes, you may need to edit the SQL file to reflect the new mysql server name. But it can be done with no troubles.
|
|
|
Guest |
Published: 2006/3/24 2:18 Updated: 2006/3/24 2:18 |
|
 Re: Regular Database Backup with Cron(Updated)
Hi John
Thanks for your article. I am new to this cron stuff and would like to know - once I have set up the script and saved it in a file, how can I test it?
Thanks
|
|
|
jseymour |
Published: 2006/3/24 10:40 Updated: 2006/3/24 10:40 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
usually, you would create a test site (either on your server or on your local computer) and the test will duplicate your production site.
|
|
|
JimKarvo |
Published: 2006/4/7 21:36 Updated: 2006/4/7 21:36 |
Just popping in
Joined: 2006/2/13
From:
Comments: 13
|
 Re: Regular Database Backup with Cron(Updated)
I paste your code!
Where is my file?
I gave my e-mail! It will be sent me by e-mail?
|
|
|
jseymour |
Published: 2006/4/7 23:57 Updated: 2006/4/7 23:57 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
It depends on your server setup as to where the file is. Should by default be in the /home folder for the user. 
|
|
|
JimKarvo |
Published: 2006/4/8 8:33 Updated: 2006/4/8 8:33 |
Just popping in
Joined: 2006/2/13
From:
Comments: 13
|
 Re: Regular Database Backup with Cron(Updated)
I get that error:
mysqldump: Got error: 1130: Host '***.***.***.***' is not allowed to connect to this MySQL server when trying to connect
What I can do?
|
|
|
jseymour |
Published: 2006/4/8 8:39 Updated: 2006/4/8 8:39 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
Is mysql on a separate server? Or on localhost?
If on localhost (same server as the web server) take out the "host" section of the script, it is localhost by default.
|
|
|
JimKarvo |
Published: 2006/4/8 12:43 Updated: 2006/4/8 12:43 |
Just popping in
Joined: 2006/2/13
From:
Comments: 13
|
 Re: Regular Database Backup with Cron(Updated)
OK, done!
But I have a question!
Can it did send my sql file by e-mail?
|
|
|
jseymour |
Published: 2006/4/8 15:26 Updated: 2006/4/8 15:26 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
No, synchronize to your computer via ftp.
|
|
|
JimKarvo |
Published: 2006/4/8 16:02 Updated: 2006/4/8 16:02 |
Just popping in
Joined: 2006/2/13
From:
Comments: 13
|
 Re: Regular Database Backup with Cron(Updated)
How?
|
|
|
jseymour |
Published: 2006/4/8 16:13 Updated: 2006/4/8 16:13 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
My FTP programs allows me to synchronize a folder on the server to a folder on my computer. Otherwise just download it from the server with an FTP program of your choice. I use Directory Opus 8 for FTP. But any should work. 
|
|
|
JimKarvo |
Published: 2006/4/8 16:38 Updated: 2006/4/8 16:38 |
Just popping in
Joined: 2006/2/13
From:
Comments: 13
|
 Re: Regular Database Backup with Cron(Updated)
hm.. and if filename already exist in my PC, How I can rename it [I will use yous programm]
|
|
|
jseymour |
Published: 2006/4/8 16:43 Updated: 2006/4/8 16:43 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
You can either rename it on the server, or do as I do. I create 7 cron jobs, one runs each day with 7 different file names. That way I keep one weeks backup before overwriting the files again. One week (for me) is enough to be sure I do not miss any errors and gives me a chance to restore.
So my backups are good for 7 days then are overwritten with new the next time around.
|
|
|
JimKarvo |
Published: 2006/4/13 15:31 Updated: 2006/4/13 15:31 |
Just popping in
Joined: 2006/2/13
From:
Comments: 13
|
 Re: Regular Database Backup with Cron(Updated)
If I want to make a backup all of my databaze, what changes I must do?
|
|
|
jseymour |
Published: 2006/4/14 4:02 Updated: 2006/4/14 4:02 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
To backup all databases on your server modify the script in the following structure:
mysqldump [OPTIONS] --all-databases [OPTIONS]
Just where you specify the database, put "--all-databases".
|
|
|
JimKarvo |
Published: 2006/4/14 9:06 Updated: 2006/4/14 9:06 |
Just popping in
Joined: 2006/2/13
From:
Comments: 13
|
 Re: Regular Database Backup with Cron(Updated)
No,
I want to make a full backup of my database!
|
|
|
jseymour |
Published: 2006/4/14 9:25 Updated: 2006/4/14 11:09 |
Webmaster
Joined: 2004/11/5
From: Ponte Vedra Beach, Florida
Comments: 201
|
 Re: Regular Database Backup with Cron(Updated)
The original script makes a full backup of a single database. What kind of problems are you having? Let's continue this discussion in This Forum, just create a new thread. Comments starting to get long here. 
|
|
|