Borgmatic prefixes --stats output with repository label #996

Closed
opened 2025-02-12 15:53:14 +00:00 by vitoyucepi · 3 comments

What I'm trying to do and why

The borgmatic create --stats command prints stats with a repository prefix when I configure `postgresql_databases'.

Steps to reproduce

  1. compose.yaml
    services:
      borgmatic:
        image: "ghcr.io/borgmatic-collective/borgmatic"
        container_name: borgmatic
        volumes:
          - ./borgmatic:/etc/borgmatic.d
        environment:
          BORG_PASSPHRASE: test
      db:
        image: "postgres:alpine"
        environment:
          POSTGRES_USER: test
          POSTGRES_PASSWORD: test
    
  2. borgmatic/test1.yaml
    repositories:
      - path: /tmp/test1
        label: test1
    
    source_directories:
      - /etc/passwd
    
  3. borgmatic/test2.yaml
    repositories:
      - path: /tmp/test2
        label: test2
    
    source_directories:
      - /etc/passwd
    
    postgresql_databases:
      - name: test
        hostname: db
        port: 5432
        username: test
        password: test
    
  4. docker compose up
  5. docker exec -it borgmatic borgmatic -nc init -e repokey-blake2
  6. docker exec -it borgmatic borgmatic -nc create --stats

Actual behavior

borgmatic -nc create --stats output
------------------------------------------------------------------------------
Repository: /tmp/test1
Archive name: dca0390a4c2f-2025-02-12T15:48:38.071530
Archive fingerprint: 35c3b7215cefad1ac312a96e59e941c29dd919ff53a5d5116dc837c7c0b729a2
Time (start): Wed, 2025-02-12 15:48:38
Time (end):   Wed, 2025-02-12 15:48:38
Duration: 0.03 seconds
Number of files: 4
Utilization of max. archive size: 0%
------------------------------------------------------------------------------
                       Original size      Compressed size    Deduplicated size
This archive:                1.84 kB              1.62 kB                611 B
All archives:                2.41 kB              2.02 kB              3.21 kB
                       Unique chunks         Total chunks
Chunk index:                       8                   12
------------------------------------------------------------------------------
test2: Ignoring configured "read_special" value of false, as true is needed for database hooks.
test2: ------------------------------------------------------------------------------
test2: Repository: /tmp/test2
test2: Archive name: dca0390a4c2f-2025-02-12T15:48:39.034004
test2: Archive fingerprint: b6b3ae50e4d03ceb17ed5f6b5875690fe28caa810978c90dfa03db984d24f336
test2: Time (start): Wed, 2025-02-12 15:48:39
test2: Time (end):   Wed, 2025-02-12 15:48:39
test2: Duration: 0.11 seconds
test2: Number of files: 5
test2: Utilization of max. archive size: 0%
test2: ------------------------------------------------------------------------------
test2:                        Original size      Compressed size    Deduplicated size
test2: This archive:                2.68 kB              2.16 kB              1.15 kB
test2: All archives:                4.05 kB              3.08 kB              4.57 kB
test2:                        Unique chunks         Total chunks
test2: Chunk index:                      10                   14
test2: ------------------------------------------------------------------------------

Debug log
No commands to run for pre-everything hook
No commands to run for pre-everything hook
/etc/borgmatic.d/test1.yaml: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg --version --debug --show-rc
/etc/borgmatic.d/test1.yaml: Borg 1.4.0
test1: Running actions for repository
test1: No commands to run for pre-actions hook
test1: No commands to run for pre-backup hook
test1: Creating archive
test1: Using runtime directory /tmp/borgmatic-73vxzzl3/borgmatic
test1: Calling bootstrap hook function remove_data_source_dumps
test1: Looking for bootstrap manifest files to remove in /tmp/borgmatic-*/borgmatic/bootstrap
test1: Calling btrfs hook function remove_data_source_dumps
test1: Calling lvm hook function remove_data_source_dumps
test1: Calling mariadb hook function remove_data_source_dumps
test1: Removing MariaDB data source dumps
test1: Calling mongodb hook function remove_data_source_dumps
test1: Removing MongoDB data source dumps
test1: Calling mysql hook function remove_data_source_dumps
test1: Removing MySQL data source dumps
test1: Calling postgresql hook function remove_data_source_dumps
test1: Removing PostgreSQL data source dumps
test1: Calling sqlite hook function remove_data_source_dumps
test1: Removing SQLite data source dumps
test1: Calling zfs hook function remove_data_source_dumps
test1: Calling bootstrap hook function dump_data_sources
test1: Writing patterns to /tmp/borgmatic-73vxzzl3/borgmatic/tmp9ixeurr7:
R /etc/passwd
R /etc/borgmatic.d/test1.yaml
R /etc/borgmatic.d/test2.yaml
R /tmp/borgmatic-73vxzzl3/./borgmatic/bootstrap
test1: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg create --patterns-from /tmp/borgmatic-73vxzzl3/borgmatic/tmp9ixeurr7 --stats --debug --show-rc /tmp/test1::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}
using builtin fallback logging configuration
33 self tests completed in 0.12 seconds
Verified integrity of /tmp/test1/index.1
TAM-verified manifest
security: read previous location '/tmp/test1'
security: read manifest timestamp '2025-02-12T15:44:27.887948'
security: determined newest manifest timestamp as 2025-02-12T15:44:27.887948
security: repository checks ok, allowing access
Creating archive at "/tmp/test1::dca0390a4c2f-2025-02-12T15:44:33.740392"
Verified integrity of /root/.cache/borg/629979556d2ede7e04c44e720f9949be85c132c0c3f484bb2485817dbddc8d63/chunks
Reading files cache ...
security: read previous location '/tmp/test1'
security: read manifest timestamp '2025-02-12T15:44:27.887948'
security: determined newest manifest timestamp as 2025-02-12T15:44:27.887948
security: repository checks ok, allowing access
Processing files ...
Cleaned up 0 uncommitted segment files (== everything after segment 1).
Verified integrity of /tmp/test1/hints.1
check_free_space: few segments, not requiring a full free segment
check_free_space: calculated working space for compact as 24 bytes
check_free_space: required bytes 169232, free bytes 88907472896
security: saving state for 629979556d2ede7e04c44e720f9949be85c132c0c3f484bb2485817dbddc8d63 to /root/.config/borg/security/629979556d2ede7e04c44e720f9949be85c132c0c3f484bb2485817dbddc8d63
security: current location   /tmp/test1
security: key type           5
security: manifest timestamp 2025-02-12T15:44:33.989652
Verified integrity of /tmp/test1/index.5
Archive authentication DISABLED.
TAM-verified archive
------------------------------------------------------------------------------
Repository: /tmp/test1
Archive name: dca0390a4c2f-2025-02-12T15:44:33.740392
Archive fingerprint: 086f13149bf2e0742b533a3ccd3deaa21beb95dd684a3117cfc1d4afd56ad56a
Time (start): Wed, 2025-02-12 15:44:33
Time (end):   Wed, 2025-02-12 15:44:33
Duration: 0.04 seconds
Number of files: 4
Utilization of max. archive size: 0%
------------------------------------------------------------------------------
                       Original size      Compressed size    Deduplicated size
This archive:                1.86 kB              1.64 kB              1.64 kB
All archives:                1.21 kB              1.01 kB              2.12 kB
                       Unique chunks         Total chunks
Chunk index:                       6                    6
------------------------------------------------------------------------------
terminating with success status, rc 0
test1: Calling bootstrap hook function remove_data_source_dumps
test1: Looking for bootstrap manifest files to remove in /tmp/borgmatic-*/borgmatic/bootstrap
test1: Removing bootstrap manifest at /tmp/borgmatic-73vxzzl3/borgmatic/bootstrap/manifest.json
test1: Calling btrfs hook function remove_data_source_dumps
test1: Calling lvm hook function remove_data_source_dumps
test1: Calling mariadb hook function remove_data_source_dumps
test1: Removing MariaDB data source dumps
test1: Calling mongodb hook function remove_data_source_dumps
test1: Removing MongoDB data source dumps
test1: Calling mysql hook function remove_data_source_dumps
test1: Removing MySQL data source dumps
test1: Calling postgresql hook function remove_data_source_dumps
test1: Removing PostgreSQL data source dumps
test1: Calling sqlite hook function remove_data_source_dumps
test1: Removing SQLite data source dumps
test1: Calling zfs hook function remove_data_source_dumps
test1: No commands to run for post-backup hook
test1: No commands to run for post-actions hook
/etc/borgmatic.d/test2.yaml: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg --version --debug --show-rc
/etc/borgmatic.d/test2.yaml: Borg 1.4.0
test2: Running actions for repository
test2: No commands to run for pre-actions hook
test2: No commands to run for pre-backup hook
test2: Creating archive
test2: Using runtime directory /tmp/borgmatic-t2l1kkpm/borgmatic
test2: Calling bootstrap hook function remove_data_source_dumps
test2: Looking for bootstrap manifest files to remove in /tmp/borgmatic-*/borgmatic/bootstrap
test2: Calling btrfs hook function remove_data_source_dumps
test2: Calling lvm hook function remove_data_source_dumps
test2: Calling mariadb hook function remove_data_source_dumps
test2: Removing MariaDB data source dumps
test2: Calling mongodb hook function remove_data_source_dumps
test2: Removing MongoDB data source dumps
test2: Calling mysql hook function remove_data_source_dumps
test2: Removing MySQL data source dumps
test2: Calling postgresql hook function remove_data_source_dumps
test2: Removing PostgreSQL data source dumps
test2: Calling sqlite hook function remove_data_source_dumps
test2: Removing SQLite data source dumps
test2: Calling zfs hook function remove_data_source_dumps
test2: Calling bootstrap hook function dump_data_sources
test2: Calling postgresql hook function dump_data_sources
test2: Dumping PostgreSQL databases
test2: Dumping PostgreSQL database "test" to /tmp/borgmatic-t2l1kkpm/./borgmatic/postgresql_databases/db:5432/test
test2: PGPASSWORD=*** pg_dump --no-password --clean --if-exists --host db --port 5432 --username test --format custom test > /tmp/borgmatic-t2l1kkpm/./borgmatic/postgresql_databases/db:5432/test
test2: Writing patterns to /tmp/borgmatic-t2l1kkpm/borgmatic/tmp9tbezxeb:
R /etc/passwd
R /etc/borgmatic.d/test1.yaml
R /etc/borgmatic.d/test2.yaml
R /tmp/borgmatic-t2l1kkpm/./borgmatic/bootstrap
R /tmp/borgmatic-t2l1kkpm/./borgmatic/postgresql_databases
test2: Ignoring configured "read_special" value of false, as true is needed for database hooks.
test2: Collecting special file paths
test2: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg create --patterns-from /tmp/borgmatic-t2l1kkpm/borgmatic/tmp9tbezxeb --read-special /tmp/test2::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} --dry-run --list
test2: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg create --patterns-from /tmp/borgmatic-t2l1kkpm/borgmatic/tmp9tbezxeb --read-special --stats --debug --show-rc /tmp/test2::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}
test2: using builtin fallback logging configuration
test2: 33 self tests completed in 0.12 seconds
test2: Verified integrity of /tmp/test2/index.1
test2: TAM-verified manifest
test2: security: read previous location '/tmp/test2'
test2: security: read manifest timestamp '2025-02-12T15:44:28.880912'
test2: security: determined newest manifest timestamp as 2025-02-12T15:44:28.880912
test2: security: repository checks ok, allowing access
test2: Creating archive at "/tmp/test2::dca0390a4c2f-2025-02-12T15:44:34.709687"
test2: Verified integrity of /root/.cache/borg/4ccd158f171ebecd3b340569df21a0cf2208f7ee2265324dbe27f8cdabca8d50/chunks
test2: Reading files cache ...
test2: security: read previous location '/tmp/test2'
test2: security: read manifest timestamp '2025-02-12T15:44:28.880912'
test2: security: determined newest manifest timestamp as 2025-02-12T15:44:28.880912
test2: security: repository checks ok, allowing access
test2: Processing files ...
test2: Cleaned up 0 uncommitted segment files (== everything after segment 1).
test2: Verified integrity of /tmp/test2/hints.1
test2: check_free_space: few segments, not requiring a full free segment
test2: check_free_space: calculated working space for compact as 24 bytes
test2: check_free_space: required bytes 169232, free bytes 88907444224
test2: security: saving state for 4ccd158f171ebecd3b340569df21a0cf2208f7ee2265324dbe27f8cdabca8d50 to /root/.config/borg/security/4ccd158f171ebecd3b340569df21a0cf2208f7ee2265324dbe27f8cdabca8d50
test2: security: current location   /tmp/test2
test2: security: key type           5
test2: security: manifest timestamp 2025-02-12T15:44:35.028937
test2: Verified integrity of /tmp/test2/index.5
test2: Archive authentication DISABLED.
test2: TAM-verified archive
test2: ------------------------------------------------------------------------------
test2: Repository: /tmp/test2
test2: Archive name: dca0390a4c2f-2025-02-12T15:44:34.709687
test2: Archive fingerprint: 5ec18a3ec3884265e3bc945b720958bb4526c2c1715748ba35020de6c8cbe0a9
test2: Time (start): Wed, 2025-02-12 15:44:34
test2: Time (end):   Wed, 2025-02-12 15:44:35
test2: Duration: 0.12 seconds
test2: Number of files: 5
test2: Utilization of max. archive size: 0%
test2: ------------------------------------------------------------------------------
test2:                        Original size      Compressed size    Deduplicated size
test2: This archive:                2.70 kB              2.18 kB              2.18 kB
test2: All archives:                2.02 kB              1.54 kB              2.80 kB
test2:                        Unique chunks         Total chunks
test2: Chunk index:                       7                    7
test2: ------------------------------------------------------------------------------
test2: terminating with success status, rc 0
test2: Calling bootstrap hook function remove_data_source_dumps
test2: Looking for bootstrap manifest files to remove in /tmp/borgmatic-*/borgmatic/bootstrap
test2: Removing bootstrap manifest at /tmp/borgmatic-t2l1kkpm/borgmatic/bootstrap/manifest.json
test2: Calling btrfs hook function remove_data_source_dumps
test2: Calling lvm hook function remove_data_source_dumps
test2: Calling mariadb hook function remove_data_source_dumps
test2: Removing MariaDB data source dumps
test2: Calling mongodb hook function remove_data_source_dumps
test2: Removing MongoDB data source dumps
test2: Calling mysql hook function remove_data_source_dumps
test2: Removing MySQL data source dumps
test2: Calling postgresql hook function remove_data_source_dumps
test2: Removing PostgreSQL data source dumps
test2: Calling sqlite hook function remove_data_source_dumps
test2: Removing SQLite data source dumps
test2: Calling zfs hook function remove_data_source_dumps
test2: No commands to run for post-backup hook
test2: No commands to run for post-actions hook
No commands to run for post-everything hook
No commands to run for post-everything hook

summary:
/etc/borgmatic.d/test1.yaml: Loading configuration file
/etc/borgmatic.d/test2.yaml: Loading configuration file
Successfully ran configuration file
Successfully ran configuration file

Expected behavior

Borgmatic should print all stats either with or without a prefix.

Other notes / implementation ideas

Offtopic about gitea instance

I've noticed that this gitea instance is down from time to time.
I could offer some help with server maintenance.

borgmatic version

1.9.9

borgmatic installation method

container image from ghcr.io/borgmatic-collective/borgmatic

Borg version

1.4.0

Python version

3.12.9

Database version (if applicable)

17.2

Operating system and version

alpine:3.21

### What I'm trying to do and why The `borgmatic create --stats` command prints stats with a repository prefix when I configure `postgresql_databases'. ### Steps to reproduce 1. `compose.yaml` ```yaml services: borgmatic: image: "ghcr.io/borgmatic-collective/borgmatic" container_name: borgmatic volumes: - ./borgmatic:/etc/borgmatic.d environment: BORG_PASSPHRASE: test db: image: "postgres:alpine" environment: POSTGRES_USER: test POSTGRES_PASSWORD: test ``` 1. `borgmatic/test1.yaml` ```yaml repositories: - path: /tmp/test1 label: test1 source_directories: - /etc/passwd ``` 1. `borgmatic/test2.yaml` ```yaml repositories: - path: /tmp/test2 label: test2 source_directories: - /etc/passwd postgresql_databases: - name: test hostname: db port: 5432 username: test password: test ``` 1. `docker compose up` 1. `docker exec -it borgmatic borgmatic -nc init -e repokey-blake2` 1. `docker exec -it borgmatic borgmatic -nc create --stats` ### Actual behavior <details> <summary><code>borgmatic -nc create --stats</code> output</summary> ``` ------------------------------------------------------------------------------ Repository: /tmp/test1 Archive name: dca0390a4c2f-2025-02-12T15:48:38.071530 Archive fingerprint: 35c3b7215cefad1ac312a96e59e941c29dd919ff53a5d5116dc837c7c0b729a2 Time (start): Wed, 2025-02-12 15:48:38 Time (end): Wed, 2025-02-12 15:48:38 Duration: 0.03 seconds Number of files: 4 Utilization of max. archive size: 0% ------------------------------------------------------------------------------ Original size Compressed size Deduplicated size This archive: 1.84 kB 1.62 kB 611 B All archives: 2.41 kB 2.02 kB 3.21 kB Unique chunks Total chunks Chunk index: 8 12 ------------------------------------------------------------------------------ test2: Ignoring configured "read_special" value of false, as true is needed for database hooks. test2: ------------------------------------------------------------------------------ test2: Repository: /tmp/test2 test2: Archive name: dca0390a4c2f-2025-02-12T15:48:39.034004 test2: Archive fingerprint: b6b3ae50e4d03ceb17ed5f6b5875690fe28caa810978c90dfa03db984d24f336 test2: Time (start): Wed, 2025-02-12 15:48:39 test2: Time (end): Wed, 2025-02-12 15:48:39 test2: Duration: 0.11 seconds test2: Number of files: 5 test2: Utilization of max. archive size: 0% test2: ------------------------------------------------------------------------------ test2: Original size Compressed size Deduplicated size test2: This archive: 2.68 kB 2.16 kB 1.15 kB test2: All archives: 4.05 kB 3.08 kB 4.57 kB test2: Unique chunks Total chunks test2: Chunk index: 10 14 test2: ------------------------------------------------------------------------------ ``` </details> <details> <summary>Debug log</summary> ``` No commands to run for pre-everything hook No commands to run for pre-everything hook /etc/borgmatic.d/test1.yaml: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg --version --debug --show-rc /etc/borgmatic.d/test1.yaml: Borg 1.4.0 test1: Running actions for repository test1: No commands to run for pre-actions hook test1: No commands to run for pre-backup hook test1: Creating archive test1: Using runtime directory /tmp/borgmatic-73vxzzl3/borgmatic test1: Calling bootstrap hook function remove_data_source_dumps test1: Looking for bootstrap manifest files to remove in /tmp/borgmatic-*/borgmatic/bootstrap test1: Calling btrfs hook function remove_data_source_dumps test1: Calling lvm hook function remove_data_source_dumps test1: Calling mariadb hook function remove_data_source_dumps test1: Removing MariaDB data source dumps test1: Calling mongodb hook function remove_data_source_dumps test1: Removing MongoDB data source dumps test1: Calling mysql hook function remove_data_source_dumps test1: Removing MySQL data source dumps test1: Calling postgresql hook function remove_data_source_dumps test1: Removing PostgreSQL data source dumps test1: Calling sqlite hook function remove_data_source_dumps test1: Removing SQLite data source dumps test1: Calling zfs hook function remove_data_source_dumps test1: Calling bootstrap hook function dump_data_sources test1: Writing patterns to /tmp/borgmatic-73vxzzl3/borgmatic/tmp9ixeurr7: R /etc/passwd R /etc/borgmatic.d/test1.yaml R /etc/borgmatic.d/test2.yaml R /tmp/borgmatic-73vxzzl3/./borgmatic/bootstrap test1: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg create --patterns-from /tmp/borgmatic-73vxzzl3/borgmatic/tmp9ixeurr7 --stats --debug --show-rc /tmp/test1::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} using builtin fallback logging configuration 33 self tests completed in 0.12 seconds Verified integrity of /tmp/test1/index.1 TAM-verified manifest security: read previous location '/tmp/test1' security: read manifest timestamp '2025-02-12T15:44:27.887948' security: determined newest manifest timestamp as 2025-02-12T15:44:27.887948 security: repository checks ok, allowing access Creating archive at "/tmp/test1::dca0390a4c2f-2025-02-12T15:44:33.740392" Verified integrity of /root/.cache/borg/629979556d2ede7e04c44e720f9949be85c132c0c3f484bb2485817dbddc8d63/chunks Reading files cache ... security: read previous location '/tmp/test1' security: read manifest timestamp '2025-02-12T15:44:27.887948' security: determined newest manifest timestamp as 2025-02-12T15:44:27.887948 security: repository checks ok, allowing access Processing files ... Cleaned up 0 uncommitted segment files (== everything after segment 1). Verified integrity of /tmp/test1/hints.1 check_free_space: few segments, not requiring a full free segment check_free_space: calculated working space for compact as 24 bytes check_free_space: required bytes 169232, free bytes 88907472896 security: saving state for 629979556d2ede7e04c44e720f9949be85c132c0c3f484bb2485817dbddc8d63 to /root/.config/borg/security/629979556d2ede7e04c44e720f9949be85c132c0c3f484bb2485817dbddc8d63 security: current location /tmp/test1 security: key type 5 security: manifest timestamp 2025-02-12T15:44:33.989652 Verified integrity of /tmp/test1/index.5 Archive authentication DISABLED. TAM-verified archive ------------------------------------------------------------------------------ Repository: /tmp/test1 Archive name: dca0390a4c2f-2025-02-12T15:44:33.740392 Archive fingerprint: 086f13149bf2e0742b533a3ccd3deaa21beb95dd684a3117cfc1d4afd56ad56a Time (start): Wed, 2025-02-12 15:44:33 Time (end): Wed, 2025-02-12 15:44:33 Duration: 0.04 seconds Number of files: 4 Utilization of max. archive size: 0% ------------------------------------------------------------------------------ Original size Compressed size Deduplicated size This archive: 1.86 kB 1.64 kB 1.64 kB All archives: 1.21 kB 1.01 kB 2.12 kB Unique chunks Total chunks Chunk index: 6 6 ------------------------------------------------------------------------------ terminating with success status, rc 0 test1: Calling bootstrap hook function remove_data_source_dumps test1: Looking for bootstrap manifest files to remove in /tmp/borgmatic-*/borgmatic/bootstrap test1: Removing bootstrap manifest at /tmp/borgmatic-73vxzzl3/borgmatic/bootstrap/manifest.json test1: Calling btrfs hook function remove_data_source_dumps test1: Calling lvm hook function remove_data_source_dumps test1: Calling mariadb hook function remove_data_source_dumps test1: Removing MariaDB data source dumps test1: Calling mongodb hook function remove_data_source_dumps test1: Removing MongoDB data source dumps test1: Calling mysql hook function remove_data_source_dumps test1: Removing MySQL data source dumps test1: Calling postgresql hook function remove_data_source_dumps test1: Removing PostgreSQL data source dumps test1: Calling sqlite hook function remove_data_source_dumps test1: Removing SQLite data source dumps test1: Calling zfs hook function remove_data_source_dumps test1: No commands to run for post-backup hook test1: No commands to run for post-actions hook /etc/borgmatic.d/test2.yaml: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg --version --debug --show-rc /etc/borgmatic.d/test2.yaml: Borg 1.4.0 test2: Running actions for repository test2: No commands to run for pre-actions hook test2: No commands to run for pre-backup hook test2: Creating archive test2: Using runtime directory /tmp/borgmatic-t2l1kkpm/borgmatic test2: Calling bootstrap hook function remove_data_source_dumps test2: Looking for bootstrap manifest files to remove in /tmp/borgmatic-*/borgmatic/bootstrap test2: Calling btrfs hook function remove_data_source_dumps test2: Calling lvm hook function remove_data_source_dumps test2: Calling mariadb hook function remove_data_source_dumps test2: Removing MariaDB data source dumps test2: Calling mongodb hook function remove_data_source_dumps test2: Removing MongoDB data source dumps test2: Calling mysql hook function remove_data_source_dumps test2: Removing MySQL data source dumps test2: Calling postgresql hook function remove_data_source_dumps test2: Removing PostgreSQL data source dumps test2: Calling sqlite hook function remove_data_source_dumps test2: Removing SQLite data source dumps test2: Calling zfs hook function remove_data_source_dumps test2: Calling bootstrap hook function dump_data_sources test2: Calling postgresql hook function dump_data_sources test2: Dumping PostgreSQL databases test2: Dumping PostgreSQL database "test" to /tmp/borgmatic-t2l1kkpm/./borgmatic/postgresql_databases/db:5432/test test2: PGPASSWORD=*** pg_dump --no-password --clean --if-exists --host db --port 5432 --username test --format custom test > /tmp/borgmatic-t2l1kkpm/./borgmatic/postgresql_databases/db:5432/test test2: Writing patterns to /tmp/borgmatic-t2l1kkpm/borgmatic/tmp9tbezxeb: R /etc/passwd R /etc/borgmatic.d/test1.yaml R /etc/borgmatic.d/test2.yaml R /tmp/borgmatic-t2l1kkpm/./borgmatic/bootstrap R /tmp/borgmatic-t2l1kkpm/./borgmatic/postgresql_databases test2: Ignoring configured "read_special" value of false, as true is needed for database hooks. test2: Collecting special file paths test2: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg create --patterns-from /tmp/borgmatic-t2l1kkpm/borgmatic/tmp9tbezxeb --read-special /tmp/test2::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} --dry-run --list test2: BORG_RELOCATED_REPO_ACCESS_IS_OK=*** BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=*** BORG_EXIT_CODES=*** borg create --patterns-from /tmp/borgmatic-t2l1kkpm/borgmatic/tmp9tbezxeb --read-special --stats --debug --show-rc /tmp/test2::{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f} test2: using builtin fallback logging configuration test2: 33 self tests completed in 0.12 seconds test2: Verified integrity of /tmp/test2/index.1 test2: TAM-verified manifest test2: security: read previous location '/tmp/test2' test2: security: read manifest timestamp '2025-02-12T15:44:28.880912' test2: security: determined newest manifest timestamp as 2025-02-12T15:44:28.880912 test2: security: repository checks ok, allowing access test2: Creating archive at "/tmp/test2::dca0390a4c2f-2025-02-12T15:44:34.709687" test2: Verified integrity of /root/.cache/borg/4ccd158f171ebecd3b340569df21a0cf2208f7ee2265324dbe27f8cdabca8d50/chunks test2: Reading files cache ... test2: security: read previous location '/tmp/test2' test2: security: read manifest timestamp '2025-02-12T15:44:28.880912' test2: security: determined newest manifest timestamp as 2025-02-12T15:44:28.880912 test2: security: repository checks ok, allowing access test2: Processing files ... test2: Cleaned up 0 uncommitted segment files (== everything after segment 1). test2: Verified integrity of /tmp/test2/hints.1 test2: check_free_space: few segments, not requiring a full free segment test2: check_free_space: calculated working space for compact as 24 bytes test2: check_free_space: required bytes 169232, free bytes 88907444224 test2: security: saving state for 4ccd158f171ebecd3b340569df21a0cf2208f7ee2265324dbe27f8cdabca8d50 to /root/.config/borg/security/4ccd158f171ebecd3b340569df21a0cf2208f7ee2265324dbe27f8cdabca8d50 test2: security: current location /tmp/test2 test2: security: key type 5 test2: security: manifest timestamp 2025-02-12T15:44:35.028937 test2: Verified integrity of /tmp/test2/index.5 test2: Archive authentication DISABLED. test2: TAM-verified archive test2: ------------------------------------------------------------------------------ test2: Repository: /tmp/test2 test2: Archive name: dca0390a4c2f-2025-02-12T15:44:34.709687 test2: Archive fingerprint: 5ec18a3ec3884265e3bc945b720958bb4526c2c1715748ba35020de6c8cbe0a9 test2: Time (start): Wed, 2025-02-12 15:44:34 test2: Time (end): Wed, 2025-02-12 15:44:35 test2: Duration: 0.12 seconds test2: Number of files: 5 test2: Utilization of max. archive size: 0% test2: ------------------------------------------------------------------------------ test2: Original size Compressed size Deduplicated size test2: This archive: 2.70 kB 2.18 kB 2.18 kB test2: All archives: 2.02 kB 1.54 kB 2.80 kB test2: Unique chunks Total chunks test2: Chunk index: 7 7 test2: ------------------------------------------------------------------------------ test2: terminating with success status, rc 0 test2: Calling bootstrap hook function remove_data_source_dumps test2: Looking for bootstrap manifest files to remove in /tmp/borgmatic-*/borgmatic/bootstrap test2: Removing bootstrap manifest at /tmp/borgmatic-t2l1kkpm/borgmatic/bootstrap/manifest.json test2: Calling btrfs hook function remove_data_source_dumps test2: Calling lvm hook function remove_data_source_dumps test2: Calling mariadb hook function remove_data_source_dumps test2: Removing MariaDB data source dumps test2: Calling mongodb hook function remove_data_source_dumps test2: Removing MongoDB data source dumps test2: Calling mysql hook function remove_data_source_dumps test2: Removing MySQL data source dumps test2: Calling postgresql hook function remove_data_source_dumps test2: Removing PostgreSQL data source dumps test2: Calling sqlite hook function remove_data_source_dumps test2: Removing SQLite data source dumps test2: Calling zfs hook function remove_data_source_dumps test2: No commands to run for post-backup hook test2: No commands to run for post-actions hook No commands to run for post-everything hook No commands to run for post-everything hook summary: /etc/borgmatic.d/test1.yaml: Loading configuration file /etc/borgmatic.d/test2.yaml: Loading configuration file Successfully ran configuration file Successfully ran configuration file ``` </details> ### Expected behavior Borgmatic should print all stats either with or without a prefix. ### Other notes / implementation ideas <details> <summary>Offtopic about gitea instance</summary> I've noticed that this gitea instance is down from time to time. I could offer some help with server maintenance. </details> ### borgmatic version 1.9.9 ### borgmatic installation method container image from ghcr.io/borgmatic-collective/borgmatic ### Borg version 1.4.0 ### Python version 3.12.9 ### Database version (if applicable) 17.2 ### Operating system and version alpine:3.21
Owner

