使用rsync或类似方法从Dropbox复制到UNIX计算机?

时间:2012-10-24 10:11:33

标签: unix dropbox rsync

有没有办法可以直接从Dropbox服务器将数据复制到UNIX服务器,而不是root用户或安装了Dropbox软件?

类似的东西:

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

(想要这样做的原因是UNIX服务器和Dropbox服务器之间的传输速度要快得多,因为它们都在主干上,而不是本地机器和UNIX服务器之间,它们有一个家宽带连接)。

3 个答案:

答案 0 :(得分:1)

您可以使用wget从命令行将文件从dropbox下载到Server。像

这样的东西
wget http://dl.dropbox.com/u/12345678/largefile.zip

如果您使用慢速链接,并且在下载所有文件之前下载中断,则可以通过在wget中使用-c选项从任何停止的位置继续下载。只是做:

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

答案 1 :(得分:0)

我不相信你有对Dropbox服务器的SSH访问权限。想一想,这意味着Dropbox服务器将拥有数千甚至数百万的SSH帐户,只是用户可能会使用它。此外,默认的Unix用户可以访问读取如此多的Unix操作系统并将其限制为几个命令,这有点大不了。想象一下,如果你的Unix用户以某种方式能够看到另一个Unix用户的数据,包括他们的Dropbox数据。不过好主意。

编辑:大写。

答案 2 :(得分:0)

尝试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/

config 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

从保管箱https://rclone.org/docs/复制所有文件

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