Created
May 12, 2024 09:31
-
-
Save waqarNaeem786/9622896fee355b345b77b9a48bacd4a9 to your computer and use it in GitHub Desktop.
This file contains 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 | |
cd /var/www | |
crontab -l > cronStetup | |
ip=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d'/' -f1) | |
dt=$(date +"%Y-%m-%d_%H-%M-%S" | tr -d ':') | |
zip -D "${ip}_${dt}.zip" * | |
# rclone copy *.zip gdrive:${ip}_backup | |
find . -maxdepth 1 -type f -name "${ip}_${dt}.zip" -exec rclone copy {} gdrive:${ip}_backup \; | |
rm -r *.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment