Arama Yap Mesaj Submit
Request a Callback
+90
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro
X
X

Select Your Currency

Turkish Lira $ US Dollar Euro

Contact Us

Location Halkali merkez neighborhood fatih st ozgur apt no 46 , Kucukcekmece , Istanbul , 34303 , TR
2026 Current Guide

cPanel / WHM Google Drive Backup Guide (A to Z)

Don't leave your data security to chance. Set up an automatic, encrypted and secure backup system step by step on your Linux servers with Google Drive API integration via WHM.

Google Drive API
WHM / cPanel
OAuth 2.0
Not: This guide has been prepared considering the latest Google Cloud API changes, WHM v110+ versions and modern security standards (E-E-A-T). Data redundancy is a critical step for business continuity.

Data loss for websites and applications is one of the biggest disaster scenarios in the digital world. cPanel/WHM It is vital for server administrators to keep backups off-site. This guide includes products known for their cost effectiveness and reliability. Google DriveWe will explain step by step how to integrate it into your WHM server.

1. Basic Concepts

Before starting the installation, it is important to understand the operating logic of the system:

  • cPanel: It is the panel where end users (websites) are hosted.
  • WHM (WebHost Manager): It is the server administrator's (root) panel and the backup engine is managed from here.
  • Additional Destinations: These are the remote destinations (Google Drive, Amazon S3, FTP, etc.) that WHM will copy the backups to after taking them to the local disk.

2. Requirements

To perform this operation, you must have the following permissions:
  • WHM'e Root level access (Reseller authority is not sufficient).
  • An active Google account (Preferably G Suite or one with ample storage).
  • Google Cloud Console access.
  • Your server's hostname must be configured correctly (Ex: server.ekasunucu.com).

If you don't have a server, high performance Türkiye Location VDS You can review our packages.

3. Google Cloud Console Preparation

In order to use the Google Drive API, we must first create a "Projectctct" on Google and enable the API.

  1. Google Cloud Console Go to and log in.
  2. From the project selection menu on the top left "New Projectctct" Click the (New Projectctct) button.
  3. Projectctct name (Ex: WHM-Backup-System) and create it by clicking "Create".
  4. From the left menu "APIs & Services" > "Library" Follow your path.
  5. into the search bar Google Drive API write.
  6. The result is "Google Drive API" Click and "Enable" Press the (Enable) button.

4. Creating OAuth 2.0 (Client ID & Secret)

We've opened the API, now we'll create credentials so our WHM server can talk securely to Google.

4.1 OAuth Consent Screen

  1. under the APIs & Services menu "OAuth consent screen" Go to the tab.
  2. User Type as "External" Select the option and click "Create".
  3. App Information:
    • App name: WHM Backup
    • User support email: Your own email.
    • Developer contact email: Your own email.
  4. Test Users (Very Important): Click the "Add Users" button and add the Google account email to which you will upload the backup. If you do not do this, you will receive an error on the authorization screen.

4.2 OAuth Client ID Creation

  1. From the left menu "Credentials" Go to the tab.
  2. "Create Credentials" pressing the button "OAuth Client ID" Select the option.
  3. Application Type: Select "Web application".
  4. Authorized Redirect URI (Critical Step): You must enter your server's callback address here. The format is as follows:
Redirect URI Format
# HTTPS and Port 2087 (WHM) are mandatory.
https://HOSTNAME:2087/googledriveauth/callback

# Example:
https://server.alanadiniz.com:2087/googledriveauth/callback

Make a note of the Client ID and Client Secret values. The Secret is only shown once!

5. WHM – Creating Google Drive Destination

