borgmatic info no longer giving specific archive information #577

Closed
opened 2022-08-31 02:08:37 +00:00 by doy · 3 comments

What I'm trying to do and why

previously, running borgmatic info --archive latest would include information about both the overall repository and also specific statistics about the latest archive, but as of version 1.7.0, borgmatic info and borgmatic info --archive latest produce identical output.

Steps to reproduce (if a bug)

run borgmatic info --archive latest

Actual behavior (if a bug)

$ sudo borgmatic info --archive latest
[redacted]: Displaying archive summary information
Repository ID: e8b8a32c06789183e822824492b0157638b2f6963549cfdab094b3503c899d13
Location: [redacted]
Encrypted: Yes (repokey)
Cache: /root/.cache/borg/e8b8a32c06789183e822824492b0157638b2f6963549cfdab094b3503c899d13
Security dir: /root/.config/borg/security/e8b8a32c06789183e822824492b0157638b2f6963549cfdab094b3503c899d13
------------------------------------------------------------------------------
                       Original size      Compressed size    Deduplicated size
All archives:                4.45 TB              3.87 TB            222.96 GB
                       Unique chunks         Total chunks
Chunk index:                  829636             14654304

Expected behavior (if a bug)

$ sudo borgmatic info --archive latest
[redacted]: Displaying summary info for archives
Archive name: [redacted]-2022-08-30T03:31:05.000968
Archive fingerprint: 4c1ec48827fd4ceace0d40d170f4865d19222799784d32c8ba49b7674b573c55
Comment:
Hostname: [redacted]
Username: root
Time (start): Tue, 2022-08-30 03:31:07
Time (end): Tue, 2022-08-30 06:52:43
Duration: 3 hours 21 minutes 36.87 seconds
Number of files: 645545
Command line: /usr/bin/borg create --exclude-from /tmp/tmpa9zhdtjk --info '[redacted]::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}' /etc /home /root/.borgmatic /usr/local/bin
Utilization of maximum supported archive size: 0%
------------------------------------------------------------------------------
                       Original size      Compressed size    Deduplicated size
This archive:              202.33 GB            174.06 GB              3.69 GB
All archives:                4.45 TB              3.87 TB            222.96 GB
                       Unique chunks         Total chunks
Chunk index:                  829636             14654304

Other notes / implementation ideas

specifically i'm interested in the json formatted data, but it looks like the issue is the same for normal and json output

Environment

borgmatic version: 1.7.0

Use sudo borgmatic --version or sudo pip show borgmatic | grep ^Version

borgmatic installation method: pacman (arch linux)

Borg version: 1.2.2

Use sudo borg --version

Python version: 3.10.6

Use python3 --version

Database version (if applicable): [version here]

Use psql --version or mysql --version on client and server.

operating system and version: arch linux

#### What I'm trying to do and why previously, running `borgmatic info --archive latest` would include information about both the overall repository and also specific statistics about the latest archive, but as of version 1.7.0, `borgmatic info` and `borgmatic info --archive latest` produce identical output. #### Steps to reproduce (if a bug) run `borgmatic info --archive latest` #### Actual behavior (if a bug) ``` $ sudo borgmatic info --archive latest [redacted]: Displaying archive summary information Repository ID: e8b8a32c06789183e822824492b0157638b2f6963549cfdab094b3503c899d13 Location: [redacted] Encrypted: Yes (repokey) Cache: /root/.cache/borg/e8b8a32c06789183e822824492b0157638b2f6963549cfdab094b3503c899d13 Security dir: /root/.config/borg/security/e8b8a32c06789183e822824492b0157638b2f6963549cfdab094b3503c899d13 ------------------------------------------------------------------------------ Original size Compressed size Deduplicated size All archives: 4.45 TB 3.87 TB 222.96 GB Unique chunks Total chunks Chunk index: 829636 14654304 ``` #### Expected behavior (if a bug) ``` $ sudo borgmatic info --archive latest [redacted]: Displaying summary info for archives Archive name: [redacted]-2022-08-30T03:31:05.000968 Archive fingerprint: 4c1ec48827fd4ceace0d40d170f4865d19222799784d32c8ba49b7674b573c55 Comment: Hostname: [redacted] Username: root Time (start): Tue, 2022-08-30 03:31:07 Time (end): Tue, 2022-08-30 06:52:43 Duration: 3 hours 21 minutes 36.87 seconds Number of files: 645545 Command line: /usr/bin/borg create --exclude-from /tmp/tmpa9zhdtjk --info '[redacted]::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}' /etc /home /root/.borgmatic /usr/local/bin Utilization of maximum supported archive size: 0% ------------------------------------------------------------------------------ Original size Compressed size Deduplicated size This archive: 202.33 GB 174.06 GB 3.69 GB All archives: 4.45 TB 3.87 TB 222.96 GB Unique chunks Total chunks Chunk index: 829636 14654304 ``` #### Other notes / implementation ideas specifically i'm interested in the json formatted data, but it looks like the issue is the same for normal and json output #### Environment **borgmatic version:** 1.7.0 Use `sudo borgmatic --version` or `sudo pip show borgmatic | grep ^Version` **borgmatic installation method:** pacman (arch linux) **Borg version:** 1.2.2 Use `sudo borg --version` **Python version:** 3.10.6 Use `python3 --version` **Database version (if applicable):** [version here] Use `psql --version` or `mysql --version` on client and server. **operating system and version:** arch linux
Owner

Yikes, thank you for taking the time to report this! I've reproduced the regression locally. I'm guessing it was introduced in 1.7.0 as part of the changes for Borg 2. I'll look into it.

Yikes, thank you for taking the time to report this! I've reproduced the regression locally. I'm guessing it was introduced in 1.7.0 as part of the changes for Borg 2. I'll look into it.
witten added the
bug
label 2022-08-31 03:31:19 +00:00
Owner

Okay, this is fixed now in master and will be part of the next release! The problem was that borgmatic info was passing the archive flag (or in this case, the --glob-archives flag) to Borg, but only with Borg 2. Now that code path applies to Borg 1 as well.

Thanks again for bringing this to my attention.

Okay, this is fixed now in master and will be part of the next release! The problem was that `borgmatic info` was passing the archive flag (or in this case, the `--glob-archives` flag) to Borg, but only with Borg 2. Now that code path applies to Borg 1 as well. Thanks again for bringing this to my attention.
Owner

Just released in borgmatic 1.7.2!

Just released in borgmatic 1.7.2!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#577
No description provided.