我使用VaultPress来获取WordPress博客的备份 https://dashboard.vaultpress.com/
点击下载备份按钮后,此站点会向我发送一个可以下载的链接。当我点击此链接时,它开始在浏览器中下载我的备份,这是完美的。但我尝试使用wget
或curl
在我的Ubuntu系统中下载此功能,但直到现在都没有成功。以下是下载URL的样子:
https://dashboard.vaultpress.com/12345/restore/?step=4&job=12345678&check=
eric@eric:~# wget https://dashboard.vaultpress.com/12345/restore/?step=4&job=12345678&check=<somehashedvalue>
[5] 2229
[6] 2230
[6] Done job=12345678
eric@eric:~# --2015-02-08 02:25:07-- https://dashboard.vaultpress.com/12345/restore/?step=4
Resolving dashboard.vaultpress.com (dashboard.vaultpress.com)... 192.0.96.249, 192.0.96.250
Connecting to dashboard.vaultpress.com (dashboard.vaultpress.com)|192.0.96.249|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: / [following]
--2015-02-08 02:25:09-- https://dashboard.vaultpress.com/
Reusing existing connection to dashboard.vaultpress.com:443.
HTTP request sent, awaiting response... 302 Found
Location: /account/login/ [following]
--2015-02-08 02:25:09-- https://dashboard.vaultpress.com/account/login/
Reusing existing connection to dashboard.vaultpress.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html?step=4’
[ <=> ] 7,709 --.-K/s in 0s
2015-02-08 02:25:09 (20.9 MB/s) - ‘index.html?step=4’ saved [7709]
PS:文件大小几乎为1 GB。
然后我使用了user / pass:
eric@eric:~# wget --user <myusername> --password <mypassword> https://aboveurl
我甚至使用了--ask-password
:
eric@eric:~# wget --user <myusername> --ask-password https://aboveurl
但在这种情况下,不是要求密码,而是完成操作,然后在另一个shell中询问密码(我不知道确切的术语),如下所示:
eric@eric:~# wget --user <myusername> --ask-password https://dashboard.vaultpress.com/12345/restore/?step=4&job=12345678&check=<hashedvalue>
[1] 1979
[2] 1980
eric@eric:~# Password for user ‘<myusername>’: <mypassword-here>
<mypassword>: command not found
最后,我尝试了curl
:
eric@eric:~# curl -u <myusername>:<mypassword> https://dashboard.vaultpress.com/12345/restore/?step=4&job=12345678&check=<hashedvalue>
[5] 2010
[6] 2011
eric@eric:~#
我不知道发生了什么?那些[5] 2010 [6] 2011 or [5] 2229
此解决方案也无效: wget with authentication
答案 0 :(得分:2)
URL中的&符使Linux创建在后台运行的新进程。 PID打印在方括号中的数字后面。
将网址写在双引号内,然后重试:
wget "https://dashboard.vaultpress.com/12345/restore/?step=4&job=12345678&check=<somehashedvalue>"