2 Commits

Author SHA1 Message Date
3412ef82ae Fichier Goss 2022-03-17 09:32:52 +01:00
00c717686b Serveur Sv 2022-03-10 10:24:27 +01:00
4 changed files with 28 additions and 0 deletions

1
sv/cron.txt Normal file
View File

@ -0,0 +1 @@
0 21 * * 1-7 /root/svbase

20
sv/goss.yaml Normal file
View File

@ -0,0 +1,20 @@
file:
/root/latest.sql.gz:
exists: true
mode: "0644"
owner: root
group: root
filetype: file
command:
crontab -l:
exit-status: 0
stdout:
- 0 21 * * 1-7 /root/svbase
stderr: []
timeout: 10000
ssh ap22 hostname:
exit-status: 0
stdout:
- ap22
stderr: []
timeout: 10000

2
sv/restorebase Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
zcat latest.sql.gz|ssh root@ap22 "mysql -u gsbadm -pgsbadm gsbvisite"

5
sv/svbase Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
DAT=$(date "+%u")
ssh root@ap22 "mysqldump -u gsbadm -pgsbadm gsbvisite | gzip" > gsbvisite-$DAT.sql.gz
cp gsbvisite-$DAT.sql.gz latest.sql.gz