Docker中Portgres的数据导出

# 备份 ## docker exec 容器名 pg_dump -U 用户名 数据库 > backup.sql docker exec odoodb pg_dump -U odoo postgres > backup.sql # 导入 cat your_dump.sql | docker exec -i your-db-container psql -U postgres # 进入docker里的Portgres docker exec -it postgres psql -U postgres # 显示数据库 \l #选择数据库 \c # 显示结构 \d #创建用户…

odoo10迁移到Docker

ubuntu 安装版odoo10迁移到Docker 先创建好数据库和odoo version: "2" services: db: restart: always image: postgres:alpine container_name: postgres volumes: - ./postgres/db:/var/lib/postgresql/data - ./postgres/initdb:/docker-entrypoint-initdb.d environment: - POSTGRES_PASSWORD=mima networks: - bridge odoo: image: odoo:10.0 container_name: odoo depends_on: - db…

Linux分区扩容 不丢失数据

扩容vdb1$ df -l Filesystem 1K-blocks Used Available Use% Mounted on /dev/vda1 20509308 16357724 3086728 85% / /dev/vdb1 103080224 19281512 78555888 20% /data $ umount /dev/vdb1 $ fdisk /dev/vdb $ p Disk /dev/vdb: 100 GiB, 107374182400 bytes, 209715200 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical)…

Shadowsocks-libev Iptables Firewalld

路由器全局走ssiptables -t nat -N SHADOWSOCKS iptables -t mangle -N SHADOWSOCKS # Ignore your shadowsocks server's addresses # It's very IMPORTANT, just be careful. iptables -t nat -A SHADOWSOCKS -d 47.240.28.126 -j RETURN # Ignore LANs and any other addresses you'd like to bypass the proxy # See Wikipedia and RFC5735 for…

我的主机推广码

vultr的日本节点 vultr送100美金 韩国节点的cafe24 强力推荐 阿里云 强力推荐没有之一…

Archlinux滚挂1

error ERROR: devide 'UUID=< uuid_2 >' not found. Skipping fsck. mount: can t find UUID=< uuid_2 > You are now being dropped into an emergency shell. sh: can t access tty; job control turned off [rootfs ]# pacman -Syu后重启就这样了 键盘输入不了。 解决 我是通过降回之前的linux内核解决的这个问题。 从linux 4.16降到linux 4.…

Kcptun shadowsocks in docker

server docker run -dt --restart="always" --name ssserver -p 8388:80 -p 443:443/udp mritd/shadowsocks -m "ss-server" -s "-s 0.0.0.0 -p 80 -m aes-256-cfb -k password --fast-open" -x -e "kcpserver" -k "-t 127.0.0.1:…

Arch Linux 升降换内核

换成linux-lts pacman -S linux-lts linux-lts-headers ls -lsha /boot pacman -R linux linux-headers grub-mkconfig -o /boot/grub/grub.cfg reboot 降版本 ls /var/cache/pacman/pkg/ cd /var/cache/pacman/pkg/ pacman -U linux-xxxxx-x86_64.pkg.tar.xz linux-headers-xxxxx-x86_64.pkg.tar.xz reboot 参考 https://unix.stackexchange.com/questions/284617/…

openldap AC权限配置

目标: ou=apps,dc=example,dc=com目录下的cn=*有权只读ou=people,dc=example,dc=com下的信息列表 通过ldapadmin登陆cn=config,修改olcDatabase={1}hdb的olcAccess值 {0}to dn.subtree="ou=people,dc=example,dc=com" by self write by dn.children="ou=apps,dc=example,dc=com" read by * none 参考 https://www.…

Docker创建新的网络

docker network create --driver bridge \ --subnet 172.21.0.0/16 \ --gateway 172.21.0.1 \ --subnet 2001:db8:2::/64 \ --gateway 2001:db8:2::1 \ --opt com.docker.network.bridge.name=new_net_name \ --opt com.docker.network.bridge.enable_icc=true \ --opt com.docker.network.driver.mtu=1492…