# 模拟DFS发送redis消息 ```bash # mbi sls2d for line in {10160000000..10160000136}; do echo $line; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid $line; done #mci for line in {20100000001..20100000005}; do echo $line; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid $line; done #ifs-rss for line in {30100000003..30100000050}; do echo $line; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid $line; done #cpic for line in {41000000101..41000000104}; do echo $line; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid $line; done #hstdm for line in {50100000001..50100000002}; do echo $line; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid $line; done ``` redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 10160000000; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 20100000001; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 30100000003; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 41000000101; redis-cli -h 127.0.0.1 -a 123456 lpush single-image-reduction:obsid 50100000001; ## 数据库导入导出 ## 进入database容器 ### 数据导出 pg_dump -h 127.0.0.1 -p 5432 -U scalebox -d scalebox -Fc -f ~/scalebox.sql ### 数据导入 pg_restore -h 127.0.0.1 -U scalebox -d scalebox /scalebox.sql ## 导数据步骤 ### 1紫金山考出数据 docker exec cf32ca2842e8 pg_dump -U scalebox --data-only --dbname=scalebox > scalebox.sql ### 2传入到要拷贝数据的数据库容器内 docker cp scalebox.sql a3e398828977:/tmp/scalebox.sql ### 3进入容器并登陆数据库 docker exec -it a3e398828977 bash psql -U scalebox -d scalebox ### 4执行插入命令 \i /tmp/scalebox.sql