File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,14 @@ trap fail INT TERM HUP ERR
40
40
41
41
echo "check free space..." # allow at least ~500 extra MiB
42
42
mkdir -p "$destdir"
43
- dsize=$(du -sb "$datadir" | awk '{ print $1 }')
44
43
nsize=$(du -sb "$basedir/nextcloud" | awk '{ print $1 }')
44
+ [[ -d "$basedir/nextcloud"/data ]] && \
45
+ dsize=$(du -sb "$basedir/nextcloud"/data | awk '{ print $1 }')
45
46
margin=$((500*1024*1024)) # safety margin for database and some extra
46
47
if [[ "$includedata" == "yes" ]]; then
47
- size=$((nsize + margin))
48
- else #datadir is inside $basedir/nextcloud therefore substract
48
+ datasize=$(du -sb "$datadir" | awk '{ print $1 }')
49
+ size=$((nsize - dsize + margin + datasize))
50
+ else
49
51
size=$((nsize - dsize + margin))
50
52
fi
51
53
free=$( df -B1 "$destdir" | tail -1 | awk '{ print $4 }' )
Original file line number Diff line number Diff line change 1
1
2
- [ v1.11.0] ( https://github.com/nextcloud/nextcloudpi/commit/54fdd52 ) (2019-04-05) upgrade to NC15.0.6
2
+ [ v1.11.1] ( https://github.com/nextcloud/nextcloudpi/commit/2694c6e ) (2019-04-05) nc-backup: fix space calculation
3
+
4
+ [ v1.11.0] ( https://github.com/nextcloud/nextcloudpi/commit/5dedeaf ) (2019-04-05) upgrade to NC15.0.6
3
5
4
6
[ v1.10.12] ( https://github.com/nextcloud/nextcloudpi/commit/a6e33b1 ) (2019-04-05) update UPDATE config section
5
7
You can’t perform that action at this time.
0 commit comments