ajout dossier script avec svbase, restorenase et la crontab pour l'executer
This commit is contained in:
parent
ca2db9453f
commit
dbb1228a08
1
ap23/script/cron.txt
Normal file
1
ap23/script/cron.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0 21 * * 1-7 /root/svbase.sh
|
2
ap23/script/restorebase.sh
Executable file
2
ap23/script/restorebase.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
zcat latest.sql.gz | ssh root@ap23 "mysql -u gsbadm -pgsbadm gsbvisite"
|
5
ap23/script/svbase.sh
Executable file
5
ap23/script/svbase.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
DAT=$(date "+%u")
|
||||||
|
|
||||||
|
ssh root@ap23 "mysqldump -u gsbadm -pgsbadm gsbvisite | gzip" > gsbvisite-$DAT.sql.gz
|
||||||
|
cp gsbvisite-$DAT.sql.gz latest.sql.gz
|
Loading…
x
Reference in New Issue
Block a user