Age | Commit message (Collapse) | Author | Files | Lines |
|
When opening a local generation, check that it's compatible with the
current version of Obnam.
Sponsored-by: author
|
|
Also, make it an error for a public symbol to not be documented.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Previously an error from, say, a missing backup root directory was
reported to the user as a warning. Turn it into an error. However,
errors reading a file or directory inside the backup root should still
be just a warning.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Add a new mandatory database table "meta" to the SQLite database the
stores information about the files in a backup generation. The idea is
for future versions of the Obnam client to be able to be able to
restore from backups made by older -- or newer -- versions of Obnam,
as far as is reasonable.
Add the `obnam gen-info` command to show information about the
generation metadata.
Sponsored-by: author
|
|
It was only used by a test function, which is now changed to not use it.
Add comment to the test function that it's too complicated and things
need refactoring. However, that probably needs to wait for new
abstractions.
Sponsored-by: author
|
|
This makes the code more explicit, which is good for now, and is a
step towards making it all use async. There will be a need to refactor
this further with better abstractions, once async works.
Sponsored-by: author
|
|
This is a step towards getting rid of insert_iter entirely, which
would make it easier to make `obnam backup` use async.
I originally split insert_iter so I could use a single transaction for
inserting many rows, but it seems to not be needed for speed after
all. I've benchmarked backing up a large file with and without this
change, and there's no real difference. I've not benchmarked with a
large number of files.
Even if there's a performance hit from using multiple transactions, my
hope is that by being able to use more CPUs/threads for backing up
will outweigh that by far.
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
|
|
Mostly
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow.
Sponsored-by: author
|
|
In the following commits, we'll use this to check if a tag existed
before.
|
|
I do not plan to simplify the `T` in the return type of
`get_file_and_fileno` because that function is only ever called from
inside the module; it doesn't seem worthwhile to introduce a new type
there.
|
|
|
|
|
|
|
|
This should make it easier to introduce async, later.
|
|
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 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.
|
|
`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).
|
|
|
|
|
|
|
|
|
|
Previously, we either ignored it or aborted the backup. Neither is
good. Now we ignore the problem, except to show a warning at the end
of the backup run.
|
|
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 struct is easier to use right.
|
|
This commit also splits up the src/cmd/backup.rs module into other,
smaller, more cohesive modules that are easier to understand and use.
|
|
|
|
This changes SQL schema.
|
|
|
|
This speeds things up a lot compared to iterating over all files.
|
|
|
|
This keeps all the SQL related functions closer together, making it
easier to make changes to them.
|
|
This uses the previous, latest generation as a guideline to see what
is new or changed.
|
|
This splits the use of NascentGeneration to more cohesive "new
generation being built" versus "existing generation being restored".
|
|
Various part of Obnam will need to deal with lists of generations.
Abstract this.
|
|
This changes the output format of "obnam list".
|
|
|
|
New name is more descriptive.
|
|
This avoids having to add extra columns when we add more metadata
support. This may be worth re-thinking later, once things stabilize.
|
|
|
|
|
|
|
|
The data is stored in an SQLite database file.
|