File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ cleanup() {
66
66
set +eE
67
67
echo " Clean up..."
68
68
rm -rf /var/www/nextcloud.tar.bz2 /var/www/nextcloud-old
69
- sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
70
69
trap " " EXIT
71
70
exit $RET
72
71
}
@@ -85,17 +84,17 @@ WITH_DATA=no
85
84
COMPRESSED=yes
86
85
LIMIT=0
87
86
88
- sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
89
-
90
87
echo " Back up current instance..."
91
88
set +eE
92
89
ncp-backup " $BKPDIR " " $WITH_DATA " " $COMPRESSED " " $LIMIT " # && false # test point
93
90
RET=$?
94
91
set -eE
95
92
96
- BKP=" $( ls -1t " $BKPDIR " /nextcloud-bkp_* .tar.gz 2> /dev/null | head -1 ) "
97
- [[ -f " $BKP " ]] || { set +eE; echo " Error backing up" ; false || cleanup; }
98
- [[ $RET -ne 0 ]] && { rm -f " $BKP " ; set +eE; echo " Error backing up" ; false || cleanup; }
93
+ BKP_=" $( ls -1t " $BKPDIR " /nextcloud-bkp_* .tar.gz 2> /dev/null | head -1 ) "
94
+ [[ -f " $BKP_ " ]] || { set +eE; echo " Error backing up" ; false || cleanup; }
95
+ [[ $RET -ne 0 ]] && { rm -f " $BKP_ " ; set +eE; echo " Error backing up" ; false || cleanup; }
96
+ BKP=" $( dirname " $BKP_ " ) /$( basename " $BKP_ " .tar.gz ) -${CURRENT} .tar.gz"
97
+ mv " $BKP_ " " $BKP "
99
98
100
99
# simple restore if anything fails from here
101
100
# ###################
Original file line number Diff line number Diff line change 1
1
2
- [ v0.55.3 ] ( https://github.com/nextcloud/nextcloudpi/commit/1c093f2 ) (2018-05-15) nc-backup: faster free space calculation. Minimize maintenance mode time
2
+ [ v0.55.4 ] ( https://github.com/nextcloud/nextcloudpi/commit/855a996 ) (2018-05-15) nc-update-netcloud: include version in backup name
3
3
4
- [ v0.55.2] ( https://github.com/nextcloud/nextcloudpi/commit/2ab49f4 ) (2018-05-14) nc-datadir: fix php cli tmpdir
4
+ [ v0.55.3] ( https://github.com/nextcloud/nextcloudpi/commit/585518a ) (2018-05-15) nc-backup: faster free space calculation. Minimize maintenance mode time
5
+
6
+ [ v0.55.2, master] ( https://github.com/nextcloud/nextcloudpi/commit/2ab49f4 ) (2018-05-14) nc-datadir: fix php cli tmpdir
5
7
6
8
[ v0.55.1 ] ( https://github.com/nextcloud/nextcloudpi/commit/a0a1145 ) (2018-05-14) nc-backup: exclude ncp-update-nc backups
7
9
You can’t perform that action at this time.
0 commit comments