Lines 68-82
fi
Link Here
|
68 |
for name in $(koha-list --enabled | grep -Fxv demo) |
68 |
for name in $(koha-list --enabled | grep -Fxv demo) |
69 |
do |
69 |
do |
70 |
if koha-dump ${exclude_indexes} "$name" > /dev/null; then |
70 |
if koha-dump ${exclude_indexes} "$name" > /dev/null; then |
71 |
# Only delete old backups if dump script return success. |
|
|
72 |
|
73 |
if [ -z "$dirname" ]; then |
71 |
if [ -z "$dirname" ]; then |
74 |
backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )"; |
72 |
backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )"; |
75 |
else |
73 |
else |
76 |
backupdir="$dirname/$name"; |
74 |
backupdir="$dirname/$name"; |
77 |
fi |
75 |
fi |
78 |
|
|
|
79 |
find $backupdir -maxdepth 1 \( -mtime +$days -or -mtime $days \) -name $name-'[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].???'.gz \( -name \*.sql.gz -or -name \*.tar.gz \) -print0 | xargs -0 -r rm |
80 |
fi |
76 |
fi |
|
|
77 |
|
78 |
find $backupdir -maxdepth 1 \( -mtime +$days -or -mtime $days \) -name $name-'[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].???'.gz \( -name \*.sql.gz -or -name \*.tar.gz \) -print0 | xargs -0 -r rm |
81 |
done |
79 |
done |
82 |
|
80 |
|
83 |
- |
|
|