## PVC

krsync -avz --progress --stats sapiantools-5c8fbb7c4-qm94b:/mediawiki-rwo/ /home/cristian/Documentos/pvc-cur/wiki/2023-06-29/

krsync -avz --progress --stats /home/cristian/Documentos/pvc-cur/wiki/2023-06-29/ sapiantools-c6dc49b8-4ndgh:/mediawiki-rwo/

## BACKUP DB

mysqldump -h 127.0.100.1 -p -uroot wiki > /home/cristian/Documentos/mysql-cur-backups/wiki/mariadb.default.svc.cluster.local-wiki-2023-06-29.sql

## DATABASE 

kubectl exec --stdin --tty mariadb-primary-0 -- /bin/bash

CREATE DATABASE wiki;

USE wiki;

GRANT ALL PRIVILEGES ON *.* TO 'wiki'@'%' IDENTIFIED BY 'EiN4VeeLi7nua9';

GRANT ALL PRIVILEGES ON wiki TO 'wiki'@'%';

## UPLOAD BACKUP

mysql -p -uwiki -h 127.0.200.1 --one-database wiki < /home/cristian/Documentos/pvc-cur/mariadb.default.svc.cluster.local-wiki-2023-03-23.sql

mysql -p -uwiki -h 127.0.200.1 --one-database wiki < /home/cristian/Documentos/mysql-cur-backups/wiki/mariadb.default.svc.cluster.local-wiki-2023-01-35.sql

## GENERATE SECRETS

kubectl -n wiki create secret generic mediawiki-ldap-settings --from-file=ldap.json

kubectl -n wiki create secret generic mediawiki-local-settings --from-file=LocalSettings.php
