{"id":2498,"date":"2025-08-04T08:16:35","date_gmt":"2025-08-04T08:16:35","guid":{"rendered":"https:\/\/hostrago.com\/knowledge-base\/?p=2498"},"modified":"2025-08-04T08:16:36","modified_gmt":"2025-08-04T08:16:36","slug":"whm-backup-to-google-drive-tutorial","status":"publish","type":"post","link":"https:\/\/hostrago.com\/knowledge-base\/whm-backup-to-google-drive-tutorial\/","title":{"rendered":"WHM Backup to Google Drive Tutorial (2025 Guide)"},"content":{"rendered":"\n<p>Data loss can be disastrous for any website, especially if you\u2019re managing multiple client accounts through <strong>WHM (Web Host Manager)<\/strong>. That\u2019s why it&#8217;s essential to automate your <strong>WHM backup<\/strong> system and store your data securely off-site. One of the most efficient and reliable solutions is setting up <strong>WHM backup to Google Drive<\/strong>.<\/p>\n\n\n\n<p>In this comprehensive guide, we will walk you through the step-by-step process of integrating Google Drive with WHM, so your data remains safe, recoverable, and easily accessible when needed. If you&#8217;re looking for the best way to automate and simplify your WHM backup tasks, this tutorial is a must-read.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Choose Google Drive for WHM Backups?<\/h2>\n\n\n\n<p>Google Drive offers up to 15GB of free storage and flexible paid plans, making it an excellent off-site backup location. Integrating it with <a href=\"https:\/\/www.cpanel.net\/products\/cpanel-whm-features\/\" target=\"_blank\" rel=\"noopener\">WHM <\/a>provides:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Off-server protection against hardware failure.<\/li>\n\n\n\n<li>Easy access to stored files from anywhere.<\/li>\n\n\n\n<li>Integration with Google\u2019s powerful security systems.<\/li>\n\n\n\n<li>Cost-effective long-term storage.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\ud83d\udca1 <strong>Tip from Hostrago:<\/strong> Always use a dedicated Google account for server backups to maintain organization and security.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites for Setting Up WHM Backup to Google Drive<\/h2>\n\n\n\n<p>Before beginning, ensure the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WHM access with root privileges.<\/li>\n\n\n\n<li>A valid <strong>Google account<\/strong>.<\/li>\n\n\n\n<li><strong>rclone<\/strong> installed on your server.<\/li>\n\n\n\n<li>Command line (SSH) access to the server.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Guide to Set Up WHM Backup to Google Drive<\/h2>\n\n\n\n<p>Let\u2019s dive into the configuration process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Install Rclone on Your Server<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Login via SSH as root.<\/li>\n\n\n\n<li>Run the following command: bashCopyEdit<code>curl https:\/\/rclone.org\/install.sh | bash<\/code><\/li>\n\n\n\n<li>After installation, verify it: bashCopyEdit<code>rclone version<\/code><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Configure Rclone for Google Drive<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Start rclone configuration: bashCopyEdit<code>rclone config<\/code><\/li>\n\n\n\n<li>Follow the interactive prompts:\n<ul class=\"wp-block-list\">\n<li>Choose <code>n<\/code> to create a new remote.<\/li>\n\n\n\n<li>Name it (e.g., <code>gdrive<\/code>).<\/li>\n\n\n\n<li>Select <code>drive<\/code> as the storage type.<\/li>\n\n\n\n<li>Accept default or advanced settings.<\/li>\n\n\n\n<li>When prompted for client ID and secret, press Enter unless you have custom credentials.<\/li>\n\n\n\n<li>Follow the link to authenticate your Google account.<\/li>\n\n\n\n<li>Once authenticated, allow access and paste the verification code.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>Your remote is now set up.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Create a Backup Script<\/h3>\n\n\n\n<p>Here\u2019s a basic shell script to backup WHM data and sync it with Google Drive:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted lang-script\"><code>#!\/bin\/bash<br><\/code><br><code><br>DATE=$(date +%F)<\/code><br><code><br>BACKUP_DIR=\"\/backup\/whm\"<\/code><br><code><br>ARCHIVE=\"$BACKUP_DIR\/whm-backup-$DATE.tar.gz\"<\/code><br><code><br><br># Create backup<\/code><br><code><br>mkdir -p $BACKUP_DIR<\/code><br><code><br>\/scripts\/pkgacct --skiphomedir --skiphomemysql --skiphometmp --user=root<\/code><br><code>$BACKUP_DIR<br><br># Compress backup<\/code><br><code><br>tar -czvf $ARCHIVE $BACKUP_DIR<br><br># Sync with Google Drive<\/code><br><code><br>rclone copy $ARCHIVE gdrive:\/WHM-Backups<br><br># Clean up<\/code><br><code><br>rm -rf $BACKUP_DIR<br><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Verify Your Backup<\/h3>\n\n\n\n<p>Once the script runs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to your Google Drive.<\/li>\n\n\n\n<li>Open the <code>WHM-Backups<\/code> folder.<\/li>\n\n\n\n<li>Verify the latest backup file exists.<\/li>\n<\/ul>\n\n\n\n<p>You can also run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>rclone ls gdrive:\/WHM-Backups<br><\/code><\/pre>\n\n\n\n<p>\u2026to check via SSH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting Tips<\/h2>\n\n\n\n<p><strong>Problem:<\/strong> Permission Denied Errors<br><strong>Solution:<\/strong> Ensure the script and backup directory have root permissions.<\/p>\n\n\n\n<p><strong>Problem:<\/strong> Rclone Authentication Fails<br><strong>Solution:<\/strong> Double-check the authentication link and try again in incognito mode.<\/p>\n\n\n\n<p><strong>Problem:<\/strong> No space left on device<br><strong>Solution:<\/strong> Clean up older backups regularly or upgrade your Google Drive plan.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Thoughts<\/h2>\n\n\n\n<p>Setting up <strong>WHM Backup to Google Drive<\/strong> is a smart and efficient way to ensure your cPanel accounts are always protected. It eliminates the risk of total data loss, keeps your backups off-site, and adds an extra layer of redundancy to your web hosting infrastructure.<\/p>\n\n\n\n<p>At <strong><a href=\"https:\/\/hostrago.com\/\">Hostrago<\/a><\/strong>, we strongly recommend every server admin or reseller hosting provider implement automated backup strategies like this one.<\/p>\n\n\n\n<p>If managing backups, server scripts, or SSH commands feel overwhelming, you can <a href=\"https:\/\/hostrago.com\/self-managed-vps\/\">explore our managed VPS hosting services<\/a> with full backup support.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data loss can be disastrous for any website, especially if you\u2019re managing multiple client accounts through WHM (Web Host Manager). That\u2019s why it&#8217;s essential to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2499,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[739,742,741,126,89,737,740,729,738],"class_list":["post-2498","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whm","tag-backup-automation","tag-cpanel-backup","tag-google-drive-backup","tag-hostrago","tag-web-hosting-india","tag-whm-backup","tag-whm-backup-tutorial","tag-whm-cpanel","tag-whm-to-google-drive"],"menu_order":0,"_links":{"self":[{"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=2498"}],"version-history":[{"count":5,"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2498\/revisions"}],"predecessor-version":[{"id":2504,"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/2498\/revisions\/2504"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/media\/2499"}],"wp:attachment":[{"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=2498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=2498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostrago.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=2498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}