- Implementing a compatibility layer in front of custom or proprietary storage providers for which CockroachDB does not yet have built-in support
- Using on-premises storage
HTTP file servers are not supported as storage for .
HTTP export storage API
A CockroachDB process that requires reading or writing external files can use the HTTP Export Storage API by prefacing the address withhttp, e.g., http://fileserver/mnt/cockroach-exports.
This API uses the GET, PUT and DELETE methods. This behaves like you would expect typical HTTP requests to work. After a PUT request to some path, a subsequent GET request should return the content sent in the PUT request body, at least until a DELETE request is received for that path.
Examples
You can use any file server software that supportsGET, PUT and DELETE methods, but we’ve included code samples for common ones:
We do not recommend using any machines running
cockroach as file servers. Using machines that are running cockroach as file servers could negatively impact performance if I/O operations exceed capacity.Using PHP with IMPORT
The PHP language has an HTTP server built in. You can serve local files using the commands below. For more information about how to import these locally served files, see the documentation for the statement.
Using Python with IMPORT
The Python language has an HTTP server included in the standard library. You can serve local files using the commands below. For more information about how to import these locally served files, see the documentation for the statement.
Using Ruby with IMPORT
The Ruby language has an HTTP server included in the standard library. You can serve local files using the commands below. For more information about how to import these locally served files, see the documentation for the statement.
Using nginx as a file server
-
Install
nginxwith thewebdavmodule (often included in-fullor similarly named packages in various distributions). -
In the
nginx.conffile, add adav_methods PUT DELETEdirective. For example:

