ONTEC Are you ready Uhr

BACULA BACKUP: LIST STORAGE USED BY CLIENT AND POOL

BACULA BACKUP LIST STORAGE USED BY CLIENT AND POOL

Inhaltsverzeichnis

Bacula Backup: List storage used by Client and Pool

Ein SQL Query welches aus der Bacula Mysql DB den Platzverbrauch pro Backup Client listet:

Dieses SQL Query kann in

/etc/bacula/scripts/query.sql

eingefügt werden:

# 25
:List storage used by client and pool
SELECT Client.Name AS Client, Pool.Name as Pool,
sum(Job.JobFiles) as Files, sum(Job.JobBytes) as Bytes
FROM Client, Job, Pool
WHERE Job.ClientID = Client.ClientID and Job.PoolID = Pool.PoolID
GROUP by Pool.Name, Client.ClientID
ORDER by Client.Name, Pool.Name;

Folgender Output entsteht dadurch:

+--------------------------+----------------+-----------+-------------------+
| Client                   | Pool           | Files     | Bytes             |
+--------------------------+----------------+-----------+-------------------+
| Nsatellit-fd             | File           |         0 |                 0 |
| Nsatellit-fd             | daily          |         0 |                 0 |
| Nsatellit-fd             | tape-monthly   |   133,508 |    66,927,276,685 |
| Nsatellit-fd             | tape-yearly    |    53,022 |    19,818,750,039 |
| asterisk-primary-fd      | File           |         0 |                 0 |
| asterisk-primary-fd      | daily          |         0 |                 0 |
| asterisk-primary-fd      | daily-backup01 |        15 |            45,777 |
| asterisk-primary-fd      | tape-monthly   |    13,801 |        16,033,807 |
| asterisk-primary-fd      | tape-weekly    |     6,903 |         8,036,499 |
| asterisk-primary-fd      | tape-yearly    |     2,260 |         2,626,523 |
| asterisk-stby-fd         | File           |         0 |                 0 |
| asterisk-stby-fd         | daily          |         0 |                 0 |
| asterisk-stby-fd         | daily-backup01 |        73 |           943,823 |
| asterisk-stby-fd         | tape-monthly   |    15,169 |        49,796,279 |
| asterisk-stby-fd         | tape-weekly    |     7,587 |        24,940,423 |
| asterisk-stby-fd         | tape-yearly    |     2,479 |         8,187,252 |
| athene-fd                | daily          | 1,741,056 |   296,543,931,113 |
| athene-fd                | monthly        | 1,769,477 |   166,889,715,044 |
| athene-fd                | tape-monthly   | 7,273,334 |   619,423,047,359 |
| athene-fd                | tape-weekly    | 3,650,312 |   338,811,362,698 |
| athene-fd                | tape-yearly    | 1,138,190 |    92,350,892,977 |

Diesen Beitrag teilen

LinkedIn
Reddit
Telegram
WhatsApp
Email
Print
WordPress Cookie Hinweis von Real Cookie Banner