Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update s3_backup.sh #54

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions s3/s3_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ tmp_pass="/root/pass.txt"
# Create the unencrypted copy directory
log "Clearing old unencrypted data"

find "$unencrypted_copy/" -type f -delete
log "Creating unencrypted directory"
mkdir -p "$unencrypted_copy"
find "$unencrypted_copy/" -type f -delete

log "Copy data"

cp --verbose -a "$basedir/." "$unencrypted_copy"
Expand All @@ -27,10 +28,11 @@ log "Removing duplicate files"
fdupes -qdiN -r "$unencrypted_copy"
log "Clearing old encrypted data"

find "$baseEncryptDir/" -type f -delete
# Create the encrypted backup directory
log "Creating encrypted backup directory"
mkdir -p "$baseEncryptDir"
find "$baseEncryptDir/" -type f -delete

# Write the encryption password to a file
log "Writing encryption password to file"
touch "$tmp_pass"
Expand Down Expand Up @@ -94,4 +96,4 @@ done
# Send a notification using the s3_notify_uptime_kuma.sh script
if ! /s3_notify_uptime_kuma.sh; then
log "Failed to send notification"
fi
fi
Loading