Created
March 12, 2025 17:17
-
-
Save nurkaydarov/eebd9f60ffc68a4cf89e9aec57f418b8 to your computer and use it in GitHub Desktop.
backup via rsync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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