Line 10: |
Line 10: |
| - Incremental database backups | | - Incremental database backups |
| | | |
− | ===Maintainer===
| + | ==Maintainer== |
| [[User:stephdl|Stephane de Labrusse]] | | [[User:stephdl|Stephane de Labrusse]] |
| | | |
| mailto:stephdl@de-labrusse.fr | | mailto:stephdl@de-labrusse.fr |
| | | |
− | ===Installation===
| + | ==Installation== |
| For SME7 and Above. | | For SME7 and Above. |
| This contrib is not yet in the smecontribs repository, you have to download the rpm here and install it by the yum localinstall command. | | This contrib is not yet in the smecontribs repository, you have to download the rpm here and install it by the yum localinstall command. |
Line 24: |
Line 24: |
| The src.rpm can be found in the folder [http://mirror.de-labrusse.fr/Sme-Server/Automysqlbackup/ following] | | The src.rpm can be found in the folder [http://mirror.de-labrusse.fr/Sme-Server/Automysqlbackup/ following] |
| | | |
− | ===smeserver Panel===
| + | ==smeserver Panel== |
| | | |
| There is no panel for manage this contrib, you have to play with db configuration command but normally the options by default could be sufficient. | | There is no panel for manage this contrib, you have to play with db configuration command but normally the options by default could be sufficient. |
| | | |
− | ===DB command option===
| + | ==DB command option== |
| | | |
− | ====Backup directory====
| + | ===Backup directory=== |
| It is the folder where you save you database backup '''(default is /root/backup/db)''' | | It is the folder where you save you database backup '''(default is /root/backup/db)''' |
| config setprop automysqlbackup Backupdir path/to/other/folder | | config setprop automysqlbackup Backupdir path/to/other/folder |
Line 36: |
Line 36: |
| mkdir -p /path/to/other/folder | | mkdir -p /path/to/other/folder |
| | | |
− | ====Encryption====
| + | ===Encryption=== |
| If you wish to encrypt your backups using openssl '''(no is default)''' | | If you wish to encrypt your backups using openssl '''(no is default)''' |
| config setprop automysqlbackup Encrypt yes | | config setprop automysqlbackup Encrypt yes |
Line 44: |
Line 44: |
| {{Note box| This option may be useful when you want to save your databases outside of your server by sending them by mails. keep in mind to change the default password}} | | {{Note box| This option may be useful when you want to save your databases outside of your server by sending them by mails. keep in mind to change the default password}} |
| | | |
− | =====Decryption=====
| + | ===Decryption=== |
| To decrypt run : | | To decrypt run : |
| | | |
Line 54: |
Line 54: |
| -pass pass:01234567899876543210 | | -pass pass:01234567899876543210 |
| | | |
− | ====Mailcontent====
| + | ===Mailcontent=== |
| you can choose your type of mail send to the admin '''(log by default)''' | | you can choose your type of mail send to the admin '''(log by default)''' |
| config setprop automysqlbackup Mailcontent option | | config setprop automysqlbackup Mailcontent option |
Line 65: |
Line 65: |
| {{Tip box|Use the "'''files'''" option with the Mailcontent db to save your mysql databases in a mailbox outside of your server, moreover they are saved too in a local folder of your server (by default/root/backup/db)}} | | {{Tip box|Use the "'''files'''" option with the Mailcontent db to save your mysql databases in a mailbox outside of your server, moreover they are saved too in a local folder of your server (by default/root/backup/db)}} |
| | | |
− | ====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)'''. |
| | | |
| config setprop automysqlbackup Mailto foo@foo.com | | config setprop automysqlbackup Mailto foo@foo.com |
| | | |
− | ====Sizemail====
| + | ===Sizemail=== |
| | | |
| you can determine the size of mails sent '''(default is 8000 KB)'''. | | you can determine the size of mails sent '''(default is 8000 KB)'''. |
Line 76: |
Line 76: |
| {{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}} |
| | | |
− | ===RESTORING===
| + | ==RESTORING== |
− | ====restoring a .sql file====
| + | ===restoring a .sql file=== |
| In a root terminal | | In a root terminal |
| cd /root/backup/db/ and choose your backup | | cd /root/backup/db/ and choose your backup |
Line 90: |
Line 90: |
| mysql --user=username --pass=password --host=dbserver database < /path/file.sql | | mysql --user=username --pass=password --host=dbserver database < /path/file.sql |
| | | |
− | ====restoring databases sent by mail attachment====
| + | ===restoring databases sent by mail attachment=== |
| | | |
| The attachments have been split into multiple files, use this command line to combine them : | | The attachments have been split into multiple files, use this command line to combine them : |