Merge branch 's3-classes'
This commit is contained in:
commit
f33e760aab
5 changed files with 43 additions and 4 deletions
|
@ -41,11 +41,12 @@ glacierConfigurator a = do
|
||||||
where
|
where
|
||||||
needglaciercli = $(widgetFile "configurators/needglaciercli")
|
needglaciercli = $(widgetFile "configurators/needglaciercli")
|
||||||
|
|
||||||
data StorageClass = StandardRedundancy | ReducedRedundancy
|
data StorageClass = StandardRedundancy | StandardInfrequentAccess | ReducedRedundancy
|
||||||
deriving (Eq, Enum, Bounded)
|
deriving (Eq, Enum, Bounded)
|
||||||
|
|
||||||
instance Show StorageClass where
|
instance Show StorageClass where
|
||||||
show StandardRedundancy = "STANDARD"
|
show StandardRedundancy = "STANDARD"
|
||||||
|
show StandardInfrequentAccess = "STANDARD_IA"
|
||||||
show ReducedRedundancy = "REDUCED_REDUNDANCY"
|
show ReducedRedundancy = "REDUCED_REDUNDANCY"
|
||||||
|
|
||||||
data AWSInput = AWSInput
|
data AWSInput = AWSInput
|
||||||
|
@ -75,6 +76,9 @@ s3InputAForm defcreds = AWSInput
|
||||||
storageclasses :: [(Text, StorageClass)]
|
storageclasses :: [(Text, StorageClass)]
|
||||||
storageclasses =
|
storageclasses =
|
||||||
[ ("Standard redundancy", StandardRedundancy)
|
[ ("Standard redundancy", StandardRedundancy)
|
||||||
|
#if MIN_VERSION_aws(0,13,0)
|
||||||
|
, ("Infrequent access (cheaper for backups and archives)", StandardInfrequentAccess)
|
||||||
|
#endif
|
||||||
, ("Reduced redundancy (costs less)", ReducedRedundancy)
|
, ("Reduced redundancy (costs less)", ReducedRedundancy)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -500,6 +500,9 @@ getBucketName = map toLower <$$> M.lookup "bucket"
|
||||||
getStorageClass :: RemoteConfig -> S3.StorageClass
|
getStorageClass :: RemoteConfig -> S3.StorageClass
|
||||||
getStorageClass c = case M.lookup "storageclass" c of
|
getStorageClass c = case M.lookup "storageclass" c of
|
||||||
Just "REDUCED_REDUNDANCY" -> S3.ReducedRedundancy
|
Just "REDUCED_REDUNDANCY" -> S3.ReducedRedundancy
|
||||||
|
#if MIN_VERSION_aws(0,13,0)
|
||||||
|
Just s -> S3.OtherStorageClass (T.pack s)
|
||||||
|
#endif
|
||||||
_ -> S3.Standard
|
_ -> S3.Standard
|
||||||
|
|
||||||
getPartSize :: RemoteConfig -> Maybe Integer
|
getPartSize :: RemoteConfig -> Maybe Integer
|
||||||
|
|
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -4,6 +4,10 @@ git-annex (5.20150917) UNRELEASED; urgency=medium
|
||||||
uses the git-annex branch and would create it if it were missing.
|
uses the git-annex branch and would create it if it were missing.
|
||||||
* assistant: When updating ~/.ssh/config, preserve any symlinks.
|
* assistant: When updating ~/.ssh/config, preserve any symlinks.
|
||||||
* webapp: Remove the "disable remote" feature from the UI.
|
* webapp: Remove the "disable remote" feature from the UI.
|
||||||
|
* S3: When built with aws-0.13.0, supports using more storage classes.
|
||||||
|
In particular, storageclass=STANDARD_IA to use Amazon's
|
||||||
|
new Infrequently Accessed storage, and storageclass=NEARLINE
|
||||||
|
to use Google's NearLine storage.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Wed, 16 Sep 2015 12:23:33 -0400
|
-- Joey Hess <id@joeyh.name> Wed, 16 Sep 2015 12:23:33 -0400
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2015-09-17T21:09:24Z"
|
||||||
|
content="""
|
||||||
|
It's now possible to use storageclass=NEARLINE, when git-annex is built
|
||||||
|
with aws-0.13.0. So, the approach of manually creating the bucket with the
|
||||||
|
desired storage class should work now.
|
||||||
|
|
||||||
|
I'm unsure if the first method, of letting git-annex create the bucket,
|
||||||
|
will work now. Can you test? It may work now too with
|
||||||
|
storageclass=NEARLINE. While no storage class is currently specified when
|
||||||
|
creating the bucket (that's not in the S3 api at all); but once the bucket
|
||||||
|
exists, with whatever storage class is default, git-annex will specify
|
||||||
|
NEARLINE when storing objects in it. Seems a good chance this will work,
|
||||||
|
and it'd be easier than extending the aws library with google-specific
|
||||||
|
features.
|
||||||
|
"""]]
|
|
@ -37,9 +37,19 @@ the S3 remote.
|
||||||
"us-west-1", "us-west-2", "ap-southeast-1", "ap-southeast-2", and
|
"us-west-1", "us-west-2", "ap-southeast-1", "ap-southeast-2", and
|
||||||
"sa-east-1".
|
"sa-east-1".
|
||||||
|
|
||||||
* `storageclass` - Default is "STANDARD". If you have configured git-annex
|
* `storageclass` - Default is "STANDARD".
|
||||||
to preserve multiple [[copies]], consider setting this to "REDUCED_REDUNDANCY"
|
Consult S3 provider documentation for pricing details and available
|
||||||
to save money.
|
storage classes.
|
||||||
|
|
||||||
|
When using Amazon S3, if you have configured git-annex to preserve
|
||||||
|
multiple [[copies]], consider setting this to "REDUCED_REDUNDANCY"
|
||||||
|
to save money. Or, if the remote will be used for backup or archival,
|
||||||
|
and so its files are Infrequently Accessed, "STANDARD_IA" is also a
|
||||||
|
good choice to save money.
|
||||||
|
|
||||||
|
Note that changing the storage class of an existing S3 remote will
|
||||||
|
affect new objects sent to the remote, but not objects already
|
||||||
|
stored there.
|
||||||
|
|
||||||
* `host` and `port` - Specify in order to use a different, S3 compatable
|
* `host` and `port` - Specify in order to use a different, S3 compatable
|
||||||
service.
|
service.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue