ajout script
This commit is contained in:
parent
f1d0ad44fa
commit
80d67a50fb
4
AP31/script_restore.sh
Executable file
4
AP31/script_restore.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# transfert de la base de donnée vers le serveur distant
|
||||
zcat /root/sv/dump.latest.gz|ssh debian@ap31-test "mysql -u Adminer -pAdminer SDIS30"
|
8
AP31/script_sauvegarde.sh
Executable file
8
AP31/script_sauvegarde.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
DAT=$(date "+%u")
|
||||
|
||||
# On compresse la base avec le filtre gzip
|
||||
ssh ap31-test "mysqldump -u Adminer -pAdminer SDIS29|gzip" > /root/sv/SDIS29-dump-$DAT.sql.gz
|
||||
|
||||
# Permet d'obtenir la dernière sauvegarde
|
||||
cp /root/sv/SDIS29-dump-$DAT.sql.gz /root/sv/dump-latest.sql.gz
|
Loading…
x
Reference in New Issue
Block a user