Changes

Jump to navigation Jump to search
Line 1: Line 1: −
 
+
{{Languages|AutoMysqlBackup}}
 
==Automysqlbackup==
 
==Automysqlbackup==
 
[http://sourceforge.net/projects/automysqlbackup/ AutoMySQLBackup] associates with DB configuration will create Daily, Weekly and Monthly backups of your MySQL databases. At least there is no panel in the server-manager but the configuration is quite simple with few commands listed above, handle by "config setprop automysqlbackup". I'm fairly sure that you do not have to modify huge options except the mail where logs and files are sent.
 
[http://sourceforge.net/projects/automysqlbackup/ AutoMySQLBackup] associates with DB configuration will create Daily, Weekly and Monthly backups of your MySQL databases. At least there is no panel in the server-manager but the configuration is quite simple with few commands listed above, handle by "config setprop automysqlbackup". I'm fairly sure that you do not have to modify huge options except the mail where logs and files are sent.
Line 20: Line 20:  
==Installation==
 
==Installation==
 
====For SME8====
 
====For SME8====
This contrib is in the [[Stephdl|'''stephdl''']], you have to enable it before to install the contrib
+
This contrib is in the [[Stephdl|'''stephdl''']] repository, you have to enable it before to install the contrib
    
</noinclude>
 
</noinclude>
Line 38: Line 38:  
  config set UnsavedChanges no
 
  config set UnsavedChanges no
   −
====For SME9====
+
====For SME9 and SME10====
    
  yum install --enablerepo=smecontribs smeserver-automysqlbackup
 
  yum install --enablerepo=smecontribs smeserver-automysqlbackup
 
  config set UnsavedChanges no
 
  config set UnsavedChanges no
 +
 +
You can also install pigz for multi CPU support which can speed up your backups and remove the warning from the status email:
 +
 +
yum --enablerepo=epel install pigz
    
==smeserver Panel==
 
==smeserver Panel==
Line 59: Line 63:     
* Each 30 Minutes
 
* Each 30 Minutes
   config setprop automysqlbackup Hour * Minute */30
+
   config setprop automysqlbackup Hour '*' Minute '*/30'
   signal-event nethserver-automysqlbackup-update
+
   signal-event automysqlbackup-update
    
* Each Hour
 
* Each Hour
   config setprop automysqlbackup Hour */1 Minute 1
+
   config setprop automysqlbackup Hour '*/1' Minute 1
   signal-event nethserver-automysqlbackup-update
+
   signal-event automysqlbackup-update
    
* At 3 Hour Am
 
* At 3 Hour Am
 
   config setprop automysqlbackup Hour 3 Minute 1
 
   config setprop automysqlbackup Hour 3 Minute 1
   signal-event nethserver-automysqlbackup-update
+
   signal-event automysqlbackup-update
    
===Backup directory===
 
===Backup directory===
Line 85: Line 89:  
the possibility is given to you to save a local directory by automysqlbackup. I suppose that you can not use it for large folder but for a web site with its database it could be useful. not activated by default
 
the possibility is given to you to save a local directory by automysqlbackup. I suppose that you can not use it for large folder but for a web site with its database it could be useful. not activated by default
 
  config setprop automysqlbackup Backup_local_files /path/to/folder
 
  config setprop automysqlbackup Backup_local_files /path/to/folder
 +
 +
===Mysql53, Mysql55, Mysql57, MariaDB===
 +
 +
With SCL on SME you may be running other database versions.
 +
 +
You must make sure you have a backup user for the newer databases
 +
 +
Creating backup user for default mysql53 database
 +
done
 +
*** If you add mysql55/mysql57 you must add a backup user ***
 +
You can use the password from config show automysqlbackup
 +
e.g.:
 +
mysql55 -e " GRANT EVENT,SELECT,LOCK TABLES ON *.* TO backupuser@'localhost' "
 +
mysql55 -u root -e "SET PASSWORD FOR backupuser@localhost = PASSWORD( ' -from config show automysqlbackup DbPassword- ' ) "
 +
 +
We can now choose other databases to backup:
 +
 +
mysql53, mysql55, mysql57, mariadb
 +
 +
You can enable or disable as follows:
 +
 +
config setprop automysqlbackup Mysql55 enabled
 +
signal-event automysqlbackup-update
 +
 +
====For Koozali SME v10====
 +
 +
The default Maria 5.5 is included. To add Maria 10.5 added via the contrib:
 +
 +
config setprop automysqlbackup Mymaria105 enabled
 +
signal-event smeserver-automysqlbackup-update
    
===Encryption===
 
===Encryption===
Line 116: Line 150:     
===Mailto===
 
===Mailto===
you can choose the mail  account where you sent your mails '''(default is the mailbox admin of your server)'''.
+
 
 +
You can choose the mail  account where you sent your mails '''(default is the mailbox admin of your server)'''.
 +
 
 +
Note that this may not work to places like Gmail or Microsoft as it bypasses DKIM etc and their checking is extremely strict.
    
  config setprop automysqlbackup Mailto foo@foo.com
 
  config setprop automysqlbackup Mailto foo@foo.com
Line 125: Line 162:  
  config setprop automysqlbackup Sizemail 8000
 
  config setprop automysqlbackup Sizemail 8000
 
{{note box|keep in mind that a lot of smtp server reject mail bigger than 10 000 KB or 10MB}}
 
{{note box|keep in mind that a lot of smtp server reject mail bigger than 10 000 KB or 10MB}}
 +
 +
 +
===Debug===
 +
 +
This should enable some logging to be emailed when it runs:
 +
 +
config setprop automysqlbackup debug enabled
 +
signal-event smeserver-automysqlbackup-update
    
==Manual Settings==
 
==Manual Settings==
Line 155: Line 200:     
==Known Issues==
 
==Known Issues==
 +
 +
===Skip mysql.event===
 
* Warning: Skipping the data of table mysql.event. Specify the --events option explicitly. SOLVED in [[bugzilla:8146]]
 
* Warning: Skipping the data of table mysql.event. Specify the --events option explicitly. SOLVED in [[bugzilla:8146]]
see http://www.linuxbrigade.com/warning-skipping-data-table-mysql-event/#more-135
+
See http://www.linuxbrigade.com/warning-skipping-data-table-mysql-event/#more-135
see tha discussion http://bugs.mysql.com/bug.php?id=68376
+
See this discussion http://bugs.mysql.com/bug.php?id=68376
some solutions :  
+
 
 +
=== Empty backupdir key===
 +
* Don't leave this key blank or you may get errors:
 +
 
 +
config show automysqlbackup Backupdir
 +
 
 +
The system will try and default to /root/backup/db but you may get issues if it is empty
 +
 
 +
See bugs [[bugzilla:10655]] and [[bugzilla:10654]]
 +
 
 +
===Backup databases===
 +
* Some solutions :  
 +
 
 
if we want to backup databases
 
if we want to backup databases
 
  mysqldump -uroot --events mysql > /tmp/mysql.sql
 
  mysqldump -uroot --events mysql > /tmp/mysql.sql
Line 167: Line 226:     
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the smeserver-automysqlbackup component or use  
 
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the smeserver-automysqlbackup component or use  
{{BugzillaFileBug|product=SME%20Contribs|component=smeserver-automysqlbackup |title=this link}}.
+
{{BugzillaFileBug|product=SME%20Contribs|component=smeserver-automysqlbackup |title=this link}}.
 +
 
 +
 
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id |order=desc |disablecache=1 |component=smeserver-automysqlbackup |noresultsmessage="No open bugs found."}}
      −
{{#bugzilla:columns=id,product,version,status,summary |sort=id |order=desc |component=smeserver-automysqlbackup |noresultsmessage="No open bugs found."}}
+
==Changelog==
   −
===Changelog===
   
Only released version in smecontrib are listed here.
 
Only released version in smecontrib are listed here.
  

Navigation menu