git-annex/Remote
Joey Hess e55e445a36
add API for exporting
Implemented so far for the directory special remote.

Several remotes don't make sense to export to. Regular Git remotes,
obviously, do not. Bup remotes almost certianly do not, since bup would
need to be used to extract the export; same store for Ddar. Web and
Bittorrent are download-only. GCrypt is always encrypted so exporting to
it would be pointless. There's probably no point complicating the Hook
remotes with exporting at this point. External, S3, Glacier, WebDAV,
Rsync, and possibly Tahoe should be modified to support export.

Thought about trying to reuse the storeKey/retrieveKeyFile/removeKey
interface, rather than adding a new interface. But, it seemed better to
keep it separate, to avoid a complicated interface that sometimes
encrypts/chunks key/value storage and sometimes users non-key/value
storage. Any common parts can be factored out.

Note that storeExport is not atomic.
doc/design/exporting_trees_to_special_remotes.mdwn has some things in
the "resuming exports" section that bear on this decision. Basically,
I don't think, at this time, that an atomic storeExport would help with
resuming, because exports are not key/value storage, and we can't be
sure that a partially uploaded file is the same content we're currently
trying to export.

Also, note that ExportLocation will always use unix path separators.
This is important, because users may export from a mix of windows and
unix, and it avoids complicating the API with path conversions,
and ensures that in such a mix, they always use the same locations for
exports.

This commit was sponsored by Bruno BEAUFILS on Patreon.
2017-08-29 13:00:41 -04:00
..
Directory remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
External external: nice error message for keys with spaces in their name 2017-08-17 16:18:34 -04:00
Helper avoid the dashed ssh hostname class of security holes 2017-08-17 22:11:31 -04:00
Rsync adeiu, MissingH 2017-05-16 01:03:52 -04:00
WebDAV adeiu, MissingH 2017-05-16 01:03:52 -04:00
BitTorrent.hs add API for exporting 2017-08-29 13:00:41 -04:00
Bup.hs add API for exporting 2017-08-29 13:00:41 -04:00
Ddar.hs add API for exporting 2017-08-29 13:00:41 -04:00
Directory.hs add API for exporting 2017-08-29 13:00:41 -04:00
External.hs add API for exporting 2017-08-29 13:00:41 -04:00
GCrypt.hs add API for exporting 2017-08-29 13:00:41 -04:00
Git.hs add API for exporting 2017-08-29 13:00:41 -04:00
Glacier.hs add API for exporting 2017-08-29 13:00:41 -04:00
Hook.hs add API for exporting 2017-08-29 13:00:41 -04:00
List.hs stub Remote.P2P 2016-12-06 12:27:58 -04:00
P2P.hs add API for exporting 2017-08-29 13:00:41 -04:00
Rsync.hs add API for exporting 2017-08-29 13:00:41 -04:00
S3.hs add API for exporting 2017-08-29 13:00:41 -04:00
Tahoe.hs add API for exporting 2017-08-29 13:00:41 -04:00
Web.hs add API for exporting 2017-08-29 13:00:41 -04:00
WebDAV.hs add API for exporting 2017-08-29 13:00:41 -04:00