Host:matomat.fritz.box

Aus k4cg.org
Die druckbare Version wird nicht mehr unterstützt und kann Darstellungsfehler aufweisen. Bitte aktualisiere deine Browser-Lesezeichen und verwende stattdessen die Standard-Druckfunktion des Browsers.
Host:matomat.fritz.box
IPv4 192.168.178.27
Network 255.255.255.0
Gateway 192.168.178.1
DNS 192.168.178.1
OS Debian (9.8)
Location K4CG

Users

admin-user:

  • penis
  • gpunktschmitz
  • noqqe

Setup matomat-service

Im Homeverzeichnis des systemusers maas befindet sich der matomat backend Code.

Dort liegt auch die User Datenbank. Details siehe Projekt:Matomat-Service

Setup heiko

Im Homeverzeichnis des systemusers heiko befindet sich der matomat frontend Code.

Details Für Installation/Backup/Upgrade siehe Projekt:Heiko

Backup von Matomat

Backup läuft jede Nacht um 02:00 Uhr und wird auf Host:qnap.intern.k4cg.org gesynct

Es wird unter /share/BACKUP/matomat gespeichert

Backup funktioniert so

RESTIC_PASSWORD=xxx
RESTIC_REPOSITORY=sftp:admin@192.168.178.8:/share/BACKUP/matomat/
0 2 * * * restic backup /home/maas /home/heiko /var/matomat

Restore

# restic snapshots
ID        Date                 Host        Tags        Directory
----------------------------------------------------------------------
54cc2d0c  2019-03-28 13:44:18  matomat                 /home/heiko
                                                       /home/maas
                                                       /var/matomat
71ba2ea6  2019-03-28 14:12:41  matomat                 /home/heiko
                                                       /home/maas
                                                       /var/matomat

Alles aus einer ID restoren:

restic restore 54cc2d0c --target /tmp/foo
restoring <Snapshot 54cc2d0c of [/home/heiko /home/maas /var/matomat] at 2019-03-28 13:44:18.454347385 +0100 CET by root@matomat> to /tmp/foo

Nur ein Spezielles file:

# restic restore 54cc2d0c --target /tmp/foo --include config.yml
# find /tmp/foo/
/tmp/foo/
/tmp/foo/maas
/tmp/foo/maas/config.yml
/tmp/foo/heiko
/tmp/foo/heiko/config.yml
/tmp/foo/heiko/heiko
/tmp/foo/heiko/heiko/config.yml

anderes beispiel

# restic restore --target /tmp/foo latest --include matomat.db
# find /tmp/foo/
/tmp/foo/
/tmp/foo/matomat
/tmp/foo/matomat/matomat.db

Nur 1 Dirrectory von alle inkludierten:

restic restore 54cc2d0c --target /tmp/foo --path /var/matomat