Lines 72-86
fi
Link Here
|
72 |
|
72 |
|
73 |
for name in $(koha-list --enabled) |
73 |
for name in $(koha-list --enabled) |
74 |
do |
74 |
do |
75 |
if koha-dump ${exclude_indexes} ${exclude_logs} "$name" > /dev/null; then |
75 |
koha-dump ${exclude_indexes} ${exclude_logs} "$name" > /dev/null; |
76 |
# Only delete old backups if dump script return success. |
|
|
77 |
|
76 |
|
78 |
if [ -z "$dirname" ]; then |
77 |
if [ -z "$dirname" ]; then |
79 |
backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )"; |
78 |
backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )"; |
80 |
else |
79 |
else |
81 |
backupdir="$dirname/$name"; |
80 |
backupdir="$dirname/$name"; |
82 |
fi |
|
|
83 |
|
84 |
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 |
85 |
fi |
81 |
fi |
|
|
82 |
|
83 |
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 |
86 |
done |
84 |
done |
87 |
- |
|
|