Now with the credentials we have, we can connect the server to Google.

  1. Log in to WHM panel as root.
  2. in the search box Backup Configuration type and enter.
  3. Additional Destinations Switch to the tab.
  4. Destination Type from the list "Google Drive" Select it and say "Create new destination".
  5. Fill in the information below:
    • Name: GoogleDrive-Yedek (You can give any name you want).
    • Folder: whm-backups (Folder name to create in Drive).
    • Client ID: The ID you received from Google.
    • Client Secret: Secret you got from Google.
    • Timeout: Default value (usually sufficient, can be increased for large backups).
  6. "Generate Credentials" Click the button. In the window that opens, select your Google account and allow it.
  7. When the verification is successful, the token will automatically be filled into the box.
Critical Warning: After the target adding process is completed, the status of this target in the list "disabled" It may come as: definitely "Enabled" Otherwise, the backup will work but the files will not be sent to Drive.

6. Backup Settings (Actual Backup Rules)

Now let's determine the frequency and content of the backup. Go to WHM > Backup Configuration > Backup Settings tab.

6.1 Genel Ayarlar

  • Backup Status: Enable.
  • Backup Type: Compressed. This option saves disk space and shortens upload time.

6.2 Scheduling

Choose a strategy according to your data density:

  • Daily: For critical sites. You can set the "Retention" period to 3-7 days.
  • Weekly: on Sundays. Retention: 4 weeks (1 months retroactive reserve).
  • Monthly: 1 of the month. Retention: 1-3 months.

6.3 Files and Databases

  • Select Backup Files:
    • Back up User Accounts: On (User data).
    • Back up System Files: Usually kept closed (Server configuration). It takes up a lot of space.
  • Databases: We recommend the "Per Account" option. This is a separate database for each site. .sql file into the backup, making restoring easier.

7. Working Logic (Very Important)

Understanding how the system works prevents disk full problems. WHM Google Drive backup works in this order:

  1. The backup process begins.
  2. cPanel first saves the backup on the server's local disk (usually /backup/tmp or /home/backup) and compresses (.tar.gz).
  3. The resulting file is uploaded to the cloud via Google Drive API.
  4. "Retain backups in the default backup directory" option OFF If so, the file on the local disk is deleted after the upload is successful.

Therefore, your server must have at least as much free space (temp space) as your largest site.

8. Manual Testing and SSH

You can manually trigger via SSH to test whether the system is working without waiting for the scheduled task.

SSH Terminal (root)
# Force start backup manually:
/usr/local/cpanel/bin/backup --force

# Follow the transaction from live logs:
tail -f /usr/local/cpanel/logs/cpbackup/*.log

9. Troubleshooting

Common errors you may encounter and their solutions:

Solution: The address you typed in the "Authorized Redirect URI" section in Google Cloud Console does not match exactly the address you call from the server. https:// protocol and :2087 Pay attention to the port. Use hostname instead of IP address.
Solution: The upload process takes too long and times out. Increase the "Timeout" duration in Destination settings. Also check the server internet speed (uplink).
Solution: You did not add your own e-mail address to the "Test Users" section under Google Cloud Console > OAuth Consent Screen. Only authorized users can authorize when the application is in "Testing" mode.

10. Frequently Asked Questions

We have compiled the most frequently asked questions from our users about this topic.

Q: What happens if my Drive space runs out?

A: The backup will fail and you will receive an error email. Although WHM tries to delete old backups (according to the Retention setting), having a full Drive trash can sometimes cause problems. Check the drive area regularly.

Q: How do I restore from backup?

C: From the WHM > "Restore a Full Backup/cpmove File" menu. If the file is not on the server, first download it from Drive to your computer, then transfer it to the server. /home or /backup directory and start the restore process.

Q: Can I add multiple Drive accounts?

A: Yes, you can add multiple destinations from the Additional Destinations section. For example, you can backup to both Google Drive and local disk at the same time.

Q: Does this process slow down the server?

A: The backup process (especially the compression phase) uses CPU and I/O. Therefore, it is recommended that you schedule backups at night when server traffic is least (e.g. 03:00).

Do You Want Professional Support?

Eka Sunucu technical team 7/24 is with you regarding backup configurations, server optimization and security settings.

Contact Us
Top