| Author |
Message |
JNMann
uses MSD regulary

Joined: 10 Apr 2011
Posts: 17

|
Posted:
2011-04-10, 22:24 New installation - How to automate backup |
  |
I have just installed mysqldumper and managed to get it to backup/restore.
I would now like to set it up to do this automatically at set periods but have little understanding of cronjobs etc.
Can someone talk me through this procedure please?
Also, should I limit the number of backups to say 1 or 2 daily or would it be ok to backup more frequently? Does this have any effect on the website?
Many thanks in advance,
Justin :-)
|
|
  |
 |
Anzeigen
|
Posted:
Anzeigen |
 |
|
| |
 |
Jens_K
Moderator

Age: 37
Joined: 04 Sep 2007
Posts: 1710
Location: Nähe Bielefeld

|
Posted:
2011-04-10, 23:01 (No subject) |
  |
All you have to do, is described on the perl backup page inside MySQLDumper.
You just have to edit the crondum.pl file to insert the value for "absolute_path_of_configdir".
Then you have to set up a cronjob with the syntax described in "Commandline in the Shell or for the Crontab".
As we don't know how you set up cronjobs with your hosting plan, we can't give you a detailed description on how to do that. Maybe ask your hosting provider to guide you.
You can set up as many backup cronjobs as you like, even one backup every 5 minutes.
As long as your work/backup folder doesn't run out of diskspace to store your backups you'll be fine. Maybe you should have a look into the "auto delete" functionality of MySQLDumper, located in the configuration / autodelete section.
A backup does not affect your website, as the only thing a backup does, is reading the MySQL tables. It does not write to any of them.
If you have a really frequented website with lots of new data stored into the MySQL database, maybe you want to prevent e.g. new postings in a board software while you are doing a backup, that way, the backup will not be inconsistent as the tables are interconnected to each other.
_________________ It's like math-camp all over again ... not ... that i've ever been to math-camp!
mein Blog
|
|
   |
 |
JNMann
uses MSD regulary

Joined: 10 Apr 2011
Posts: 17

|
Posted:
2011-04-10, 23:18 (No subject) |
  |
I use cpanel, can I set up the cron jobs in there? Sorry, this is my first contact with cron and perl etc :-(
|
|
  |
 |
Jens_K
Moderator

Age: 37
Joined: 04 Sep 2007
Posts: 1710
Location: Nähe Bielefeld

|
Posted:
2011-04-10, 23:52 (No subject) |
  |
|
   |
 |
JNMann
uses MSD regulary

Joined: 10 Apr 2011
Posts: 17

|
Posted:
2011-04-11, 20:02 (No subject) |
  |
Brilliant, many thanks for the help here. Just got the automatic backup working :-) I've set it up on my test site and I've set it to attach the small sql database to the email. When i go live on my normal site, what's the best way to do it? The backup size is only 14Mb but still a little on the large side to be having emailed every few hours. Can it be set to enter into a certain directory on the host or better still on a different host?
|
|
  |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16073
Location: Reichenberg bei Würzburg

|
Posted:
2011-04-11, 20:13 (No subject) |
  |
You can split the backup into several parts which may let you bypass any size limits for your e-mail account (take a look at the option "Multipart") or you can transfer the backup via ftp to another server. It's up to you.
Of course you could use the ftp function to transfer the backup to another directory of your choice located on the same server. You just have to make sure, that the ftp user has write access to the target folder.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
JNMann
uses MSD regulary

Joined: 10 Apr 2011
Posts: 17

|
Posted:
2011-04-11, 21:36 (No subject) |
  |
Working a treat, backing up to 2 different webspaces, nice one :-)
I have 3 databases and only want 1 to be backed up, whereabouts do I select just this one? I thought Config...Databases and then tick the box but I assume I'm wrong.
|
|
  |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16073
Location: Reichenberg bei Würzburg

|
Posted:
2011-04-11, 21:58 (No subject) |
  |
Go to "configuration / databases", check "activate MultiDump" and check the databses(s) you want to be backed up.
Now you just need to tell the Perl script, that it should use the MultiDump settings,
Switch to "Cronscript" and at "Database" choose "=Multidump Configuration=".
Save your settings and you are done.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
JNMann
uses MSD regulary

Joined: 10 Apr 2011
Posts: 17

|
Posted:
2011-04-11, 22:31 (No subject) |
  |
Getting to grips with it all now, many thanks for your help :-)
|
|
  |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16073
Location: Reichenberg bei Würzburg

|
Posted:
2011-04-11, 22:37 (No subject) |
  |
Thats what this forum is for.
Have fun using MySQLDumper.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
rkleivel
knows MySQLDumper

Joined: 23 Jan 2012
Posts: 6

|
Posted:
2012-01-23, 16:22 (No subject) |
  |
Quote: Switch to "Cronscript" and at "Database" choose "=Multidump Configuration=".
I don't get Multidump to work using the perl script - only the first selected db in the Multidump config gets backed up.
If executing "Start New Backup" under "Backup (PHP)" however, the selected Multidump db's get backed up.
Using 1.24.4
Thanks for promising software - and any help
Roald
|
|
  |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16073
Location: Reichenberg bei Würzburg

|
Posted:
2012-01-23, 16:49 (No subject) |
  |
You'll have to configure the Perl-Backup correctly.
Click Configuration / Cronscript and set "Database" to "Multidump Configuration". Hit save and that should do the trick.
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
rkleivel
knows MySQLDumper

Joined: 23 Jan 2012
Posts: 6

|
Posted:
2012-01-23, 16:54 (No subject) |
  |
Well -- I did read it, that's why I qouted it But still only the first DB gets backed up using Perl. The PHP-way is fine though...
Thanks for quick reply anyway...
|
|
  |
 |
DSB
Developer


Age: 41
Joined: 30 Apr 2004
Posts: 16073
Location: Reichenberg bei Würzburg

|
Posted:
2012-01-23, 17:14 (No subject) |
  |
« rkleivel » wrote: Well -- I did read it, that's why I qouted it
You are right. I saw this afterwards and edited my posting - but you were faster than I was.
Check the file work/config/mysqldumper.conf.php
These are the settings used by the perl script. Watch the parameter @cron_db_array . Does it hold the databases you have selected on the multidump-screen?
_________________ Gruß / Greetings, DSB
Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.
|
|
    |
 |
rkleivel
knows MySQLDumper

Joined: 23 Jan 2012
Posts: 6

|
Posted:
2012-01-23, 17:18 (No subject) |
  |
No, it only contains the first database - the one that gets backed up. Certainly on track here
|
|
  |
 |
|
|