mirror of
https://github.com/rclone/rclone.git
synced 2026-01-07 11:03:15 +00:00
http: fix, tidy and rework ready for release
* Fix remaining problems * Refactor to make testing easier and add a test suite * Make path parsing more robust. * Add single file operations * Add MimeType reading for objects * Add documentation * Note go1.7+ is required to build
This commit is contained in:
@@ -25,6 +25,7 @@ Rclone is a command line program to sync files and directories to and from
|
||||
* Yandex Disk
|
||||
* SFTP
|
||||
* FTP
|
||||
* HTTP
|
||||
* The local filesystem
|
||||
|
||||
Features
|
||||
|
||||
@@ -32,6 +32,7 @@ See the following for detailed instructions for
|
||||
* [Yandex Disk](/yandex/)
|
||||
* [SFTP](/sftp/)
|
||||
* [FTP](/ftp/)
|
||||
* [HTTP](/http/)
|
||||
* [Crypt](/crypt/) - to encrypt other remotes
|
||||
|
||||
Usage
|
||||
|
||||
137
docs/content/http.md
Normal file
137
docs/content/http.md
Normal file
@@ -0,0 +1,137 @@
|
||||
---
|
||||
title: "HTTP Remote"
|
||||
description: "Read only remote for HTTP servers"
|
||||
date: "2017-06-19"
|
||||
---
|
||||
|
||||
<i class="fa fa-globe"></i> HTTP
|
||||
-------------------------------------------------
|
||||
|
||||
The HTTP remote is a read only remote for reading files of a
|
||||
webserver. The webserver should provide file listings which rclone
|
||||
will read and turn into a remote. This has been tested with common
|
||||
webservers such as Apache/Nginx/Caddy and will likely work with file
|
||||
listings from most web servers. (If it doesn't then please file an
|
||||
issue, or send a pull request!)
|
||||
|
||||
Paths are specified as `remote:` or `remote:path/to/dir`.
|
||||
|
||||
Here is an example of how to make a remote called `remote`. First
|
||||
run:
|
||||
|
||||
rclone config
|
||||
|
||||
This will guide you through an interactive setup process:
|
||||
|
||||
```
|
||||
No remotes found - make a new one
|
||||
n) New remote
|
||||
s) Set configuration password
|
||||
q) Quit config
|
||||
n/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"
|
||||
15 / http Connection
|
||||
\ "http"
|
||||
Storage> http
|
||||
URL of http host to connect to
|
||||
Choose a number from below, or type in your own value
|
||||
1 / Connect to example.com
|
||||
\ "https://example.com"
|
||||
url> https://beta.rclone.org
|
||||
Remote config
|
||||
--------------------
|
||||
[remote]
|
||||
url = https://beta.rclone.org
|
||||
--------------------
|
||||
y) Yes this is OK
|
||||
e) Edit this remote
|
||||
d) Delete this remote
|
||||
y/e/d> y
|
||||
Current remotes:
|
||||
|
||||
Name Type
|
||||
==== ====
|
||||
remote http
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
This remote is called `remote` and can now be used like this
|
||||
|
||||
See all the top level directories
|
||||
|
||||
rclone lsd remote:
|
||||
|
||||
List the contents of a directory
|
||||
|
||||
rclone ls remote:directory
|
||||
|
||||
Sync the remote `directory` to `/home/local/directory`, deleting any excess files.
|
||||
|
||||
rclone sync remote:directory /home/local/directory
|
||||
|
||||
### Read only ###
|
||||
|
||||
This remote is read only - you can't upload files to an HTTP server.
|
||||
|
||||
### Modified time ###
|
||||
|
||||
Most HTTP servers store time accurate to 1 second.
|
||||
|
||||
### Checksum ###
|
||||
|
||||
No checksums are stored.
|
||||
|
||||
### Usage without a config file ###
|
||||
|
||||
Note that since only two environment variable need to be set, it is
|
||||
easy to use without a config file like this.
|
||||
|
||||
```
|
||||
RCLONE_CONFIG_ZZ_TYPE=http RCLONE_CONFIG_ZZ_URL=https://beta.rclone.org rclone lsd zz:
|
||||
```
|
||||
|
||||
Or if you prefer
|
||||
|
||||
```
|
||||
export RCLONE_CONFIG_ZZ_TYPE=http
|
||||
export RCLONE_CONFIG_ZZ_URL=https://beta.rclone.org
|
||||
rclone lsd zz:
|
||||
```
|
||||
@@ -29,6 +29,7 @@ Here is an overview of the major features of each cloud storage system.
|
||||
| Yandex Disk | MD5 | Yes | No | No | R/W |
|
||||
| SFTP | - | Yes | Depends | No | - |
|
||||
| FTP | - | No | Yes | No | - |
|
||||
| HTTP | - | No | Yes | No | R |
|
||||
| The local filesystem | All | Yes | Depends | No | - |
|
||||
|
||||
### Hash ###
|
||||
@@ -122,6 +123,7 @@ operations more efficient.
|
||||
| Yandex Disk | Yes | No | No | No | No [#575](https://github.com/ncw/rclone/issues/575) | Yes |
|
||||
| SFTP | No | No | Yes | Yes | No | No |
|
||||
| FTP | No | No | Yes | Yes | No | No |
|
||||
| HTTP | No | No | No | No | No | No |
|
||||
| The local filesystem | Yes | No | Yes | Yes | No | No |
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user