summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-03-12feat: handle files in directories that can be read but not executedLars Wirzenius2-8/+7
2021-03-12feat: show warnings for any problems backing up filesLars Wirzenius2-15/+44
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.
2021-03-12fix: backup and restore of symlinkLars Wirzenius2-5/+3
2021-03-06perf: report wall clock time for warmup and hot lookupsLars Wirzenius2-0/+12
2021-03-05perf: allow benchmark-indexedstore do lookups by checksumLars Wirzenius1-9/+68
2021-03-05perf: allow benchmark-index to do lookups by checksumLars Wirzenius1-15/+67
2021-03-05fix: generate deterministic chunk ids for benchmarksLars Wirzenius1-1/+1
This allows us to generate the same sequence many times.
2021-03-03refactor: drop unnecessary derives for config structsLars Wirzenius1-2/+2
We never serialize TentativeClientConfig or de-serialize ClientConfig, so those derives are unnecessary.
2021-03-03fix: don't allow unknown fields in configuration filesLars Wirzenius2-0/+2
2021-03-03fix: remove duplicate error message printingLars Wirzenius1-1/+0
2021-03-03refactor: rename Config, ConfigError to show they are for serverLars Wirzenius2-12/+12
2021-03-03feat: in errors about reading a configuration file, include its nameLars Wirzenius2-7/+33
2021-03-03fix: allow generation temporary files to be automatically deletedLars Wirzenius4-97/+53
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.
2021-03-03feat: store user and group who own each fileLars Wirzenius1-0/+30
Actually, these aren't yet actually stored in the backup. That will happen when there's a way to verify file metadata stored in the backup. But this adds the code to look up the data during a backup so that at least that part gets some exercise.
2021-02-23feat: have separate progress bar for each backup phaseLars Wirzenius3-17/+75
2021-02-19feat: backup and restore named pipes (FIFOs)Lars Wirzenius4-1/+25
2021-02-19feat: back up and restore Unix domain socketsLars Wirzenius7-33/+90
2021-02-16refactor: use bytesize::MIB constant for clearer sizeLars Wirzenius2-2/+4
2021-02-16fix: in an incremental backup, update total file count if neededLars Wirzenius1-0/+3
Previously, we were showing "N/M", where N is the number of files found in the current backup run, and M the number of files in the previous backup. I found this confusing if the new run finds more files than were in the previous run. Now we increment M if N goes beyond it.
2021-02-16fix: initial backup progress bar only shows total backup countLars Wirzenius1-1/+1
Previously it showed "N/M", where N was the number of files found in the current backup run, and M was the number of files found in the previous generation. But that made no sense for an initial backup, so now we only show N.
2021-02-16feat: change progress bars to show which kind of backup is happeningLars Wirzenius1-0/+2
2021-02-16fix: drop initial backup progress barLars Wirzenius1-1/+0
It didn't actually show any progress and so was useless.
2021-02-16refactor: split BackupRun into initial, incremental variantsLars Wirzenius2-28/+58
This is clearer, easier to modify than having a flag to indicate which variant we're running.
2021-02-16refactor: split BackupProgress into initial, increemental variantsLars Wirzenius2-2/+21
This makes it possible to later have different progress bars for initial and incremental backup runs. However, for now the bars are identical.
2021-02-16refactor: move server config into src/server.rsLars Wirzenius2-47/+49
2021-02-10fix: don't use the matched! macroLars Wirzenius1-1/+4
Rust compiler gives an error due to it being too new.
2021-02-07feat: if file can't be read, log that, don't end backup in errorLars Wirzenius3-10/+29
Such files won't be restored, as they'd be restored as empty file, and that would be confusing and thus bad.
2021-02-07refactor: rename Reason::Error to Reason::GenerationLookupErrorLars Wirzenius3-5/+8
New name is more precise. The meaning of the enum variant hasn't changed.
2021-02-07feat: add catch-all Reason variant for unknown reasonLars Wirzenius2-2/+5
Just in case the SQLite DB stores a reason this version of Obnam doesn't understand, we handle that now.
2021-02-06feat! back up multiple rootsLars Wirzenius2-28/+52
This changes the client configuration file "root" field (with a single string) to "roots" (a list of strings).
2021-02-06feat: use the chunk size setting from the client configurationLars Wirzenius3-11/+11
Use the chunk_size setting for file data. For the SQLite file, use a hard-coded size instead.
2021-02-06feat: make client config fields be optional, have defaultsLars Wirzenius1-2/+36
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.
2021-02-06feat: method for listing ids of chunks from file dataLars Wirzenius3-1/+44
This will be useful soon, to enable us to check how many chunks from file data there is in the repository, to check that an upcoming chunk size setting works. Also add an API call for returning the ids. Note that all of this is meant for testing only. It may be best to disable it in production builds, eventually.
2021-02-06feat: client verifies server's TLS certificate by defaultLars Wirzenius7-9/+11
Configuration setting can disable it.
2021-02-06feat: client requires an HTTPS URL for serverLars Wirzenius1-1/+12
2021-02-04feat: add obnam config subcommandLars Wirzenius5-3/+18
2021-02-04refactor: have per-module error enumsLars Wirzenius20-157/+364
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.
2021-01-19refactor: use ChunkId directly in errors, instead of StringLars Wirzenius3-9/+10
2021-01-17feat: add a default configuration fileLars Wirzenius2-3/+19
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.
2021-01-16feat: add "obnam show-generation" subcommandLars Wirzenius3-1/+55
2021-01-16feat: backup run now ends with a summaryLars Wirzenius2-3/+11
"obnam backup" now writes a summary like the following at the end: status: OK duration: 24 file-count: 119245 generation-id: ef353c79-a94f-4903-bd80-e741ea454c84 We can add more fields to that later, as needed and requested. This was the data that's easily at hand.
2021-01-10feat! use SQLite db for chunk index on serverLars Wirzenius9-174/+249
This speeds startup a lot. However, the backup repository needs to be re-created from scratch and internal APIs have change in incompatible ways.
2021-01-05refactor: add BackedUpFile to avoid using a tupleLars Wirzenius4-13/+56
The struct is easier to use right.
2021-01-05refactor: move policy on whether to back up a file into a moduleLars Wirzenius9-156/+258
This commit also splits up the src/cmd/backup.rs module into other, smaller, more cohesive modules that are easier to understand and use.
2021-01-04refactor: use fetch_chunk to fetch generationLars Wirzenius2-13/+9
Also, add GenerationChunk::from_data_chunk function.
2021-01-04feat: verify checksum of chunks downloaded from serverLars Wirzenius6-4/+54
2021-01-04refactor: add a type alias for file identifiers in generationsLars Wirzenius1-15/+18
2021-01-04feat! record whether file was backed up and why, in a generationLars Wirzenius6-43/+142
This changes SQL schema.
2021-01-04feat: add an index for chunk ids lookupsLars Wirzenius1-0/+1
2021-01-03feat: load chunk metadata into index at startupLars Wirzenius3-4/+47
This needs to be replace with a database or something, but it'll do for now.