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

(-)a/debian/scripts/koha-dump (-2 / +18 lines)
Lines 44-49 $scriptname [--quiet|-q] [--include-indexes|-i] instancename1 [instancename2...] Link Here
44
$scriptname -h|--help
44
$scriptname -h|--help
45
45
46
    --exclude-indexes     Include Zebra indexes on the backup.
46
    --exclude-indexes     Include Zebra indexes on the backup.
47
    --uploaded_files      Include uploaded files.
48
    --uploaded_temp_files Include temporary uploaded files.
47
    --quiet|-q            Make the script avoid printing to STDOUT
49
    --quiet|-q            Make the script avoid printing to STDOUT
48
                          (useful for calling from another scripts).
50
                          (useful for calling from another scripts).
49
    --help|-h             Display this help message
51
    --help|-h             Display this help message
Lines 79-97 dump_instance() Link Here
79
81
80
    # Dump configs, logs, etc.
82
    # Dump configs, logs, etc.
81
    metadump="$backupdir/$name-$date.tar.gz"
83
    metadump="$backupdir/$name-$date.tar.gz"
82
    [ "$quiet" = "no" ] && echo "* configs, logs to $metadump"
84
    [ "$quiet" = "no" ] && echo "* configs, files, logs to $metadump"
83
85
84
    if [ "$exclude_indexes" = "yes" ]; then
86
    if [ "$exclude_indexes" = "yes" ]; then
85
        excludes="--exclude=var/lib/koha/$name/biblios \
87
        excludes="--exclude=var/lib/koha/$name/biblios \
86
                  --exclude=var/lib/koha/$name/authorities"
88
                  --exclude=var/lib/koha/$name/authorities"
87
    fi
89
    fi
88
90
91
    if [ "$uploaded_files" = "yes" ]; then
92
        # Remove leading /
93
        uploaded_files_dir=$(echo $(get_upload_path $name) | cut -c 2-)
94
    fi
95
96
    if [ "$uploaded_temp_files" = "yes" ]; then
97
        # Remove leading /
98
        tempdir=$(echo $(get_tmp_path $name) | cut -c 2-)
99
        uploaded_temp_files_dir="$tempdir/koha_${name}_upload"
100
    fi
101
89
    tar -czf "$metadump" -C / $excludes \
102
    tar -czf "$metadump" -C / $excludes \
90
        "etc/koha/sites/$name" \
103
        "etc/koha/sites/$name" \
91
        "etc/apache2/sites-available/$instancefile" \
104
        "etc/apache2/sites-available/$instancefile" \
92
        "etc/apache2/sites-enabled/$instancefile" \
105
        "etc/apache2/sites-enabled/$instancefile" \
93
        "var/lib/koha/$name" \
106
        "var/lib/koha/$name" \
94
        "var/log/koha/$name"
107
        "var/log/koha/$name" \
108
        $uploaded_files_dir \
109
        $uploaded_temp_files_dir
110
95
111
96
    [ "$quiet" = "no" ] && echo "Done."
112
    [ "$quiet" = "no" ] && echo "Done."
97
}
113
}
(-)a/debian/scripts/koha-functions.sh (-1 / +20 lines)
Lines 279-284 get_max_record_size() Link Here
279
    fi
279
    fi
280
}
280
}
281
281
282
get_tmp_path()
283
{
284
    local instancename=$1
285
    local retval=$(run_safe_xmlstarlet $instancename tmp_path)
286
    if [ "$retval" != "" ]; then
287
        echo "$retval"
288
        return 0
289
    fi
290
}
291
292
get_upload_path()
293
{
294
    local instancename=$1
295
    local retval=$(run_safe_xmlstarlet $instancename upload_path)
296
    if [ "$retval" != "" ]; then
297
        echo "$retval"
298
        return 0
299
    fi
300
}
301
282
get_tmpdir()
302
get_tmpdir()
283
{
303
{
284
    if [ "$TMPDIR" != "" ]; then
304
    if [ "$TMPDIR" != "" ]; then
285
- 

Return to bug 21903