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