How does Centos6/7 automatically backup VestaCP files to Gdrive network disk?

Recently, there isInternet marketingfriend'sWordPressThere was a problem with the website backup, so he moved the website to a new VPS and installedVestaCPcontrol panel.

  • He then started researching how to upload VestaCP backups to Google Drive to keep them safe.
  • Finally, found a solution to automatically backup VestaCP files to Google Drive.

How does Centos6/7 automatically backup VestaCP files to Gdrive network disk?

How to automatically backup VestaCP files to Google Drive?

Installation and configuration Chinese tutorials that may not be available on the official website of VestaCP

There are many friends inCentos 6 or Centos7 running VestaCP, but this tutorial may apply to all Centos versions.

Step 1: Install Gdrive network disk

We had to install a XNUMXrd party CLI tool, you just need to use a script to transfer files to Google Drive.

wget -O drive https://drive.google.com/uc?id=0B3X9GlR6EmbnMHBMVWtKaEZXdDg

mv drive /usr/sbin/drive

chmod 755 /usr/sbin/drive
  • This is a tool to upload files using OAuth2, this will not sync.

Now enter the following command ▼

drive

it will askVerification codeas follows ▼

Go to the following link in your browser: 
https://accounts.google.com/o/oauth2/auth?client_id=123456789123-7n0vf5akeru7on6o2fjinrecpdoe99eg.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=state
  • Now we have a link between the server and Google Drive.
  • We are ready to upload the file to Google Drive.

Step 2: Upload Gdrive Auto Backup Script File

1) in /home/backup/directory, create a file containing the following code auto-back-gdrive.shfile▼

drive upload --file "admin.$(date '+%Y-%m-%d').tar"

2) Next, add it to the Corn Job timed task to run it automatically▼

echo "0 2 * * * root /home/backup/auto-back-gdrive.sh >> /etc/crontab
  • Now, the Corn Job cron job runs every day at 2am.

Please Note

This app has been blocked
  • This app is trying to access sensitive information in your Google Account.To keep your account safe, Google blocked this access.

For the solution, please click the following link to view the VPS using GDrive automatic synchronization tutorial▼

Here are more tutorials on automatic website backup▼

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Centos6/7 how to automatically backup VestaCP files to Gdrive network disk? , to help you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-1110.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top