使用rsync或类似的方式从Dropbox复制到Unix机器



有什么方法可以将数据直接从Dropbox服务器复制到UNIX服务器,而无需root或安装在此处的Dropbox软件?

类似:

rsync -aP myusername@dropbox.com:somepath/ .

(想要这样做的原因是,由于它们都在主链上,因此Unix服务器和Dropbox服务器之间的传输速度要比我的本地计算机和UNIX服务器之间的传输速度要快得多,后宽带连接)。

您可以使用WGET从命令行下载到服务器的文件。

之类的东西
wget http://dl.dropbox.com/u/12345678/largefile.zip

如果您处于缓慢的链接,并且下载在下载所有文件之前就可以切断,则可以通过将-c选项与WGET一起使用。只是做:

wget -c http://dl.dropbox.com/u/12345678/largefile.zip

尝试rclone https://github.com/dropbox/dbxcli/issues/60#issuecomment-497713363

安装

$ curl -OJN https://downloads.rclone.org/rclone-current-linux-amd64.zip
$ unzip rclone-current-linux-amd64.zip
$ cp rclone-v1.47.0-linux-amd64/rclone ~/bin/

配置https://rclone.org/dropbox/

$ rclone config
2019/05/31 15:00:07 NOTICE: Config file "/home/roman/.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> n
name> dropbox
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 Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc)
    "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 / Koofr
    "koofr"
16 / Local Disk
    "local"
17 / Mega
    "mega"
18 / Microsoft Azure Blob Storage
    "azureblob"
19 / Microsoft OneDrive
    "onedrive"
20 / OpenDrive
    "opendrive"
21 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
    "swift"
22 / Pcloud
    "pcloud"
23 / QingCloud Object Storage
    "qingstor"
24 / SSH/SFTP Connection
    "sftp"
25 / Webdav
    "webdav"
26 / Yandex Disk
    "yandex"
27 / http Connection
    "http"
Storage> 8
** See help for dropbox backend at: https://rclone.org/dropbox/ **
Dropbox App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Dropbox App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
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
y) Yes
n) No
y/n>
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...
Got code
--------------------
[dropbox]
type = dropbox
token = {"access_token":"<token>","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
Current remotes:
Name                 Type
====                 ====
dropbox              dropbox
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

从Dropbox复制所有文件https://rclone.org/docs/

$ rclone copy --dry-run dropbox:/ .
$ rclone copy dropbox:/ .

我不相信您对Dropbox服务器有访问权限。想一想,这意味着Dropbox服务器将拥有数千个SSH帐户,只是用户使用它的机会。此外,默认的UNIX用户可以访问读取大量的UNIX OS并将其限制在几个命令中,这很重要。想象一下,如果您的UNIX用户能够以某种方式看到其他Unix用户(包括其Dropbox数据)的数据。好主意。

编辑:大写。

最新更新