diff --git a/sv/cron.txt b/sv/cron.txt new file mode 100644 index 0000000..a24ab04 --- /dev/null +++ b/sv/cron.txt @@ -0,0 +1 @@ +0 21 * * 1-7 /root/svbase diff --git a/sv/restorebase b/sv/restorebase new file mode 100755 index 0000000..88fba5a --- /dev/null +++ b/sv/restorebase @@ -0,0 +1,2 @@ +#!/bin/bash +zcat latest.sql.gz|ssh root@ap22 "mysql -u gsbadm -pgsbadm gsbvisite" diff --git a/sv/svbase b/sv/svbase new file mode 100755 index 0000000..191a54a --- /dev/null +++ b/sv/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