Update starship and backup script
This commit is contained in:
parent
634a500dc8
commit
9d818106d6
2 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@ in
|
|||
hostname = {
|
||||
ssh_only = true;
|
||||
style = "fg:${usernameFG} bg:${usernameBG}";
|
||||
format = "[@$hostname]($style)";
|
||||
format = "[ $hostname ]($style)";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -259,11 +259,11 @@ cleanup_snapshots() {
|
|||
log "Deleting remote snapshot: $snapshot"
|
||||
if ! ssh "$REMOTE_HOST" "btrfs subvolume delete '$BASE_DEST_PATH/$snapshot/snapshot'"; then
|
||||
send_notification "Backup Warning" "Failed to delete remote snapshot $snapshot on $HOSTNME" 6
|
||||
log "WARNING: Failed to delete remote snapshot $snapshot"
|
||||
log "WARNING - Failed to delete remote snapshot $snapshot"
|
||||
fi
|
||||
if ! ssh "$REMOTE_HOST" "rm -rf '$BASE_DEST_PATH/$snapshot'"; then
|
||||
send_notification "Backup Warning" "Failed to cleanup remote snapshot directory $snapshot on $HOSTNME" 6
|
||||
log "WARNING: Failed to cleanup remote snapshot directory $snapshot"
|
||||
log "WARNING - Failed to cleanup remote snapshot directory $snapshot"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -271,7 +271,7 @@ cleanup_snapshots() {
|
|||
log "Deleting local snapshot: $snapshot"
|
||||
if ! sudo snapper -c "$SNAPPER_CONFIG" delete "$snapshot"; then
|
||||
send_notification "Backup Warning" "Failed to delete local snapshot $snapshot on $HOSTNME" 6
|
||||
log "WARNING: Failed to delete local snapshot $snapshot"
|
||||
log "WARNING - Failed to delete local snapshot $snapshot"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -350,7 +350,7 @@ fi
|
|||
# Final verification
|
||||
if ! ssh "$REMOTE_HOST" "btrfs subvolume show '$DEST_PATH/snapshot'" &>/dev/null; then
|
||||
send_notification "Backup Failed" "Final verification failed for $SNAPPER_CONFIG on $HOSTNME" 8
|
||||
log "WARNING: Final verification failed"
|
||||
log "WARNING - Final verification failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue