Goal
- Today I'm going to do more tidying up. In the near future I'm going to need begin work on actual backups, but I'll want the foundation to be strong and clean by then. Also, it's warm and I'm tired.
Plan
Change the client so that the
LocalRepositoryErrorerror type never used except for local repositories, in theobnam/src/bin/cmd/mod.rsmodule.Change the client command line parser to be able to have
IdandLabeltypes by implementing a value parser.Any refactoring or other code tidy up I find that needs doing while browsing the code.
Notes
Looked at making the error type for repository commands more generic. That will require
obnam/src/repo.rs, which is meant to be an interface independent from where the chunk are stored, to not expose errors fromBlobRepository, which is inherently on the local disk. Changing this will require more surgery than I have time or energy for today. It will be part of the greater effort of hiding local vs remote chunk storage. An aspect here is that theBackupRepositorytrait lets the implementer choose the error type, which leads to the fact that the local repository error is used, because for now only local repositories are supported.Actually, why does the server have the
Repotype inobnam-server/src/repo.rsinstead of usingBlobRepositorydirectly? TheRepotype provides a thin wrapper aroundBlobRepository, and I don't think that's worth it. Dropped that.Renamed
MainErrortoObnamError.Added a
Makefiletargetcheck, as an alias toclippy, to match my various other projects.Added a
FromStrimplementation forId, which allows the type to be used directly withclapfor command line arguments. Likewise for chunk labels. This was easier than I thought, I do likeclap.Merged.
Summary
- Did some tidying up that future me will be happy for.
Support?
If you'd like to fund Obnam development, see my funding page. My high level goal is described on the architecture page. What is most important about backup software to you?