Age | Commit message (Collapse) | Author | Files | Lines |
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Serialized labels now start with a type prefix: a character that says
what type of label it is.
This isn't strictly required: we _can_ just decide to always use a
single type of checksum for all chunks in one backup, for one client,
or in the whole repository. However, if it's ever possible to have
more than one type, it helps debugging if every checksum, when
serialized, is explicit about its type.
Change things to use the new serialize method instead of the Display
trait for Label. We're primarily serializing labels so they can be
stored in a database, and used in URLs, only secondarily showing them
to users.
Sponsored-by: author
|
|
Label is a clearer and more accurate name for the type now that it is
not just a checksum.
Also, serialize a Label in tests, rather than using string literals.
This is more correct, and we'll be changing serialization later.
Sponsored-by: author
|
|
We've had fake checksums that are just arbitrary literal strings, and
this change makes this more explicit. It's a preliminary change for
later support for additional checksum algorithms.
Sponsored-by: author
|
|
What was /chunks is now /v1/chunks. This is the minimal step to start
supporting multiple API versions.
Also, /v1/chunks/foo/bar is no longer supported.
Sponsored-by: author
|
|
Backups made with this version can't be restored with old clients, and
vice version.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
The field still contains a cleartext SHa256 of the cleartext chunk
data, but this makes it clearer that it may contain other data.
This is a breaking change: the server API won't work with an old
client, and the new client won't work with an old server. To avoid the
breakage would require more effort than is warranted at this time,
given the very small number of users of Obnam. Sorry.
Sponsored-by: author
|
|
The split doesn't seem to make sense any more.
Sponsored-by: author
|
|
There is only async.
Sponsored-by: author
|
|
Also, make it an error for a public symbol to not be documented.
Sponsored-by: author
|
|
Move code to read a file as chunks during a backup, and upload any new
chunks to the chunk server, into `src/backup_run.rs`. Previously they
were mostly in `src/client.rs`, which is meant to provide an
abstraction for using the chunk server API.
Sponsored-by: author
|
|
This changes things so that "obnam backup" uses async for everything.
The old non-async BackupClient and ChunkClient are dropped.
This does NOT move the chunking, and checksum computation, to its own
function. This will happen later.
Sponsored-by: author
|
|
This means a ChunkId can't be used instead.
Sponsored-by: author
|
|
This will make it harder to accidentally use a string. Can still be
confused with a chunk id.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
In errors, store chunk ids as `ChunkId`, not `String`
Closes #114
See merge request obnam/obnam!165
|
|
|
|
Fixes #114.
|
|
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.
|
|
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
|
|
This makes the code doing HTTP requests simpler for easier
comprehension and debugging.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
Less confusion with FromStr::from_str this way.
|
|
We never serialize TentativeClientConfig or de-serialize ClientConfig,
so those derives are unnecessary.
|
|
|
|
|
|
|
|
|
|
This changes the client configuration file "root" field (with a single
string) to "roots" (a list of strings).
|
|
We don't want to require the user to have to specify every possible
setting in client configuration files. Having reasonable defaults when
possible is a better way.
|
|
Configuration setting can disable it.
|
|
|
|
|
|
This means that a function that parses step bindings can't return an
error that the document is missing a title. Such an error return would
be nonsensical, and we use the Rust type system to prevent it, at a
small cost of being a bit verbose.
Additional benefit is that the library portion of Obnam doesn't return
anyhow::Result values anymore.
|
|
|
|
The ~/.config/obnam/obnam.yaml file will be used as the configuration
file by default. The ~/.config directory can be overridden by setting
the XDG variable (XDG_CONFIG_HOME), or the whole file can be
overridden with the --config option to obnam.
|
|
This speeds startup a lot. However, the backup repository needs to be
re-created from scratch and internal APIs have change in incompatible
ways.
|