Home Tips & Trick Cara Install rclone dan Backup File ke Google Drive

Cara Install rclone dan Backup File ke Google Drive

269
0
Cara Install rclone dan Backup File ke Google Drive
Cara Install rclone dan Backup File ke Google Drive
Cara Install rclone dan Backup File ke Google Drive

Content.IDCara Install rclone dan Backup File ke Google Drive. rclone adalah salah satu software di linux yang berfungsi untuk menghubungkan berbagai cloud drive ke vps kita.

Dengan rclone kita bisa melakukan backup server dan di upload ke cloud drive seperti:

  • GDrive,
  • OneDrive,
  • Amazon Drive,
  • Amazon S3,
  • DropBox,
  • Google Cloud Storage,
  • Hubic,
  • JottaCloud,
  • Mega.nz,
  • Microsoft Azure Blob Storage,
  • OpenDrive,
  • Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH),
  • Pcloud,
  • QingCloud Object Storage,
  • SSH/SFTP Connection,
  • Webdav,
  • Yandex Disk,
  • http Connection,
  • Local Drive,

Cara Install rclone di VPS Linux

Step 1. Install rclone dengan perintah:

Centos

yum install rclone -y

Ubtuntu

apt install rclone -y

Step 2. Configurasi rclone dengan perintah:

rclone config

Hasil perintah rclone config

[[email protected] ~]# rclone config
2019/04/02 16:51:15 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q>

Step 3. Jika baru pertama kali menginstall rclone dan belum memiliki config ketik “n” untuk membuat config baru. Dan masukkan nama remote drive rclone.

n/s/q> n
name> GDrive
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / A stackable unification remote, which can appear to merge the contents of several remotes
\ "union"
2 / Alias for a existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Box
\ "box"
7 / Cache a remote
\ "cache"
8 / Dropbox
\ "dropbox"
9 / Encrypt/Decrypt a remote
\ "crypt"
10 / FTP Connection
\ "ftp"
11 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
12 / Google Drive
\ "drive"
13 / Hubic
\ "hubic"
14 / JottaCloud
\ "jottacloud"
15 / Local Disk
\ "local"
16 / Mega
\ "mega"
17 / Microsoft Azure Blob Storage
\ "azureblob"
18 / Microsoft OneDrive
\ "onedrive"
19 / OpenDrive
\ "opendrive"
20 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
21 / Pcloud
\ "pcloud"
22 / QingCloud Object Storage
\ "qingstor"
23 / SSH/SFTP Connection
\ "sftp"
24 / Webdav
\ "webdav"
25 / Yandex Disk
\ "yandex"
26 / http Connection
   \ "http"
Storage>

Step 4. Pilih jenis storage yang diinginkan. Disini Content.ID menggunakan Google Drive sebagai storage penyimpanan. Maka diketik drive lalu tekan enter.

Storage> drive
** See help for drive backend at: https://rclone.org/drive/ **

Google Application Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Google Application Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"
 2 / Read-only access to file metadata and file contents.
   \ "drive.readonly"
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ "drive.appfolder"
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ "drive.metadata.readonly"
scope>

Step 5. Pilih Scope mode penyimpanan. Jika tidak yakin tekan 1 saja.

scope> 1
ID of the root folder
Leave blank normally.
Fill in to access "Computers" folders. (see docs).
Enter a string value. Press Enter for the default ("").
root_folder_id>
Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Enter a string value. Press Enter for the default ("").
service_account_file>
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine or Y didn't work
y) Yes
n) No
y/n> y
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...

Step 6. Akses url yang diberikan oleh rclone. Untuk mengakses IP ini anda bisa menggunakan PuTTy tunel. Baca Menggunakan PuTTY Sebagai Private Tunnel Socks Proxy

If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
Configure this as a team drive?
y) Yes
n) No
y/n> n
--------------------
[GDrive]
type = drive
scope = drive
token = {"access_token":"ya29.GlvfBld7SdcRmbFwstbeuGxxxxxxxxxxxxxxxxxxxxxxxxxKxACh4ECFTCYHEmWUShflFnPs3Ve-hkzYwAgRdQ00ZMweJspXxT","token_type":"Bearer","refresh_token":"1/y20WVyj74cxxxxxxxxxxx6i0qDE","expiry":"2019-04-02T18:06:19.669276909Z"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
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

Step 7. Cek apakah remote storage telah berhasil dengan perintah

rclone listremotes

Hasilnya

[[email protected] ~]# rclone listremotes
GDrive:

Step 8. Setup rclone sudah berhasil.

Untuk perintah lain dari rclone ketik rclone –help di terminal

Penutup.

Untuk melakukan backup gunakan perintah berikut:

rclone copy /home/content.id/backup/status GDrive:/backup

Untuk mengecek apakah sudah berhasil mengcopy ke GDrive:/backup gunakan perintah ini:

rclone ls GDrive:/backup

Salam

(Content.id)

Salam

Previous articleMenggunakan PuTTY Sebagai Private Tunnel Socks Proxy
Next articleCara Mudah Install Proxmox di VPS Nested Virtualization KVM PHP-Friends.de
Content.id adalah media belajar bersama untuk membangun negerisalam https://content.id

LEAVE A REPLY

Please enter your comment!
Please enter your name here