Lines 28-37
This allows automation of backing up the koha data and configuration to the
Link Here
|
28 |
filesystem. It will keep the past so many backups, discarding older ones. |
28 |
filesystem. It will keep the past so many backups, discarding older ones. |
29 |
|
29 |
|
30 |
Options: |
30 |
Options: |
31 |
--output: the directory that the resulting files will be placed into. |
31 |
--output /path The directory that the resulting files will be placed into. |
32 |
(default: /var/spool/koha) |
32 |
(default: /var/spool/koha) |
33 |
--days: the number of days to keep backups around for |
33 |
--days 2 The number of days to keep backups around for |
34 |
(default: 2) |
34 |
(default: 2) |
|
|
35 |
--exclude-indexes Exclude Zebra indexes from the backups (default: false) |
35 |
|
36 |
|
36 |
Note: backups produced using this tool can be restored using \`koha-restore'. |
37 |
Note: backups produced using this tool can be restored using \`koha-restore'. |
37 |
EOH |
38 |
EOH |
Lines 50-55
while true ; do
Link Here
|
50 |
days=$2; shift 2 ;; |
51 |
days=$2; shift 2 ;; |
51 |
--output) |
52 |
--output) |
52 |
dirname=$2; shift 2 ;; |
53 |
dirname=$2; shift 2 ;; |
|
|
54 |
--exclude-indexes) |
55 |
exclude-indexes="--exclude-indexes"; shift ;; |
53 |
--) shift ; break ;; |
56 |
--) shift ; break ;; |
54 |
*) echo "Unknown error parsing the command line!" ; exit 1 ;; |
57 |
*) echo "Unknown error parsing the command line!" ; exit 1 ;; |
55 |
esac |
58 |
esac |
Lines 57-63
done
Link Here
|
57 |
|
60 |
|
58 |
for name in $(koha-list --enabled | grep -Fxv demo) |
61 |
for name in $(koha-list --enabled | grep -Fxv demo) |
59 |
do |
62 |
do |
60 |
koha-dump "$name" > /dev/null |
63 |
koha-dump ${exclude-indexes} "$name" > /dev/null |
61 |
if [ -z "$dirname" ]; then |
64 |
if [ -z "$dirname" ]; then |
62 |
backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )"; |
65 |
backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )"; |
63 |
else |
66 |
else |
64 |
- |
|
|