<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 1.5.4 RedisDump的安裝 ## 1.說明 RedisDump是一個用于Redis數據導入導出的工具,是基于Ruby實現的,所以要安裝RedisDump需要安裝Ruby ## 2. 相關鏈接 {#1-相關鏈接} * GitHub:[https://github.com/delano/redis-dump](https://github.com/delano/redis-dump) * 官方文檔:[http://delanotes.com/redis-dump](http://delanotes.com/redis-dump) ## 3.安裝Ruby 官網:[http://www.ruby-lang.org/zh\_cn/documentation/installation](http://www.ruby-lang.org/zh_cn/documentation/installation) windows-下載地址:[https://rubyinstaller.org/downloads/](https://rubyinstaller.org/downloads/) ![](https://box.kancloud.cn/894670baddc9d80e46ec6cf33dba48ab_562x531.png)msys2:[http://repo.msys2.org/distrib/x86\_64/msys2-x86\_64-20180531.exe](http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe) ## 3.Gem安裝 打開Start Command Prompt with Ruby ![](https://box.kancloud.cn/5c5c5d6f6f0373c52a4979f35a3ad704_345x151.png)![](https://box.kancloud.cn/c331ad6fb2aa239b43cd495878a75d61_774x109.png)如果出現上面類似情況,需要更換源 ```text $ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ 或者 添加淘寶鏡像:gem source -a http://ruby.taobao.org/ --remove https://rubygems.org/ # 查看源 $ gem sources -l *** CURRENT SOURCES *** https://gems.ruby-china.org ``` 利用gem命令安裝 ```text gem install redis-dump ``` 下面是報錯: ```text Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing jekyll: ERROR: Failed to build gem native extension. current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser C:/Ruby25-x64/bin/ruby.exe -r ./siteconf20180308-3672-ueo7ea.rb extconf.rb creating Makefile current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser make "DESTDIR=" clean 'make' 不是內部或外部命令,也不是可運行的程序或批處理文件。 current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser make "DESTDIR=" 'make' 不是內部或外部命令,也不是可運行的程序或批處理文件。 make failed, exit code 1 Gem files will remain installed in C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_p arser.rb-0.6.0 for inspection. Results logged to C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0 /http_parser.rb-0.6.0/gem_make.out ``` 如果出現如上類似錯誤 原來是沒有make指令,需要安裝 ```text ridk install ``` ![](https://box.kancloud.cn/190133201bc8bc010f6ef345fe5951fc_963x273.png)等待安裝完畢,期間網速可能會很慢 安裝完后,重新安裝redis-dump 需要安裝證書,可以在這里下載:[https://www.digicert.com/digicert-root-certificates.htm](https://www.digicert.com/digicert-root-certificates.htm) ## 4.驗證安裝 安裝成功后就可以執行如下兩個命令: ```text redis-dump redis-load ``` #### 使用redis-dump導出數據 導出指令如下: ```text redis-dump -u :mypassword@localhost:6379 -d database_name >test.json ``` -u 后邊跟redis數據庫的信息,如果沒有密碼可以不寫 ```text redis-dump -u localhost:6379 -d database_name >test.json ``` 如果直接導出本機端口為6379的可以把 -u 的部分給省去 ```text redis-dump >test.json ``` -d 指定導出哪個數據庫的數據,如果不寫則導出所有的,一定要注意數據庫名字(這里是 database\_name )前后必須要加空格。![](https://box.kancloud.cn/31f4b169497375819d6141f1559b11fa_699x49.png)如果導出數據時,出現以上錯誤,應該如下解決 ```text 首先打開dump.rb文件進行編輯,這里推薦使用notepad記事本 如下: C:\Ruby25-x64\lib\ruby\gems\2.5.0\gems\redis-dump-0.4.0\lib\redis\dump.rb 然后在文本中的第32行,用#進行注釋 如下: # `ps -o rss= -p #{Process.pid}`.to_i # in kb ``` #### 使用**redis-load還原數據** 導入指令如下: ```text < test.json redis-load //導入數據 #導入 cat redis.json | redis-load -u :password@localhost ``` ### redis-dump命令 ```text -u, --uri=S Redis URI (e.g. redis://hostname[:port]) -d, --database=S Redis database (e.g. -d 15) -a, --password=S Redis password (e.g. -a 'my@pass/word') -s, --sleep=S Sleep for S seconds after dumping (for debugging) -c, --count=S Chunk size (default: 10000) -f, --filter=S Filter selected keys (passed directly to redis' KEYS command) -b, --base64 Encode key values as base64 (useful for binary values) -O, --without_optimizations Disable run time optimizations -V, --version Display version -D, --debug --nosafe ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看