Age | Commit message (Collapse) | Author | Files | Lines |
|
Also, make it an error for a public symbol to not be documented.
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
|
|
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
|
|
For chmod() we need to cast mode parameter from u32 to u16 because
MacOS has 16 bit mode_t while Linux is using 32 bits.
|
|
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
|
|
Mostly
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow.
Sponsored-by: author
|
|
|
|
|
|
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
Sponsored-by: author
|
|
|
|
Create a tokio runtime so that the non-async function for chunkify can
call an async function and have that create and run background tasks.
Brown paper bag mistake: I did the development of this in a separate
program with an async main function. When I integrated it into Obnam
proper, which doesn't have an async main function (yet), I didn't
actually test it works, only that it compiles. Stupid, stupid, stupid.
I know better.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
This should make it easier to introduce async, later.
|
|
Change calls to set_message to pass ownership of the message, rather
than just letting it borrow the message.
Sponsored-by: author
|
|
The weird thing about this commit is that all the tests for it already
exist: the subplot compares manifests of "live" and restored data, and
that includes the mtime. The subplot passes on CI, and it passed for me
too — until today.
Today, if I run `./check` on the main branch (which is currently at
481c5d8df21c72db3a3d76e851d25426f3e40647), subplot fails because the
symlinks' mtime is wrong. Most often it's just the nsec part that's
wrong: tests run fast enough that they finish within a second, and they
rarely happen at the edge of the second.
I don't understand why this didn't happen to me before, and why it
doesn't happen to CI — and to Lars, for that matter. git-bisect points
at 755c18a11f87040245964cf411ea8f518b61e0f5, which is a couple months
old, so we should've spotted the breakage by now.
Needless to say, I didn't do any major overhauls of my system lately,
just your usual `apt upgrade` (Debian bullseye/testing amd64). Did some
change in Subplot or Summain obfuscate this? It bothers me that I don't
understand how we could miss this for so long.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
`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).
|
|
Fixes #78.
|
|
This allows Init::run to not need to be given it as an argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
By not calling NamedTempFile::persist, the files get deleted
automatically when the file is closed or the struct is dropped.
Previously we were deleting the temporary files manually, which meant
that sometimes they weren't deleted if the program crashed at an
unfortunate time.
|
|
|
|
|