Skip to content

Add SudoPassCmd configuration for more convenience#112

Merged
MaxG87 merged 16 commits into
mainfrom
copilot/add-configuration-better-backup
May 16, 2026
Merged

Add SudoPassCmd configuration for more convenience#112
MaxG87 merged 16 commits into
mainfrom
copilot/add-configuration-better-backup

Conversation

@MaxG87
Copy link
Copy Markdown
Owner

@MaxG87 MaxG87 commented May 15, 2026

No description provided.

@MaxG87 MaxG87 force-pushed the copilot/add-configuration-better-backup branch 7 times, most recently from 7053958 to bed6d03 Compare May 16, 2026 10:24
Copilot finished work on behalf of MaxG87 May 16, 2026 11:20
@MaxG87 MaxG87 force-pushed the copilot/add-configuration-better-backup branch from b2f863d to 6ce76a6 Compare May 16, 2026 11:44
Copilot AI and others added 2 commits May 16, 2026 13:45
Rename the existing `Configuration` union type alias to `DeviceConfiguration`
and introduce a new `Configuration` BaseModel that wraps the list of device
configurations under a `deviceConfigurations` field.

For TOML, the parent section is now `butter-backup` with the array of device
entries under `device-configurations`:

    [[butter-backup.device-configurations]]
    Name = "..."

For JSON/JSON5/YAML the wrapper key is `deviceConfigurations`:

    { "deviceConfigurations": [...] }

Update all callers, tests, and example config files accordingly.

Agent-Logs-Url: https://github.com/MaxG87/ButterBackup/sessions/8df34a6f-2b3a-4151-8bd2-1d7d91224187

Co-authored-by: MaxG87 <5477952+MaxG87@users.noreply.github.com>
Add an optional `SudoPassCmd: str | None = None` field to the `Configuration`
model. When set, it holds a shell command whose stdout is a sudo password that
can be used to refresh the sudo credential cache.

Agent-Logs-Url: https://github.com/MaxG87/ButterBackup/sessions/8df34a6f-2b3a-4151-8bd2-1d7d91224187

Co-authored-by: MaxG87 <5477952+MaxG87@users.noreply.github.com>
@MaxG87 MaxG87 force-pushed the copilot/add-configuration-better-backup branch from 6ce76a6 to 4dec085 Compare May 16, 2026 11:46
Copilot AI and others added 5 commits May 16, 2026 13:50
When `SudoPassCmd` is set in the configuration, run
`SudoPassCmd | sudo -Sv` to refresh the sudo credential cache:
- before device decryption in the `open` command
- before device decryption in the `backup` command
- before unmounting in the `close` command

This prevents interactive password prompts during long backup sessions.

Agent-Logs-Url: https://github.com/MaxG87/ButterBackup/sessions/8df34a6f-2b3a-4151-8bd2-1d7d91224187

Co-authored-by: MaxG87 <5477952+MaxG87@users.noreply.github.com>
@MaxG87 MaxG87 force-pushed the copilot/add-configuration-better-backup branch from 4dec085 to 5e475e8 Compare May 16, 2026 11:51
@MaxG87 MaxG87 force-pushed the copilot/add-configuration-better-backup branch from 5e475e8 to 15033b1 Compare May 16, 2026 13:21
@MaxG87 MaxG87 merged commit 0bf8423 into main May 16, 2026
10 checks passed
@MaxG87 MaxG87 deleted the copilot/add-configuration-better-backup branch May 17, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants