Lines 2-18
Link Here
|
2 |
# |
2 |
# |
3 |
# koha-dump: dump all contents and configs for a Koha site |
3 |
# koha-dump: dump all contents and configs for a Koha site |
4 |
# Copyright 2010 Catalyst IT, Ltd |
4 |
# Copyright 2010 Catalyst IT, Ltd |
5 |
# |
5 |
# |
6 |
# This program is free software: you can redistribute it and/or modify |
6 |
# This program is free software: you can redistribute it and/or modify |
7 |
# it under the terms of the GNU General Public License as published by |
7 |
# it under the terms of the GNU General Public License as published by |
8 |
# the Free Software Foundation, either version 3 of the License, or |
8 |
# the Free Software Foundation, either version 3 of the License, or |
9 |
# (at your option) any later version. |
9 |
# (at your option) any later version. |
10 |
# |
10 |
# |
11 |
# This program is distributed in the hope that it will be useful, |
11 |
# This program is distributed in the hope that it will be useful, |
12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
# GNU General Public License for more details. |
14 |
# GNU General Public License for more details. |
15 |
# |
15 |
# |
16 |
# You should have received a copy of the GNU General Public License |
16 |
# You should have received a copy of the GNU General Public License |
17 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 |
|
18 |
|
Lines 69-76
dump_instance()
Link Here
|
69 |
[ -z "$backupdir" ] && backupdir="/var/spool/koha/$name" |
69 |
[ -z "$backupdir" ] && backupdir="/var/spool/koha/$name" |
70 |
dbdump="$backupdir/$name-$date.sql.gz" |
70 |
dbdump="$backupdir/$name-$date.sql.gz" |
71 |
[ "$quiet" = "no" ] && echo "* DB to $dbdump" |
71 |
[ "$quiet" = "no" ] && echo "* DB to $dbdump" |
72 |
mysqldump --databases --host="$mysqlhost" \ |
72 |
MYSQL_PWD="$mysqlpass" mysqldump --databases --host="$mysqlhost" \ |
73 |
--user="$mysqluser" --password="$mysqlpass" "$mysqldb" | |
73 |
--user="$mysqluser" "$mysqldb" | |
74 |
gzip > "$dbdump" |
74 |
gzip > "$dbdump" |
75 |
chown "root:$name-koha" "$dbdump" |
75 |
chown "root:$name-koha" "$dbdump" |
76 |
chmod g+r "$dbdump" |
76 |
chmod g+r "$dbdump" |