脚本更新

This commit is contained in:
hahwu 2026-02-03 11:23:39 +08:00
parent 1e39296d90
commit 306997196c

View File

@ -1,16 +1,16 @@
- name: Deploy GoLeaf release
hosts: test
hosts: new-test
remote_user: root
tasks:
- name: copy db to another remote
synchronize:
src: /data/mysql/db.tar
dest: /data/mysql
dest: /data
mode: push
- name: extract db
shell: tar -xvf /data/mysql/db.tar -C /data/mysql/backup/
shell: tar -xvf /data/mysql/db.tar -C /data/backup/
- name: Import SQL file to MySQL
shell: mysql -h 127.0.0.1 -u root -pZ4rf7eZZe500dxa < /data/mysql/backup/daily.sql
shell: mysql -h 127.0.0.1 -u root -pZ4rf7eZZe500dxa < /data/backup/daily.sql
- name: Import backup.resp to Redis
shell: cat /data/mysql/backup/backup.resp | redis-cli -h 127.0.0.1 -p 6479 --pipe
shell: cat /data/backup/backup.resp | redis-cli -h 127.0.0.1 -p 6479 --pipe