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>2017-09-08 11:33:26 +0300
committernachoparker <nacho@ownyourbits.com>2017-09-11 18:36:47 +0300
commitef402e736b1d6fac06d9e0086a8e6e5d44c5eb09 (patch)
tree83ddc670333c2428cf4cbc106708a2877f40bb2f
parent16304252ee1918bb7a8c62ccc6431a864475131d (diff)
nc-backup: small fixesv0.26.28
-rw-r--r--changelog.md14
-rw-r--r--etc/nextcloudpi-config.d/nc-backup-auto.sh31
-rw-r--r--etc/nextcloudpi-config.d/nc-backup.sh24
3 files changed, 51 insertions, 18 deletions
diff --git a/changelog.md b/changelog.md
index ab019cab..6d44da3a 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,17 @@
-[v0.26.22](https://github.com/nextcloud/nextcloudpi/commit/e38f24c) (2017-09-08) build devel: deactivate unattended upgrades
+[v0.26.28](https://github.com/nextcloud/nextcloudpi/commit/94eb3ce) (2017-09-08) nc-backup: small fixes
+
+[v0.26.27](https://github.com/nextcloud/nextcloudpi/commit/649e8b7) (2017-09-10) ncp-web: link to wiki info for each extra
+
+[v0.26.26](https://github.com/nextcloud/nextcloudpi/commit/6f25713) (2017-09-10) ncp-web: minor tweaks
+
+[v0.26.25](https://github.com/nextcloud/nextcloudpi/commit/fab1815) (2017-09-10) ncp-web: click version for changelog. click new version notification to nc-update
+
+[v0.26.24](https://github.com/nextcloud/nextcloudpi/commit/ea5bbb4) (2017-09-10) nc-format-USB: silent mkfs output
+
+[v0.26.23](https://github.com/nextcloud/nextcloudpi/commit/e820243) (2017-09-10) ncp-web: display info for each option
+
+[v0.26.22](https://github.com/nextcloud/nextcloudpi/commit/a20243e) (2017-09-09) nc-format-USB: adjust to the new automount system
[v0.26.21](https://github.com/nextcloud/nextcloudpi/commit/64e878d) (2017-09-08) tag images
diff --git a/etc/nextcloudpi-config.d/nc-backup-auto.sh b/etc/nextcloudpi-config.d/nc-backup-auto.sh
index f016b5d1..6e3ff7fd 100644
--- a/etc/nextcloudpi-config.d/nc-backup-auto.sh
+++ b/etc/nextcloudpi-config.d/nc-backup-auto.sh
@@ -67,15 +67,28 @@ mysqldump -u root --single-transaction nextcloud > \$DBBACKUP
[[ "$INCLUDEDATA_" == "yes" ]] && echo -e "backup datadir... "
echo -e "backup files..."
mkdir -p $DESTDIR_
-tar -cf \$DESTFILE \$DBBACKUP nextcloud/ --exclude 'nextcloud/data/*/files/*' && \
- echo -e "backup \$DESTFILE generated" || \
- echo -e "error generating backup"
-rm \$DBBACKUP
-
-[[ "$INCLUDEDATA_" == "yes" ]] && {
- tar -rf \$DESTFILE -C \$DATADIR/.. \$( basename \$DATADIR ) || \
- echo -e "error generating data backup"
-}
+tar -cf "\$DESTFILE" "\$DBBACKUP" nextcloud/ \
+ --exclude "nextcloud/data/*/files/*" \
+ --exclude "nextcloud/data/.opcache" \
+ --exclude "nextcloud/data/{access,error,nextcloud}.log" \
+ --exclude "nextcloud/data/access.log" \
+ || {
+ echo -e "error generating backup"
+ sudo -u www-data php "$BASEDIR"/nextcloud/occ maintenance:mode --off
+ return 1
+ }
+ rm "\$DBBACKUP"
+
+ [[ "$INCLUDEDATA_" == "yes" ]] && {
+ echo -e "backup data files..."
+ tar -rf "\$DESTFILE" -C "\$DATADIR"/.. "\$( basename "\$DATADIR" )" \
+ || {
+ echo -e "error generating backup"
+ sudo -u www-data php "$BASEDIR"/nextcloud/occ maintenance:mode --off
+ return 1
+ }
+ }
+ echo -e "backup \$DESTFILE generated"
# delete older backups
[[ $BACKUPLIMIT_ != 0 ]] && {
diff --git a/etc/nextcloudpi-config.d/nc-backup.sh b/etc/nextcloudpi-config.d/nc-backup.sh
index e75648b5..528f4f21 100644
--- a/etc/nextcloudpi-config.d/nc-backup.sh
+++ b/etc/nextcloudpi-config.d/nc-backup.sh
@@ -37,22 +37,30 @@ configure()
echo -e "backup database..."
mysqldump -u root --single-transaction nextcloud > "$DBBACKUP"
- [[ "$INCLUDEDATA_" == "yes" ]] && echo -e "backup datadir... "
- echo -e "backup files..."
+ echo -e "backup base files..."
mkdir -p "$DESTDIR_"
tar -cf "$DESTFILE" "$DBBACKUP" nextcloud/ \
--exclude "nextcloud/data/*/files/*" \
--exclude "nextcloud/data/.opcache" \
--exclude "nextcloud/data/{access,error,nextcloud}.log" \
- && \
- echo -e "backup $DESTFILE generated" || \
- echo -e "error generating backup"
+ --exclude "nextcloud/data/access.log" \
+ || {
+ echo -e "error generating backup"
+ sudo -u www-data php "$BASEDIR"/nextcloud/occ maintenance:mode --off
+ return 1
+ }
rm "$DBBACKUP"
[[ "$INCLUDEDATA_" == "yes" ]] && {
- tar -rf "$DESTFILE" -C "$DATADIR"/.. "$( basename "$DATADIR" )" || \
- echo -e "error generating data backup"
- }
+ echo -e "backup data files..."
+ tar -rf "$DESTFILE" -C "$DATADIR"/.. "$( basename "$DATADIR" )" \
+ || {
+ echo -e "error generating backup"
+ sudo -u www-data php "$BASEDIR"/nextcloud/occ maintenance:mode --off
+ return 1
+ }
+ }
+ echo -e "backup $DESTFILE generated"
# delete older backups
[[ $BACKUPLIMIT_ != 0 ]] && {