|
Lines 97-103
dump_instance()
Link Here
|
| 97 |
|
97 |
|
| 98 |
# Dump configs, logs, etc. |
98 |
# Dump configs, logs, etc. |
| 99 |
metadump="$backupdir/$name-$date.tar.gz" |
99 |
metadump="$backupdir/$name-$date.tar.gz" |
| 100 |
[ "$quiet" = "no" ] && echo "* configs, files, logs to $metadump" |
100 |
output="* configs, logs" |
| 101 |
|
101 |
|
| 102 |
if [ "$exclude_indexes" = "yes" ]; then |
102 |
if [ "$exclude_indexes" = "yes" ]; then |
| 103 |
excludes="--exclude=var/lib/koha/$name/biblios \ |
103 |
excludes="--exclude=var/lib/koha/$name/biblios \ |
|
Lines 107-120
dump_instance()
Link Here
|
| 107 |
if [ "$uploaded_files" = "yes" ]; then |
107 |
if [ "$uploaded_files" = "yes" ]; then |
| 108 |
# Remove leading / |
108 |
# Remove leading / |
| 109 |
uploaded_files_dir=$(echo $(get_upload_path $name) | cut -c 2-) |
109 |
uploaded_files_dir=$(echo $(get_upload_path $name) | cut -c 2-) |
|
|
110 |
output="$output, uploaded files" |
| 110 |
fi |
111 |
fi |
| 111 |
|
112 |
|
| 112 |
if [ "$uploaded_temp_files" = "yes" ]; then |
113 |
if [ "$uploaded_temp_files" = "yes" ]; then |
| 113 |
# Remove leading / |
114 |
# Remove leading / |
| 114 |
tempdir=$(echo $(get_tmp_path $name) | cut -c 2-) |
115 |
tempdir=$(echo $(get_tmp_path $name) | cut -c 2-) |
| 115 |
uploaded_temp_files_dir="$tempdir/koha_${name}_upload" |
116 |
uploaded_temp_files_dir="$tempdir/koha_${name}_upload" |
|
|
117 |
if ! [ -d /$uploaded_temp_files_dir ]; then |
| 118 |
mkdir /$uploaded_temp_files_dir |
| 119 |
fi |
| 120 |
output="$output, uploaded temporary files" |
| 116 |
fi |
121 |
fi |
| 117 |
|
122 |
|
|
|
123 |
output="$output to $metadump" |
| 124 |
[ "$quiet" = "no" ] && echo "$output" |
| 125 |
|
| 118 |
tar -czf "$metadump" -C / $excludes \ |
126 |
tar -czf "$metadump" -C / $excludes \ |
| 119 |
"etc/koha/sites/$name" \ |
127 |
"etc/koha/sites/$name" \ |
| 120 |
"etc/apache2/sites-available/$instancefile" \ |
128 |
"etc/apache2/sites-available/$instancefile" \ |
| 121 |
- |
|
|