Skip to content

Instantly share code, notes, and snippets.

@nurkaydarov
Created March 12, 2025 17:17
Show Gist options
  • Save nurkaydarov/eebd9f60ffc68a4cf89e9aec57f418b8 to your computer and use it in GitHub Desktop.
Save nurkaydarov/eebd9f60ffc68a4cf89e9aec57f418b8 to your computer and use it in GitHub Desktop.
backup via rsync
#!/bin/bash
if [! -f /usr/bin/rsync ]; then
sudo apt install rsync -y
fi
currentDate=$(date + %d-%m-%Y)
rsync -avb --delete --backup-dir=/backup/incremental/$currentDate /src /target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment