This script automatically creates a ZIP backup of /var/www/html, uploads it to your MEGA.nz account, and sends a status notification to a Discord channel using a webhook.
Perfect for securing website data on a remote Ubuntu server β safely, automatically, and quietly.
- π¦ Compresses
/var/www/htmlinto a date-stamped.zipfile - βοΈ Uploads securely to your
MEGA.nzcloud - π¬ Sends backup status (success/failure) to Discord via webhook
- π§Ή Cleans up temporary files
- π Works with
cronfor full automation
Before you begin, make sure your Ubuntu VPS has the following installed:
rclone(for Mega cloud upload)zip(for compression)curl(for Discord webhook)
sudo apt update
sudo apt install zip curl -y
curl https://rclone.org/install.sh | sudo bash