packages feed

bkr 0.1.0 → 0.1.1

raw patch · 4 files changed

+72/−52 lines, 4 filesdep ~HDBCdep ~awsdep ~directory

Dependency ranges changed: HDBC, aws, directory, filepath, http-conduit, random, text, unix, utf8-string

Files

bkr.cabal view
@@ -1,10 +1,10 @@ name:                bkr-version:             0.1.0+version:             0.1.1 synopsis:            Backup utility for backing up to cloud storage services (S3 only right now) description:         Easy to use backup tool utilizing cloud services (S3 only right now) as backup storage. -        bkr is in very early development stage. Right now bkr is rather a synchronization then a backup utility. bkr uploads files from wanted folders to a remote storage service, next time it runs it checks for changes and uploads new or altered files but does not keep copies of altered files (hence rather synchronization then backup). For more information about installation and setup please visit "https://github.com/ingesson/bkr". All suggestions and bug reports are of course more then welcome.+        bkr is in very early development stage. Right now bkr is rather a synchronization then a backup utility. bkr uploads files from wanted folders to a remote storage service, next time it runs it checks for changes and uploads new or altered files but does not keep copies of altered files (hence rather synchronization then backup). For more information about installation and setup, release notes and more please visit https:\/\/github.com\/ingesson\/bkr. All suggestions and bug reports are of course more then welcome. license:             BSD3 license-file:        LICENSE copyright:           (c) 2012 Michael Smietana@@ -14,6 +14,7 @@ build-type:          Simple cabal-version:       >= 1.8 tested-with:         GHC == 7.0.4+                     , GHC == 7.4 homepage:            https://github.com/ingesson/bkr bug-reports:         https://github.com/ingesson/bkr/issues    @@ -21,31 +22,43 @@   hs-source-dirs: src      exposed-modules: System.Bkr.Hasher-                 , System.Bkr.BkrConfig-                 , System.Bkr.BkrFundare-                 , System.Bkr.BkrLogging-                 , System.Bkr.BkrLocalFile-                 , System.Bkr.BkrLocalMeta-                 , System.Bkr.TargetServices.S3.BkrS3Bucket-                 , System.Bkr.TargetServices.S3.BkrAwsConfig+                   , System.Bkr.BkrConfig+                   , System.Bkr.BkrFundare+                   , System.Bkr.BkrLogging+                   , System.Bkr.BkrLocalFile+                   , System.Bkr.BkrLocalMeta+                   , System.Bkr.TargetServices.S3.BkrS3Bucket+                   , System.Bkr.TargetServices.S3.BkrAwsConfig    build-depends:   base == 4.*-                 , directory >= 1.0.1.2 && < 1.1.0.2-                 , aws >= 0.3.1-                 , haskell98 >= 1.1.0.0 && < 2.0.0.0-                 , hslogger >= 1.1.5-                 , strict >= 0.3.2-                 , HDBC-sqlite3 >= 2.3.3.0-                 , pureMD5 >= 2.1.0.3-                 , MissingH >= 1.1.1.0-                 , unix >= 2.5.0.0 && < 2.5.1.0-                 , bytestring == 0.9.*-                 , utf8-string == 0.3.*-                 , text >= 0.11-                 , filepath >= 1.1 && < 1.4-                 , random == 1.0.0.3-                 , HDBC >= 2.3.0.0-                 , http-conduit >= 1.2.0+                   , HDBC-sqlite3 >= 2.3.3.0+                   , hslogger >= 1.1.5+                   , MissingH >= 1.1.1.0+                   , pureMD5 >= 2.1.0.3+                   , strict >= 0.3.2+                   , bytestring == 0.9.*+  if impl(ghc < 7.4)+     build-depends:   directory >= 1.0.1.2 && < 1.1.0.2+                      , aws >= 0.3.1+                      , haskell98 >= 1.1.0.0 && < 2.0.0.0+                      , unix >= 2.5.0.0 && < 2.5.1.0+                      , bytestring == 0.9.*+                      , utf8-string == 0.3.*+                      , text >= 0.11+                      , filepath >= 1.1 && < 1.4+                      , random == 1.0.0.3+                      , HDBC >= 2.3.0.0+                      , http-conduit >= 1.2.0+  if impl(ghc > 7.2)+     build-depends:   directory >= 1.1.0.2+                      , aws >= 0.4.0.1+                      , unix >= 2.5.1.0+                      , utf8-string >= 0.3.7+                      , text >= 0.11.1.13+                      , filepath >= 1.3 && < 1.4+                      , random == 1.0.1.1+                      , HDBC >= 2.3.1.1+                      , http-conduit >= 1.2.1                           ghc-options: -O2 -Wall @@ -55,22 +68,34 @@   main-is: Main.hs      build-depends:   base == 4.*-                 , directory >= 1.0.1.2 && < 1.1.0.2-                 , aws >= 0.3.1-                 , haskell98 >= 1.1.0.0 && < 2.0.0.0-                 , hslogger >= 1.1.5-                 , strict >= 0.3.2                  , HDBC-sqlite3 >= 2.3.3.0-                 , pureMD5 >= 2.1.0.3+                 , hslogger >= 1.1.5                  , MissingH >= 1.1.1.0-                 , unix >= 2.5.0.0 && < 2.5.1.0+                 , pureMD5 >= 2.1.0.3+                 , strict >= 0.3.2                  , bytestring == 0.9.*-                 , utf8-string == 0.3.*-                 , text >= 0.11-                 , filepath >= 1.1 && < 1.4-                 , random == 1.0.0.3-                 , HDBC >= 2.3.0.0-                 , http-conduit >= 1.2.0+  if impl(ghc < 7.4)+     build-depends:   directory >= 1.0.1.2 && < 1.1.0.2+                      , aws >= 0.3.1+                      , haskell98 >= 1.1.0.0 && < 2.0.0.0+                      , unix >= 2.5.0.0 && < 2.5.1.0+                      , bytestring == 0.9.*+                      , utf8-string == 0.3.*+                      , text >= 0.11+                      , filepath >= 1.1 && < 1.4+                      , random == 1.0.0.3+                      , HDBC >= 2.3.0.0+                      , http-conduit >= 1.2.0+  if impl(ghc > 7.2)+     build-depends:   directory >= 1.1.0.2+                      , aws >= 0.4.0.1+                      , unix >= 2.5.1.0+                      , utf8-string >= 0.3.7+                      , text >= 0.11.1.13+                      , filepath >= 1.3 && < 1.4+                      , random == 1.0.1.1+                      , HDBC >= 2.3.1.1+                      , http-conduit >= 1.2.1                     ghc-options: -O2 -Wall 
src/Main.hs view
@@ -1,9 +1,7 @@ {-|-bkr is meant to be an easy to use backup tool utilizing cloud services (S3 only right now) as backup storage.--bkr is in very early development stage. At the moment bkr is rather a synchronization then a backup utility. bkr uploads files from wanted folders to a remote storage service, next time it runs it checks for changes and uploads new or altered files but does not keep copies of altered files (hence rather synchronization then backup).+Easy to use backup tool utilizing cloud services (S3 only right now) as backup storage. -For more information about installation and setup please visit https://github.com/ingesson/bkr. All suggestions and bug reports are of course more then welcome.+bkr is in very early development stage. Right now bkr is rather a synchronization then a backup utility. bkr uploads files from wanted folders to a remote storage service, next time it runs it checks for changes and uploads new or altered files but does not keep copies of altered files (hence rather synchronization then backup). For more information about installation and setup, release notes and more please visit https:\/\/github.com\/ingesson\/bkr. All suggestions and bug reports are of course more then welcome. -}  import System.Bkr.BkrFundare
src/System/Bkr/Hasher.hs view
@@ -1,8 +1,8 @@   module System.Bkr.Hasher ( getFileHash-                  , getHashForString-                  ) where+                         , getHashForString+                         ) where  import Data.Digest.Pure.MD5 (md5, MD5Digest) 
src/System/Bkr/TargetServices/S3/BkrS3Bucket.hs view
@@ -55,7 +55,7 @@                                                                   , S3.gbMaxKeys   = Nothing                                                                   , S3.gbPrefix    = Just $ T.pack "bkrm"                                                                   } `C.catch` \ (ex :: C.SomeException) -> do-                                                                  logCritical "Failed to get objects from the S3 bucket, please check that your S3 credentials in the bkr configuration file are set correctly. The error was:"+                                                                  logCritical "Failed to get objects from S3 bucket, please check that your S3 credentials in the bkr configuration file are set correctly. The error was:"                                                                   C.throwIO ex            -- Print the response metadata.@@ -110,8 +110,7 @@      --putFile path uploadName (Just $ BUTF8.fromString $ show contentMD5)      putFile filePath uploadName Nothing 0 -{-| Upload file to S3. putFile will handle a failed attempt to upload the file by waiting 60 seconds and then retrying. If this fails five times it will raise an IO Error.-|-}+{-| Upload file to S3. putFile will handle a failed attempt to upload the file by waiting 60 seconds and then retrying. If this fails five times it will raise an IO Error. -} putFile :: FilePath -> T.Text -> Maybe B.ByteString -> Int -> IO () putFile filePath uploadName contentMD5 noOfRetries =      putFile' filePath uploadName contentMD5 `C.catch` \ (ex :: C.SomeException) ->@@ -171,7 +170,6 @@      readIORef metadataRef >>= logDebug . ("putFile: response metadata: " ++) . show  {--{-| Deprecated -} getBkrObjectsOld :: IO [BkrMeta] getBkrObjectsOld = do @@ -213,7 +211,6 @@      return bkrObjects -} {--{-| Deprecated. Filter function for filtering .bkrm objects (files). |-} hasBkrExtension :: T.Text -> Bool hasBkrExtension t = do      if (Prelude.last $ T.split (=='.') t) == "bkrm"@@ -222,14 +219,14 @@ -}  {--{-| A small function to save the object's data into a file handle. |-}+{-| A small function to save the object's data into a file handle. -} saveObject :: IO Handle -> Aws.HTTPResponseConsumer () --saveObject hndl status headers source = source $$ sinkIOHandle hndl saveObject hndl _ _ source = source $$ sinkIOHandle hndl -}  {--{-| Takes a list of bkr objects, gets them one by one from S3, parses content creating and returning a list of BkrObject's. This function uses the Knob package for in-memory temporary storage of the downloaded bkr object. |-}+{-| Takes a list of bkr objects, gets them one by one from S3, parses content creating and returning a list of BkrObject's. This function uses the Knob package for in-memory temporary storage of the downloaded bkr object. -} getBkrObject :: [T.Text] -> IO [BkrMeta] getBkrObject objNames = do @@ -264,7 +261,7 @@      return (concat objects) -} {--{-| Like getBkrObject but uses a temporary file instead of a virtual file when fetching and reading the bkr object files. |-}+{-| Like getBkrObject but uses a temporary file instead of a virtual file when fetching and reading the bkr object files. -} getBkrObject' :: [T.Text] -> IO [BkrMeta] getBkrObject' fileNames = do