reorder again
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 22s

This commit is contained in:
2025-07-26 21:56:37 -03:00
parent 8c0235ebf2
commit 78b706223d

View File

@@ -4,6 +4,9 @@
# For each folder on BACKUP_SOURCE, it gets the sha256 checksum of it, checks the checksum against the previous backup, and if it has changed, it creates a 7zip archive of the folder with encryption.
# It then uploads the archive to Google Drive using rclone.
# Install: curl -sSL https://git.ivanch.me/ivanch/server-scripts/raw/branch/main/nas-gdrive-backup.sh | bash -s -- --install
# Run manually: /usr/local/bin/nas-gdrive-backup.sh
# Configuration
BACKUP_SOURCE="/export/Backup"
META_DIR="/export/Backup/.gdrive"
@@ -14,13 +17,6 @@ GDRIVE_PATH="/NAS-Backups"
ARCHIVE_NAME="backup.7z"
LOG_FILE="/var/log/nas-gdrive-backup.log"
# Check for install flag
# Usage: curl -sSL https://git.ivanch.me/ivanch/server-scripts/raw/branch/main/nas-gdrive-backup.sh | bash -s -- --install
if [[ "$1" == "--install" ]]; then
install_script
exit 0
fi
# Function for logging
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
@@ -265,5 +261,11 @@ install_script() {
exit 0
}
# Check for install flag
if [[ "$1" == "--install" ]]; then
install_script
exit 0
fi
main "$@"
exit 0