Giter Site home page Giter Site logo

多 DB 的 port about redis-port HOT 3 CLOSED

codislabs avatar codislabs commented on August 12, 2024
多 DB 的 port

from redis-port.

Comments (3)

spinlock avatar spinlock commented on August 12, 2024

you can run redis-port with parameter --filterdb=DBNUM

from redis-port.

 avatar commented on August 12, 2024

--filterdb 不能单独指定源 Redis 的 db num. 吧,比如我使用了 --filterdb=1, 那么 redis-port 会同步 db 1 的数据到 codis 的 db 1, 然而由于 codis 只支持到 db 0 写数据,这时同步便会失败

# ./redis-port sync --from 127.0.0.1:6379 --filterdb=1 --target 127.0.0.1:19000
2015/09/30 16:30:00 [INFO] set ncpu = 1, parallel = 1
2015/09/30 16:30:00 [INFO] sync from '127.0.0.1:6379' to '127.0.0.1:19000'
2015/09/30 16:30:01 [INFO] -
2015/09/30 16:30:02 [INFO] rdb file = 40432168
2015/09/30 16:30:02 [PANIC] select command error
[error]: ERR invalid DB index, only accept DB 0
[stack]:
    1   /opt/go/src/github.com/wandoulabs/redis-port/cmd/utils.go:187
            main.selectDB
    0   /opt/go/src/github.com/wandoulabs/redis-port/cmd/sync.go:210
            main.func·021
        ... ...

from redis-port.

spinlock avatar spinlock commented on August 12, 2024

好像是的。redis-port 不会替换 dbnum 的,毕竟这样太危险了。

不过已经提供了根据 db 过滤数据以及后续指令的功能。所以建议你根据自己的需求进行简单地修改,例如直接 bypass 掉 select db 指令即可。

from redis-port.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.