Difference between revisions of "Database Backup"
From Amahi Wiki
| Line 2: | Line 2: | ||
== Installation == | == Installation == | ||
| − | * Download the script [http://downloads.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%202.5/automysqlbackup-2.5.1-01.sh AutoMySQLBcckup] file to | + | * Create a share called '''Database''' with the path of ''/var/hda/files/db''. |
| + | * Download the script [http://downloads.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%202.5/automysqlbackup-2.5.1-01.sh AutoMySQLBcckup] file to ''/tmp'' directory. | ||
| + | cd /tmp | ||
| + | wget http://downloads.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%202.5/automysqlbackup-2.5.1-01.sh | ||
* Some changes will need to be made for this to work on your HDA as follows: | * Some changes will need to be made for this to work on your HDA as follows: | ||
''USERNAME=debian'' on line 39 to: | ''USERNAME=debian'' on line 39 to: | ||
| Line 18: | Line 21: | ||
''LATEST=no'' on line 94 to: | ''LATEST=no'' on line 94 to: | ||
LATEST=yes | LATEST=yes | ||
| + | * Move the file from your home directory to /usr/local/bin and set the permissions: | ||
| + | mv / | ||
| + | |||
== Tips == | == Tips == | ||
Revision as of 16:27, 11 November 2010
It's good practice to periodically backup up your database. This functionality is coming to Amahi soon, but until then there is a simple way to automatate it. Follow the steps below to help keep your data safe.
Installation
- Create a share called Database with the path of /var/hda/files/db.
- Download the script AutoMySQLBcckup file to /tmp directory.
cd /tmp wget http://downloads.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%202.5/automysqlbackup-2.5.1-01.sh
- Some changes will need to be made for this to work on your HDA as follows:
USERNAME=debian on line 39 to:
USERNAME=root
PASSWORD= on line 42 to:
PASSWORD=hda
BACKUPDIR="/srv/backup/db" on line 51 to:
BACKUPDIR="/var/hda/files/db"
MAILADDR="maintenance@example.com" on line 65 to:
MAILADDR="root"
DBEXCLUDE="" on line 76 to:
DBEXCLUDE="information_schema"
CREATE_DATABASE=no on line 79 to:
CREATE_DATABASE=yes
LATEST=no on line 94 to:
LATEST=yes
- Move the file from your home directory to /usr/local/bin and set the permissions:
mv /
