Linux

PostgreSQL 清理无用归档日志

pg_archivecleanup -d $PGDATA/pg_xlog 000000140000431A0000001A会删除所有早于000000140000431A0000001A的归档日志 PG维护 select pid ,(now() - xact_start) as time , state,query::char(120) from p...

selenium截图网站页面

from selenium import webdriver from selenium.webdriver.chrome.options import Options def get_image(url, pic_name): # chromedriver的路径 chromedriver = r"C:\Users\xx\Downloads\chromedriv...

mongodb 备份恢复

导出库 mongodump -h 192.168.3.26 --port 8635 -u user -p 'xxxx' --authenticationDatabase admin -d timedtask -o mongodb-arch-backup2020/ mongodump备份还原数据库 mongorestore -h 192.1...

Cnetos7升级内核

#cat /etc/redhat-release #uname -a 导入public key #rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org 安装ELRepo到CentOS 可以去http://elrepo.org/tiki/tiki-index.php选择要安装的ELRepo To i...

docker容器替换镜像源

Debian sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list Alpine sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories