From d76c9b8afaf12bfcaa02a3a05533241bef453dc6 Mon Sep 17 00:00:00 2001 From: Louis Depres Date: Thu, 3 Mar 2022 11:03:55 +0100 Subject: [PATCH] Fichier Bash AP22 --- Sio1/AP22/restorebase | 2 ++ Sio1/AP22/svbase | 5 +++++ 2 files changed, 7 insertions(+) create mode 100755 Sio1/AP22/restorebase create mode 100755 Sio1/AP22/svbase diff --git a/Sio1/AP22/restorebase b/Sio1/AP22/restorebase new file mode 100755 index 0000000..88fba5a --- /dev/null +++ b/Sio1/AP22/restorebase @@ -0,0 +1,2 @@ +#!/bin/bash +zcat latest.sql.gz|ssh root@ap22 "mysql -u gsbadm -pgsbadm gsbvisite" diff --git a/Sio1/AP22/svbase b/Sio1/AP22/svbase new file mode 100755 index 0000000..191a54a --- /dev/null +++ b/Sio1/AP22/svbase @@ -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