Lines 39-46
EOH
Link Here
|
39 |
} |
39 |
} |
40 |
|
40 |
|
41 |
exclude_indexes="" |
41 |
exclude_indexes="" |
|
|
42 |
schema_only="" |
42 |
|
43 |
|
43 |
CMD_LINE=`getopt -o h --long days:,output:,help,exclude-indexes -n 'koha-run-backups' -- "$@"` |
44 |
CMD_LINE=`getopt -o h --long days:,output:,help,exclude-indexes,schema-only -n 'koha-run-backups' -- "$@"` |
44 |
|
45 |
|
45 |
if [ $? != 0 ] ; then show_help ; exit 1 ; fi |
46 |
if [ $? != 0 ] ; then show_help ; exit 1 ; fi |
46 |
|
47 |
|
Lines 55-60
while true ; do
Link Here
|
55 |
dirname=$2; shift 2 ;; |
56 |
dirname=$2; shift 2 ;; |
56 |
--exclude-indexes) |
57 |
--exclude-indexes) |
57 |
exclude_indexes='--exclude-indexes'; shift ;; |
58 |
exclude_indexes='--exclude-indexes'; shift ;; |
|
|
59 |
--schema-only) |
60 |
schema_only='--schema-only'; shift ;; |
58 |
--) shift ; break ;; |
61 |
--) shift ; break ;; |
59 |
*) echo "Unknown error parsing the command line!" ; exit 1 ;; |
62 |
*) echo "Unknown error parsing the command line!" ; exit 1 ;; |
60 |
esac |
63 |
esac |
Lines 67-73
fi
Link Here
|
67 |
|
70 |
|
68 |
for name in $(koha-list --enabled | grep -Fxv demo) |
71 |
for name in $(koha-list --enabled | grep -Fxv demo) |
69 |
do |
72 |
do |
70 |
if koha-dump ${exclude_indexes} "$name" > /dev/null; then |
73 |
if koha-dump ${exclude_indexes} ${schema_only} "$name" > /dev/null; then |
71 |
# Only delete old backups if dump script return success. |
74 |
# Only delete old backups if dump script return success. |
72 |
|
75 |
|
73 |
if [ -z "$dirname" ]; then |
76 |
if [ -z "$dirname" ]; then |
74 |
- |
|
|