From dbd5fd95bf763e81f6d5aadef4f50d70adc26cb2 Mon Sep 17 00:00:00 2001 From: Patrick McGuire Date: Thu, 21 Oct 2021 12:26:00 -0400 Subject: [PATCH] adding the new button --- scripts/backup_data.php | 4 ++++ scripts/backup_data.sh | 5 +++++ scripts/backup_inprogress.html | 12 ++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 scripts/backup_data.php create mode 100755 scripts/backup_data.sh create mode 100644 scripts/backup_inprogress.html diff --git a/scripts/backup_data.php b/scripts/backup_data.php new file mode 100644 index 0000000..c6587be --- /dev/null +++ b/scripts/backup_data.php @@ -0,0 +1,4 @@ + /tmp/birdnetbackup.log 2&>1"); +header('Location: /backup_inprogress.html'); +?> diff --git a/scripts/backup_data.sh b/scripts/backup_data.sh new file mode 100755 index 0000000..2379fde --- /dev/null +++ b/scripts/backup_data.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Tar and compress all data +source /etc/birdnet/birdnet.conf + +tar -czvf /home/pi/BirdNET-Pi/BirdNET-Pi_Data_Dump_$(date +%F).tar.gz ${EXTRACTED} /home/pi/BirdNET-Pi/BirdDB.txt diff --git a/scripts/backup_inprogress.html b/scripts/backup_inprogress.html new file mode 100644 index 0000000..f671163 --- /dev/null +++ b/scripts/backup_inprogress.html @@ -0,0 +1,12 @@ + + + + + + + A backup is being made that includes all of
+ your extractions and the BirdDB.txt
+

+ The backup is in /home/pi/BirdNET-Pi + +