Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-05-15 06:20:06 +0300
committernachoparker <nacho@ownyourbits.com>2018-05-15 07:13:06 +0300
commit191ea16ec9bf403e516eb67c5fccebf86e9ace65 (patch)
treec48be38fec6c21d17d63d5096caaefe19c0cbbaf
parent2507cc6298956893dad2f81bffb6b85376eaf5b9 (diff)
nc-update-netcloud: include version in backup namev0.55.3
-rw-r--r--bin/ncp-update-nc11
-rw-r--r--changelog.md6
2 files changed, 9 insertions, 8 deletions
diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc
index cb737c3c..413da12d 100644
--- a/bin/ncp-update-nc
+++ b/bin/ncp-update-nc
@@ -66,7 +66,6 @@ cleanup() {
set +eE
echo "Clean up..."
rm -rf /var/www/nextcloud.tar.bz2 /var/www/nextcloud-old
- sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
trap "" EXIT
exit $RET
}
@@ -85,17 +84,17 @@ WITH_DATA=no
COMPRESSED=yes
LIMIT=0
-sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
-
echo "Back up current instance..."
set +eE
ncp-backup "$BKPDIR" "$WITH_DATA" "$COMPRESSED" "$LIMIT" # && false # test point
RET=$?
set -eE
-BKP="$( ls -1t "$BKPDIR"/nextcloud-bkp_*.tar.gz 2>/dev/null | head -1 )"
-[[ -f "$BKP" ]] || { set +eE; echo "Error backing up"; false || cleanup; }
-[[ $RET -ne 0 ]] && { rm -f "$BKP"; set +eE; echo "Error backing up"; false || cleanup; }
+BKP_="$( ls -1t "$BKPDIR"/nextcloud-bkp_*.tar.gz 2>/dev/null | head -1 )"
+[[ -f "$BKP_" ]] || { set +eE; echo "Error backing up"; false || cleanup; }
+[[ $RET -ne 0 ]] && { rm -f "$BKP_"; set +eE; echo "Error backing up"; false || cleanup; }
+BKP="$( dirname "$BKP_" )/$( basename "$BKP_" .tar.gz )-${CURRENT}.tar.gz"
+mv "$BKP_" "$BKP"
# simple restore if anything fails from here
####################
diff --git a/changelog.md b/changelog.md
index 41cf77dd..c9baec71 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,7 +1,9 @@
-[v0.55.3](https://github.com/nextcloud/nextcloudpi/commit/1c093f2) (2018-05-15) nc-backup: faster free space calculation. Minimize maintenance mode time
+[v0.55.4](https://github.com/nextcloud/nextcloudpi/commit/855a996) (2018-05-15) nc-update-netcloud: include version in backup name
-[v0.55.2](https://github.com/nextcloud/nextcloudpi/commit/2ab49f4) (2018-05-14) nc-datadir: fix php cli tmpdir
+[v0.55.3](https://github.com/nextcloud/nextcloudpi/commit/585518a) (2018-05-15) nc-backup: faster free space calculation. Minimize maintenance mode time
+
+[v0.55.2, master](https://github.com/nextcloud/nextcloudpi/commit/2ab49f4) (2018-05-14) nc-datadir: fix php cli tmpdir
[v0.55.1 ](https://github.com/nextcloud/nextcloudpi/commit/a0a1145) (2018-05-14) nc-backup: exclude ncp-update-nc backups