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
4040
4141echo "check free space..." # allow at least ~500 extra MiB
4242mkdir -p "$destdir"
43- dsize=$(du -sb "$datadir" | awk '{ print $1 }')
4443nsize=$(du -sb "$basedir/nextcloud" | awk '{ print $1 }')
44+ [[ -d "$basedir/nextcloud"/data ]] && \
45+ dsize=$(du -sb "$basedir/nextcloud"/data | awk '{ print $1 }')
4546margin=$((500*1024*1024)) # safety margin for database and some extra
4647if [[ "$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
4951 size=$((nsize - dsize + margin))
5052fi
5153free=$( df -B1 "$destdir" | tail -1 | awk '{ print $4 }' )
Original file line number Diff line number Diff line change 11
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
35
46[ v1.10.12] ( https://github.com/nextcloud/nextcloudpi/commit/a6e33b1 ) (2019-04-05) update UPDATE config section
57
You can’t perform that action at this time.
0 commit comments