From 845289fdd8fbbed2cbc7eaf7a3d31efe5a8aa80d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 18 Aug 2016 16:37:23 -0400 Subject: untested moving of upload queues on to servers There needs to be a 1:1 mapping between upload queues and servers, otherwise using the upload queue risks two shards for the same object being uploaded to the same server. Also, fixed storeShards to give up on StoreAlreadyExists, rather than trying another storage location. Otherwise, on a name collision, the shards would be rejected by the servers, and be stored to their upload queues. --- CmdLine.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index a55e985..0213f28 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -21,12 +21,12 @@ data CmdLine = CmdLine , customShardParams :: Maybe ShardParams } -data Mode = Backup | Restore | Benchmark +data Mode = Backup | Restore | UploadQueued | Benchmark deriving (Show) parse :: Parser CmdLine parse = CmdLine - <$> optional (backup <|> restore <|> benchmark) + <$> optional (backup <|> restore <|> uploadqueued <|> benchmark) <*> optional (gpgswitch <|> fileswitch) <*> localstorageswitch <*> guiswitch @@ -41,6 +41,10 @@ parse = CmdLine ( long "restore" <> help "Retrieve a secret key from keysafe." ) + uploadqueued = flag' UploadQueued + ( long "uploadqueued" + <> help "Upload any data to servers that was queued by a previous --backup run." + ) benchmark = flag' Benchmark ( long "benchmark" <> help "Benchmark speed of keysafe's cryptographic primitives." -- cgit v1.2.3