summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-06-04feat: do not panic if chunk nonce is unexpectedly shortAlexander Batischev1-8/+27
Fixes #119.
2021-05-31feat: add subcommands for encrypting, decrypting individual chunksLars Wirzenius2-0/+65
2021-05-31refactor: only send/receive encrypted chunks with serverLars Wirzenius1-65/+65
Also, refactor the client code to split out the HTTP bits more clearly. The refactor should've been separately, but got entangled with other changes during frantic debugging.
2021-05-31feat: add chunk encryptionLars Wirzenius3-0/+205
2021-05-29feat! drop MAC passphrase, fix key derivationLars Wirzenius1-5/+10
Previously we were deriving a key that was of the wrong length for the aead crate. Now we make it the right length.
2021-05-29refactor: make metadata part of a chunkLars Wirzenius2-2/+21
This makes is harder to accidentally use the wrong metadata for a chunk.
2021-05-29refactor: only have client config without passwordsLars Wirzenius6-96/+49
This means the config is always the config, and not sometimes the config or the config and passwords. Also, there's no config option for encrypting, anymore. It will not be optional now.
2021-05-29refactor: count chunks via file system, not via chunk server APILars Wirzenius2-26/+1
2021-05-29refactor: make metadata be part of datachunkLars Wirzenius11-53/+62
This makes it harder to lose the metadata for a chunk, or to use unrelated metadata and chunk. Also, soon I will refactor things for encrypting chunks, which will need metadata embedded in the encrypted chunk. Sponsored-by: author
2021-05-29refactor: split bare chunk server client into its own structLars Wirzenius1-71/+84
This makes the code doing HTTP requests simpler for easier comprehension and debugging.
2021-04-29feat: improve error messagesLars Wirzenius9-97/+161
All unclear error messages should now be clearer. For example, all the ones related to a file mention the file name and the attempted operation that failed.
2021-04-26Port chunkids() to the iterator APIAlexander Batischev3-12/+24
2021-04-26Generalize the machinery to arbitrary result typesAlexander Batischev1-18/+55
2021-04-26Extend the iterator to users of LocalGeneration::files()Alexander Batischev4-7/+8
2021-04-26Use an iterator internally for LocalGenerationAlexander Batischev1-19/+32
This adds the machinery. We have to keep the compiled SQL query while the iterator is in use, so we wrap it in an `SqlResults` struct which the iterator borrows.
2021-04-26Expose fallibility of individual SQL resultsAlexander Batischev4-13/+27
`LocalGeneration::sql::files()` runs an SQL query, iterates over the results and collects the rows into a `Vec`. This can fail at any step: the query might fail to run, or one of the rows might fail to be fetched or processed. Right now, we lump all those failures into a `Result` that wraps the whole return value. This is only possible because we process each row before returning. Once `Vec` is replaced by an iterator, we won't have that luxury anymore, so we now wrap each individual element into its own `Result` (as well as wrapping the whole vector into a `Result` of its own).
2021-04-25feat: expand tilde notation in configuration fileLars Wirzenius1-8/+29
Backup roots and log file can now say ~/foo/bar to refer to files relative to the user's home directory.
2021-04-21feat: add support for CACHEDIR.TAGAlexander Batischev3-13/+93
Fixes #78.
2021-04-10refactor: main function for clarityLars Wirzenius1-13/+14
2021-04-10refactor: have ClientConfigWithoutPasswords know its filenameLars Wirzenius3-9/+5
This allows Init::run to not need to be given it as an argument.
2021-04-10refactor: struct ShowConfig subcommandLars Wirzenius3-11/+15
2021-04-10refactor: struct GetChunk subcommandLars Wirzenius3-17/+22
2021-04-10refactor: struct Restore subcommandLars Wirzenius3-35/+46
2021-04-10refactor: struct ListFiles subcommandLars Wirzenius3-19/+24
2021-04-10refactor: struct ShowGeneration subcommandLars Wirzenius3-29/+34
2021-04-10refactor: struct List subcommandLars Wirzenius3-13/+18
2021-04-10refactor: struct Backup subcommandLars Wirzenius3-19/+24
2021-04-10refactor: struct Init subcommandLars Wirzenius3-34/+33
2021-04-10refactor: move ClientConfig into its own moduleLars Wirzenius14-131/+140
2021-04-09refactor: move function to better placeLars Wirzenius1-13/+13
2021-04-09feat: add "obnam init" subcommandLars Wirzenius10-32/+215
This reads a passphrase and derives two passwords from that, and stores them next to the configuration file. The passwords aren't yet used for anything, that will come later.
2021-04-06refactor: clean up initial and incremental backup code paths a bitLars Wirzenius1-14/+16
2021-04-06fix: finish off and clear the incremental backup progress barLars Wirzenius1-0/+1
2021-04-06chore: clean up unnecessary use of ? based on clippy reportsLars Wirzenius1-6/+6
2021-03-27refactor: don't return Result if main can't failLars Wirzenius1-3/+1
2021-03-27refactor: rename BackupPoliy::new() to more idiomatic ::default()Lars Wirzenius2-2/+2
2021-03-27refactor: use idiomatic .is_empty() instead of comparing lengthLars Wirzenius1-1/+1
2021-03-27refactor: use .cloned() to clone items in an iteratorLars Wirzenius2-2/+2
2021-03-27refactor: drop unnecessary clonesLars Wirzenius2-3/+3
2021-03-27refactor: drop unused lifetime annotationLars Wirzenius1-1/+1
2021-03-27refactor: return assigned value directlyLars Wirzenius1-2/+1
2021-03-27refactor: drop unnecessary conversions to the same typeLars Wirzenius5-12/+12
2021-03-27refactor: use Option::or_else to avoid unnecessary allocationLars Wirzenius1-1/+4
2021-03-27refactor: use matches! for clarityLars Wirzenius1-4/+1
2021-03-27refactor: rename ChunkId::from_str to ChunkId::recreateLars Wirzenius4-6/+7
Less confusion with FromStr::from_str this way.
2021-03-27refactor: don't return a Result from function that can't failLars Wirzenius1-7/+17
2021-03-27refactor: drop unnecessary cloneLars Wirzenius1-1/+1
2021-03-27refactor: drop unnecessary referenceLars Wirzenius1-1/+1
2021-03-27refactor: avoid confusing function name from_strLars Wirzenius2-2/+2
2021-03-24refactor: switch from dirs crate to directories-nextLars Wirzenius1-5/+8
It's a higher-level library and a little nicer to use.