Fichier Bash AP22

This commit is contained in:
Louis Déprés 2022-03-03 11:03:55 +01:00
parent 86bc93a8e4
commit d76c9b8afa
2 changed files with 7 additions and 0 deletions

2
Sio1/AP22/restorebase Executable file
View File

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

5
Sio1/AP22/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