• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

How To: Backup to Google Cloud Storage

Jason_Hilton

New Pleskian
Hey Guys,
Hope this is helpful to someone. My Plesk server runs on Google Compute Engine, and backups to a Google Cloud Storage Bucket via this script:
Code:
#!/bin/bash
export BOTO_CONFIG="/path/to/.boto"

# Create the backups appending YYMMDD to the end of the file name.
mysqldump databasename -u username -ppassword > database_$(date +%y%m%d).sql
tar -czf httpdocs_$(date +%y%m%d).tar.gz /var/www/vhosts/example.com/httpdocs/

# Compress the database backup.
gzip database_$(date +%y%m%d).sql

# Upload the backups to your bucket, and pipe output to null to prevent cron from emailing you several pages of output.
gsutil cp -L databasereport.csv database_$(date +%y%m%d).sql.gz gs://bucketname 2>/dev/null
gsutil cp -L httpdocsreport.csv httpdocs_$(date +%y%m%d).tar.gz gs://bucketname 2>/dev/null

# Remove the backups from the server.
rm httpdocs_$(date +%y%m%d).tar.gz
rm database_$(date +%y%m%d).sql.gz

# Output the upload reports for Cron to email (if you want).
cut --delimiter=, -f1,9 databasereport.csv
cut --delimiter=, -f1,9 httpdocsreport.csv

# Remove the upload reports.
rm databasereport.csv
rm httpdocsreport.csv
 
Last edited:
Back
Top