Thanks for reporting this! I've reproduced the issue with both 1.9.9 and 1.9.10.. It's odd that it only seems to happen when databases are enabled. I think the "correct" behavior would be not to prefix Borg's own output with the repository label prefix; that's intended just for borgmatic's own logs. I'll dig into this when I get a chance.

Thanks for reporting this! I've reproduced the issue with both 1.9.9 and 1.9.10.. It's odd that it only seems to happen when databases are enabled. I think the "correct" behavior would be not to prefix Borg's own output with the repository label prefix; that's intended just for borgmatic's own logs. I'll dig into this when I get a chance.
witten added the
bug
label 2025-02-12 16:51:57 +00:00
Owner

Turns out it was a simple oversight and a simple fix. The code path that executed Borg when no databases were enabled correctly suppressed the repository label log prefix, but the code path that executed Borg with databases enabled left the prefix in place. Now that's been rectified and will be part of the next release. Thanks again!

Turns out it was a simple oversight and a simple fix. The code path that executed Borg when no databases were enabled correctly suppressed the repository label log prefix, but the code path that executed Borg *with* databases enabled left the prefix in place. Now that's been rectified and will be part of the next release. Thanks again!
Owner

Released in borgmatic 1.9.11!

Released in borgmatic 1.9.11!
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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