ubuntu安装rclone,备份数据到gdrive

**

安装rclone:

**

  curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
  unzip rclone-current-linux-amd64.zip
  cd rclone-*-linux-amd64
  sudo cp rclone /usr/bin/
  sudo chown root:root /usr/bin/rclone
  sudo chmod 755 /usr/bin/rclone
  sudo mkdir -p /usr/local/share/man/man1
  sudo cp rclone.1 /usr/local/share/man/man1/
  sudo mandb 
  rclone config

配置google drive

rclone config

No remotes found – make a new one
n) New remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
n/r/c/s/q> n
name> remote (命名随意)
Type of storage to configure.
Choose a number from below, or type in your own value
1 / Amazon Drive
“amazon cloud drive”
2 / Amazon S3 (also Dreamhost, Ceph, Minio)
“s3”
3 / Backblaze B2
“b2”
4 / Dropbox
“dropbox”
5 / Encrypt/Decrypt a remote
“crypt”
6 / FTP Connection
“ftp”
7 / Google Cloud Storage (this is not Google Drive)
“google cloud storage”
8 / Google Drive
“drive”
9 / Hubic
“hubic”
10 / Local Disk
“local”
11 / Microsoft OneDrive
“onedrive”
12 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
“swift”
13 / SSH/SFTP Connection
“sftp”
14 / Yandex Disk
“yandex”
Storage> 8
Google Application Client Id – leave blank normally.
client_id> 直接回车略过
Google Application Client Secret – leave blank normally.
client_secret> 直接回车略过
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> n
If your browser doesn’t open automatically go to the following link: http://**
Log in and authorize rclone for access
Enter verification code>

复制上面的网址到你的本地浏览器打开并且登录,执行允许后得到一串代码,复制代码到上面输入

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

[**]
client_id =
client_secret =
token =

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

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>

rlcone两条简单命令:
rclone sync 同步命令
用法:rclone sync [同步的目录文件地址] [上面设置的名字]:[google drive的目录名]

rclone copy 复制命令
用法:rclone copy [同步的目录文件地址] [上面设置的名字]:[google drive的目录名]

为您推荐

发表评论

电子邮件地址不会被公开。 必填项已用*标注