Avamar a Postgres
Nejake internals avamaru, ktore som vytahal a pozistoval, tentokrat o metadatach ukladanych v postgrese…
- Info o konzistencii dat, jobov a pod, je v avamare v postgrese
- pocuva na porte 5555 a standardne sa k nemu pristupuje uctami admin a viewuser
- Dotazy, ktore sa spustaju pre internu potrebu avamaru (generovanie reportov, cleaning DB a pod.) sú tu – /usr/local/avamar/lib/sql/
Zakladny dokument k strukture tabuliek a hlavne views – Avamar-Reports-Guide.
/usr/bin/postmaster -iD /usr/local/avamar/var/mc/server_data/postgres/data -p 5555
Eliah Kagan
9 Apr 18 at 11:03
/usr/bin/postmaster -iD /usr/local/avamar/var/em/server_data/postgres/data -p 5556
Eliah Kagan
9 Apr 18 at 11:53
/usr/bin/postmaster -iD /usr/local/avamar/var/avi/server_data/postgres/data -p 5558
Eliah Kagan
9 Apr 18 at 11:54
pripojit k avamarovskemu postgresu na cmdline:
psql -U admin mcdb -p 5555 -h localhost
dobo
9 Apr 18 at 12:41
v_dpnsummary = view s vysledkama zaloh klientov
SELECT host, os, pcntcommon, ROUND(totalbytes/1024/1024/1024) as GBS, DATE_TRUNC(‘day’, starttime)
FROM v_dpnsummary
WHERE starttime > ‘2018-03-09’
ORDER BY starttime;
dobo
9 Apr 18 at 12:42
#!/bin/bash
psql -U admin mcdb -p 5555 -h localhost -t -A -F”,” -c “SELECT host, os, pcntcommon, ROUND(totalbytes/1024/1024/1024) as GBS, DATE_TRUNC(‘day’, starttime) FROM v_dpnsummary WHERE starttime > ‘2018-03-10’ ORDER BY starttime” > later_than_2018-03-10.csv
dobo
9 Apr 18 at 13:03
pre tahanie udajov z Postgresu medzi avamarmi je idealne nadefinovat passwordy pre jednotlive sessions z cmdline do separatneho suboru, aby to psql nevyzadoval interaktivne
https://www.postgresql.org/docs/8.4/static/libpq-pgpass.html
dobo
12 Apr 18 at 9:14