Memanfaatkan gdrive untuk backup server dengan menggunakan rclone, berikut link unduh dan langkah-langkah nya :

https://downloads.rclone.org/v1.53.3/rclone-v1.53.3-linux-amd64.rpm

rpm -ivh rclone-v1.53.3-linux-amd64.rpm

rclone config

No remotes found – make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

name> gdrive

13 / Google Drive
\ “drive”
Storage > 13

client_id > (enter)
client_secret > (enter)

1 / Full access all files, excluding Application Data Folder.
\ “drive”

scope> 1

root_folder_id> enter
service_account_file> enter

Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> (enter)

Remote config
Use auto config?

  • Say Y if not sure
  • Say N if you are working on a remote or headless machine
    y) Yes (default)
    n) No
    y/n> n (enter)

Please go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=1.apps.googleusercontent.com&redirect_uri=urn%3xxxf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=xxxxxx
Log in and authorize rclone for access

copas link yang diberikan oleh rclone ke browser
(seperti contoh diatas) dan login ke akun gdrive anda untuk mengkonfirmasi izin rclone mengakses gdrive, copykan kembali kode verifikasi dari gdrive ke server rclone :

Enter verification code> 4/1AY0eg45Ai7_5dNl8JnlRqpt9UkkbFmY1a4Js3W6t1SCaGl

Configure this as a team drive?
y) Yes
n) No (default)
y/n> (enter)


‘[gdrive]

type = drive
scope = drive

‘token = {“access_token”:”ya29.”,”token_type”:”Bearer”,”refresh_token”:”Q_oTIE-8VGCgYIARAAGBASNwF-“,”expiry”:”2020-12-13T22:02:57.403593964+07:00″}

y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> (enter)

Remote config
Configure this as a team drive?
y) Yes
n) No (default)
y/n> n (enter)

Current remotes:

Name Type
==== ====
gdrive drive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

ujicoba rclone dengan :

rclone ls gdrive: (harusnya tampil isi folder/drive gdrive anda)
rclone cp /namafolderasal/namafilesumber gdrive:/namafoldertujuan/
rclone sync /namafolderasal/ gdrive:/namafoldertujuan/ (perintah ini kurang lebih sama dengan rsync)

sisanya silakan menggunakan crontab untuk melakukan autobackup data server ke gdrive secara otomatis..selamat mencoba & DWYOR!

sumber bacaan :

https://cloudborneo.com/cara-install-dan-konfigurasi-rclone-untuk-backup-data-ke-berbagai-layanan-cloud/

https://ulunrapuydebian.wordpress.com/2017/02/22/backup-data-dan-aplikasi-spse-ke-google-drive-menggunakan-rclone/