Automate Creation and Uploading of WordOps Backups to Google Drive using rclone and send email notifications.
-
Install and Setup SSMTP on WordOps Server Steps to install and configure SSMTP.
-
Clone this repo in /root directory of the server with directory name gdrive-backup-wordops using following Command
git clone https://github.com/xaksh/gdrive-backup-wordops -b jbc+email gdrive-backup-wordops
or you can use wget to download Zip Archive and Extract.
wget 'https://github.com/xaksh/gdrive-backup-wordops/archive/jbc+email.zip'
unzip -j jbc+email.zip -d gdrive-backup-wordops
- Run setup.sh with Server Hostname, Host Node, Cron Job Time and email details as arguments.
cd gdrive-backup-wordops
source setup.sh "server.hostname.com" "swift" "30 5 * * *" "notify@domain.com" "From: Backupsbackups@domain.com" "To: notify@domain.com"
server.hostname.com = Server's Hostname where Backup Script will run or Primary Domain Name
swift = Host Node name
30 5 * * * = Backup Upload Script will run daily @5:30 AM
notify@domain.com = Email address where notifications will be sent
'From: Backupsbackups@domain.com' = Email addresses of the SMTP Sender for setting headers
'To: notify@domain.com' = Email address of notification reciever for setting headers
Example:
source setup.sh "swift.basezap.com" "swift" "30 5 * * *" "sys-admin@basezap.com" "From: Backupsbackups@basezap.com" "To: sys-admin@basezap.com"
- rclone will ask to create a new remote. Make remote for Google drive with "gdrive" as remote name without qoutes.