#导出数据库
代码语言:javascript复制mysqldump -u root -p a_qa > a.qa.sql
#导入数据库
代码语言:javascript复制use xxx;
source fff.sql;
[smartctl]
#各种检查方法
代码语言:javascript复制smartctl -t short /dev/sda
smartctl -C -t short /dev/sda
smartctl -i /dev/sda
smartctl -i -d ata /dev/sda
smartctl -H /dev/sda
smartctl -a /dev/sda
smartctl -A /dev/sda
[ansible]
#ansible 基本模块与用法
代码语言:javascript复制ansible test -m command -a 'hostname'
ansible test -m command -a "ls -al /tmp/ansible.cfg"
ansible test -m command -a 'ping'
ansible test -m command -a 'uptime'
ansible test -m copy -a "src=/etc/ansible/ansible.cfg dest=/tmp/ansible.cfg owner=root group=root mode=0644"
ansible test -m copy -a "src=/tmp/rocketzhang_test.sh dest=/tmp/rocketzhang_test.sh owner=root group=root mode=0755"
ansible test -m file -a "path=/tmp/resolv.conf state=absent"
ansible test -m file -a "src=/etc/resolv.conf dest=/tmp/resolv.conf state=link"
ansible test -m ping
ansible test -m shell -a "/tmp/rocketzhang_test.sh"
ansible-doc -l #list module