diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-09 11:54:19 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-09 17:17:35 +0300 |
commit | d0b0245edbb2f6ed8285358d83b98f3334bf1b12 (patch) | |
tree | 988f72832b8a5015f4dbfb49473eba022d089666 /src/backup_run.rs | |
parent | 2d6c1c81bfb1c0be8dfaced1c70e825e46c66430 (diff) | |
download | obnam2-d0b0245edbb2f6ed8285358d83b98f3334bf1b12.tar.gz |
feat: add "obnam init" subcommand
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.
Diffstat (limited to 'src/backup_run.rs')
-rw-r--r-- | src/backup_run.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backup_run.rs b/src/backup_run.rs index c5d5382..e9d094d 100644 --- a/src/backup_run.rs +++ b/src/backup_run.rs @@ -40,6 +40,7 @@ pub type BackupResult<T> = Result<T, BackupError>; impl<'a> InitialBackup<'a> { pub fn new(config: &ClientConfig, client: &'a BackupClient) -> BackupResult<Self> { let progress = BackupProgress::initial(); + let config = config.config(); Ok(Self { client, buffer_size: config.chunk_size, @@ -79,6 +80,7 @@ impl<'a> InitialBackup<'a> { impl<'a> IncrementalBackup<'a> { pub fn new(config: &ClientConfig, client: &'a BackupClient) -> BackupResult<Self> { + let config = config.config(); let policy = BackupPolicy::default(); Ok(Self { client, |