Skip to content

Commit

Permalink
custom code before/after auto-backup
Browse files Browse the repository at this point in the history
Signed-off-by: OlafBr [email protected]
  • Loading branch information
OlafBr authored and nachoparker committed Sep 6, 2019
1 parent fd2b74b commit f4b4a65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bin/ncp/BACKUPS/nc-backup-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ configure()

cat > /usr/local/bin/ncp-backup-auto <<EOF
#!/bin/bash
[ -x /usr/local/bin/ncp-backup-auto-before ] && /usr/local/bin/ncp-backup-auto-before
/usr/local/bin/ncc maintenance:mode --on
/usr/local/bin/ncp-backup "$DESTDIR" "$INCLUDEDATA" "$COMPRESS" "$BACKUPLIMIT" || failed=true
/usr/local/bin/ncc maintenance:mode --off
[[ "\$failed" == "true" ]] && \
/usr/local/bin/ncc notification:generate "$NOTIFYUSER" "Auto-backup failed" -l "Your automatic backup failed"
[ -x /usr/local/bin/ncp-backup-auto-after ] && /usr/local/bin/ncp-backup-auto-after
EOF
chmod +x /usr/local/bin/ncp-backup-auto

Expand Down
10 changes: 9 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@

[v1.16.0](https://github.com/nextcloud/nextcloudpi/commit/52a82d9) (2019-08-23) upgrade to NC16.0.4
[v1.16.2](https://github.com/nextcloud/nextcloudpi/commit/d97e2c1) (2019-09-04) custom code before/after auto-backup

[v1.16.1](https://github.com/nextcloud/nextcloudpi/commit/fd2b74b) (2019-09-02) Add missing port in nc-rsync-auto.sh (#983)

[v1.16.0 ](https://github.com/nextcloud/nextcloudpi/commit/1a367a6) (2019-08-23) upgrade to NC16.0.4

[v1.15.5 ](https://github.com/nextcloud/nextcloudpi/commit/954366e) (2019-08-18) make sure ufw.log always exists for fail2ban (#937)

[v1.15.4 ](https://github.com/nextcloud/nextcloudpi/commit/bf30c4f) (2019-07-28) add warning to add LABEL when formating

[v1.15.3 ](https://github.com/nextcloud/nextcloudpi/commit/bcef6bf) (2019-07-24) nc-snapshot: update btrfs-snp

Expand Down

0 comments on commit f4b4a65

Please sign in to comment.