View | Details | Raw Unified | Return to bug 36435
Collapse All | Expand All

(-)a/debian/scripts/koha-dump (-20 / +26 lines)
Lines 124-153 dump_instance() Link Here
124
        output="$output to $metadump"
124
        output="$output to $metadump"
125
        [ "$quiet" = "no" ] && echo "$output"
125
        [ "$quiet" = "no" ] && echo "$output"
126
126
127
        if [ "$exclude_logs" = "yes" ]; then
127
        # tar has exit status 1 if any file has changed while being read,
128
        tar -czf "$metadump" -C / $excludes \
128
        # which is likely to happen as the logfiles are included.
129
            "etc/koha/sites/$name" \
129
        set +e
130
            "etc/apache2/sites-available/$instancefile" \
131
            "etc/apache2/sites-enabled/$instancefile" \
132
            "var/lib/koha/$name" \
133
            $uploaded_files_dir \
134
            $uploaded_temp_files_dir
135
130
136
        chown "root:$name-koha" "$metadump"
131
        if [ "$exclude_logs" = "yes" ]; then
137
        chmod g+r "$metadump"
132
            tar -czf "$metadump" -C / $excludes \
133
                "etc/koha/sites/$name" \
134
                "etc/apache2/sites-available/$instancefile" \
135
                "etc/apache2/sites-enabled/$instancefile" \
136
                "var/lib/koha/$name" \
137
                $uploaded_files_dir \
138
                $uploaded_temp_files_dir
138
        else
139
        else
139
        tar -czf "$metadump" -C / $excludes \
140
            tar -czf "$metadump" -C / $excludes \
140
            "etc/koha/sites/$name" \
141
                "etc/koha/sites/$name" \
141
            "etc/apache2/sites-available/$instancefile" \
142
                "etc/apache2/sites-available/$instancefile" \
142
            "etc/apache2/sites-enabled/$instancefile" \
143
                "etc/apache2/sites-enabled/$instancefile" \
143
            "var/lib/koha/$name" \
144
                "var/lib/koha/$name" \
144
            "var/log/koha/$name" \
145
                "var/log/koha/$name" \
145
            $uploaded_files_dir \
146
                $uploaded_files_dir \
146
            $uploaded_temp_files_dir
147
                $uploaded_temp_files_dir
148
        fi
149
150
        if [ "$?" != "1" -a "$?" != "0" ]; then
151
            exit $?
152
        fi
153
154
        set -e
147
155
148
        chown "root:$name-koha" "$metadump"
156
        chown "root:$name-koha" "$metadump"
149
        chmod g+r "$metadump"
157
        chmod g+r "$metadump"
150
      fi
151
158
152
        [ "$quiet" = "no" ] && echo "Done."
159
        [ "$quiet" = "no" ] && echo "Done."
153
    fi
160
    fi
154
- 

Return to bug 36435