摘要:
1.脚本 2.调用 [root@localhost tmp]# python geturl_test.py 20190220 阅读全文
摘要:
1.db_file_name_convert备份保持原来文件名一致 backup as copy db_file_name_convert=('/u01/app/oracle/oradata/slnngk/','/home/oracle/image_copy/') database; 2.list相 阅读全文
摘要:
需求:因为端口调整,需要改变副本的备份集 1.查看当前副本集配置情况 注意这里的_id,代表的是记录的id,而不是members[]对应的索引值,members的索引值是根据显示出来的按照0,1,2这样排序的如上面的输出_id与members索引值的对应关系如下:"_id" : 5 -->membe 阅读全文
摘要:
需求:因为端口调整,需要改变副本的备份集 1.查看当前的副本集信息 我们需要将这里各机器的端口10001,10002,10003分别修改为20001,20002,20003 2.修改从库192.168.1.135:10002为192.168.1.135:200022.1 停掉该从库[root@loc 阅读全文
摘要:
1.采用admin数据库的超级管理员验证./mongo 192.168.1.134:10001use admindb.auth("sa","123456") 2.创建开发用户,登陆相应的数据库创建开发用户repltest:PRIMARY> show databases;admin 0.078GBdb 阅读全文
摘要:
环境:OS:CentOS 7DB:3.0.15机器角色:192.168.1.134:10001 主192.168.1.135:10002 从192.168.1.135:10003 仲裁节点 1.下载相应的版本https://www.mongodb.com/download-center/commun 阅读全文
摘要:
备份还原并启动数据库 1.创建目录,并把下载的压缩文件拷贝到相应的目录[root@localhost opt]# mkdir -p /opt/xbackup_file[root@localhost opt]# cd /soft[root@localhost soft]# cp hins5246445 阅读全文
摘要:
系统重启后,Eleastisearch6.5.0在给 Eleastisearch 更新索引的时候报了一个错误:ClusterBlockException[blocked by: [FORBIDDEN/hxl_test/index read-only / allow delete (api)];] 按 阅读全文
摘要:
[root@localhost tmp]# more wget.sh #!/bin/bash download_url=`python /tmp/geturl.py` echo $download_url download_date=`date "+%Y%m%d%H%M%S"` start_time=`date "+%Y%m%d %H%M%S"` echo 'start_time='${sta... 阅读全文
摘要:
1.输出binlog到文件mysqlbinlog --base64-output=decode-rows -v /home/mysql/binlog/binlog.000011>/tmp/aa.txt 2.查看某个pos后的多少行show binlog events IN 'binlog.00001 阅读全文
摘要:
根据现有ES版本,安装对应版本的插件 [es@hxl ~]$ cd elasticsearch[es@hxl elasticsearch]$ ./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sq 阅读全文
摘要:
1.下载 elastichd下载地址:https://github.com/360EntSecGroup-Skylar/ElasticHD/releases或是直接在linux下下载wget https://github.com/360EntSecGroup-Skylar/ElasticHD/rel 阅读全文
摘要:
#!/bin/bash now_date=`date "+%Y-%m-%d,%H:%M:%S"` flag_old=`cat /home/oracle/scripts/flag.txt|cut -d '|' -f 1` flag_new=`mysql -P3306 -hlocalhost -uroot -ptestpwd -D mysql -e "show slave status\G"... 阅读全文
摘要:
1.停掉从库/opt/mysql57_slave/bin/mysqladmin -h localhost -uroot -P13306 -pmysql -S /opt/mysql57_slave/mysql.sock shutdown 2.主库上创建同步账号 grant replication sl 阅读全文
摘要:
DB:5.6.15 主从库没有采用GTID案例1:从库对象不存在mysql> show slave status \G;*************************** 1. row *************************** Slave_IO_State: Waiting for 阅读全文
摘要:
1.列出物理机器上安装的虚拟[root@localhost ~]# virsh list --all Id Name State 2 kvm-CentOS-7-119 running 3 kvm-CentOS-7-120 running 4 kvm-CentOS-7-121 running 9 kv 阅读全文
摘要:
python版本[testuser@localhost tmp]$ python -VPython 2.7.5 需要提前安装RDS[root@localhost ~]# yum -y install epel-release[root@localhost ~]# yum -y install pyt 阅读全文
摘要:
es参考手册地址: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-get-mapping.html 1.查看es日志curl -XGET http://10.26.41.60:9200/xdm-logs-201 阅读全文
摘要:
deletearchlog.sh #!/bin/sh export PATH TABLE='v$archived_log' sqlplus -silent "/ as sysdba" /home/oracle/script/deleteorclarch.sh set heading off; set pagesize 0; set term off; set feedback off; s... 阅读全文
摘要:
wget http://downloads.sourceforge.net/project/sshpass/sshpass/1.05/sshpass-1.05.tar.gztar xvzf sshpass-1.05.tar.gzcd sshpass-1.05./configure makemake 阅读全文
摘要:
安装expectcd /tmp wget http://core.tcl.tk/tcl/zip/release/tcl.zipwget https://jaist.dl.sourceforge.net/project/expect/Expect/5.45.3/expect5.45.3.tar.gz 阅读全文
摘要:
set head offset echo offset feed offset heads offset pages 50000SET NEWPAGE NONEcolumn yesterday new_value checkdate noprint;select to_char(sysdate-1, 阅读全文
摘要:
1.从备份集恢复某个归档日志到指定的目录 run{allocate channel ci type disk;set archivelog destination to '/home/oracle/myarchlog';restore archivelog sequence 299;release 阅读全文
摘要:
1.退出日志应用模式[oracle@localhost ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 14 16:09:16 2019 Copyright (c) 1982, 2013, Oracle. A 阅读全文
摘要:
准备工作,使用如下脚本进行数据库的全备份[oracle@localhost ~]$ more rman_backup.sh #!/bin/sh RMAN_OUTPUT_LOG=/home/oracle/rman_output.logRMAN_ERROR_LOG=/home/oracle/rman_e 阅读全文