Skip to content

feat: add JSON progress output option - #1751

Merged
aawsome merged 2 commits into
rustic-rs:mainfrom
lookfirst:json-progress-backup
Jun 3, 2026
Merged

aawsome merged 2 commits into
rustic-rs:mainfrom
lookfirst:json-progress-backup

Conversation

@lookfirst

Copy link
Copy Markdown
Contributor

Introduce a global --json-progress option and RUSTIC_JSON_PROGRESS environment variable that selects a machine-readable progress backend for byte-oriented backup progress.

Emit newline-delimited status objects with elapsed time, remaining time, percent complete, total bytes, and completed bytes, then write a final backup summary object after snapshot creation.

Document the new configuration option and update config/show-config snapshots for the added default.

This was AI supervised as I'm not a rust expert. I tested it and it seemed to work well. It aligns this project more closely with restic in terms of functionality. The changes are pretty minimal, but I'll understand if you don't want this PR or if you want me to iterate on it more.

@f18m

f18m commented May 20, 2026

Copy link
Copy Markdown

Just my 2cents: as rustic user I think this feature would be awesome to have and would make it much easier to integrate rustic in scripts and/or orchestrators!!

@aawsome aawsome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @lookfirst!
Looks good, I have only some nitpicks which I think can be improved.

Comment thread src/commands/backup.rs Resolved
Comment thread src/commands/backup.rs Resolved
@aawsome aawsome changed the title feat(progress): add JSON backup progress output feat: add JSON progress output option Jun 2, 2026
Jon Stevens and others added 2 commits June 3, 2026 06:47
Introduce a global --json-progress option and RUSTIC_JSON_PROGRESS environment variable that selects a machine-readable progress backend for byte-oriented backup progress.

Emit newline-delimited status objects with elapsed time, remaining time, percent complete, total bytes, and completed bytes, then write a final backup summary object after snapshot creation.

Document the new configuration option and update config/show-config snapshots for the added default.
@aawsome
aawsome force-pushed the json-progress-backup branch from 1af5d45 to 4585b79 Compare June 3, 2026 04:48

@aawsome aawsome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @lookfirst

@aawsome
aawsome enabled auto-merge June 3, 2026 04:56
@aawsome
aawsome added this pull request to the merge queue Jun 3, 2026
Merged via the queue into rustic-rs:main with commit 62cd42d Jun 3, 2026
30 checks passed
@lookfirst
lookfirst deleted the json-progress-backup branch June 3, 2026 06:22
@lookfirst

Copy link
Copy Markdown
Contributor Author

@aawsome Thank you for your understanding and doing the updates.

pull Bot pushed a commit to Mu-L/rustic that referenced this pull request Jun 3, 2026
## 🤖 New release

* `rustic-rs`: 0.11.2 -> 0.11.3 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.11.3](rustic-rs/rustic@v0.11.2...v0.11.3)
- 2026-06-03

### Added

- Add ls option to backup command
([rustic-rs#1771](rustic-rs#1771))
- add JSON progress output option
([rustic-rs#1751](rustic-rs#1751))
- Add warning about profile-substitute without profiles
([rustic-rs#1743](rustic-rs#1743))
- *(commands)* Add version command
([rustic-rs#1738](rustic-rs#1738))

### Fixed

- Throttle configuration example
([rustic-rs#1766](rustic-rs#1766))
- add required scheme to sftp endpoint
([rustic-rs#1758](rustic-rs#1758))
- use indicatif-log-bridge to avoid breaking progress bar on log
([rustic-rs#1747](rustic-rs#1747))
- respect config-supplied backup(.snapshot).init
([rustic-rs#1742](rustic-rs#1742))

### Other

- dependency updates
([rustic-rs#1772](rustic-rs#1772))
- Add opendal as backup source
([rustic-rs#1769](rustic-rs#1769))
- config/README.md: mention string requirement for [repository.options]
([rustic-rs#1750](rustic-rs#1750))
- Add link/note to opendal's backend documentation
([rustic-rs#1749](rustic-rs#1749))
- add gdrive service example
([rustic-rs#1760](rustic-rs#1760))
- update rustic_core
([rustic-rs#1767](rustic-rs#1767))
- *(deps)* bump thin-vec from 0.2.14 to 0.2.16
([rustic-rs#1732](rustic-rs#1732))
- *(deps)* bump rustls-webpki from 0.103.10 to 0.103.13
([rustic-rs#1745](rustic-rs#1745))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
rustic 0.11.3

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>Hello rusticeans,

we are happy to release rustic 0.11.3! This release adds the possibility to use remote storages supported by openDAL as backup source. Note this is an early implementation and may miss features - feedback is warmly welcome!
Besides this, we have many other improvements and minor bug fixes - many of them come from community contributions - thanks a lot to everybody who contributed!

# Changelog

### Added

- Add opendal as backup source ([#1769](rustic-rs/rustic#1769), [#518](rustic-rs/rustic_core#518))
- Add ls option to backup command ([#1771](rustic-rs/rustic#1771))
- add JSON progress output option ([#1751](rustic-rs/rustic#1751))
- enable pcloud backend feature ([#515](rustic-rs/rustic_core#515))
- Add warning about profile-substitute without profiles ([#1743](rustic-rs/rustic#1743))
- Add version command ([#1738](rustic-rs/rustic#1738))
- scope destination scan to snapshot-relevant paths for restore ([#493](rustic-rs/rustic_core#493))

### Fixed

- Throttle configuration example ([#1766](rustic-rs/rustic#1766))
- add required scheme to sftp endpoint ([#1758](rustic-rs/rustic#1758))
- use indicatif-log-bridge to avoid breaking progress bar on log ([#1747](rustic-rs/rustic#1747))
- respect config-supplied backup(.snapshot).init ([#1742](rustic-rs/rustic#1742))
- local BE - don't leave broken files when writing fails ([#499](rustic-rs/rustic_core#499))
- include repo root in warmup paths ([#509](rustic-rs/rustic_core#509)) ([#510](rustic-rs/rustic_core#510))

### Other

- dependency updates ([#1772](rustic-rs/rustic#1772), [#1767](rustic-rs/rustic#1767), [#507](rustic-rs/rustic_core#507))
- config/README.md: mention string requirement for [repository.options] ([#1750](rustic-rs/rustic#1750))
- Add link/note to opendal's backend documentation ([#1749](rustic-rs/rustic#1749))
- add gdrive service example ([#1760](rustic-rs/rustic#1760))
- Use Smallvec ([#514](rustic-rs/rustic_core#514))
- parallelize blob fetch in dump command ([#501](https://github.com/rustic-rs/rustic_core/pull/501))</pre>
  <p>View the full release notes at <a href="https://github.com/rustic-rs/rustic/releases/tag/v0.11.3">https://github.com/rustic-rs/rustic/releases/tag/v0.11.3</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!10395
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.

3 participants