<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之旅 廣告
                # Repository storage Rake tasks > 原文:[https://docs.gitlab.com/ee/administration/raketasks/storage.html](https://docs.gitlab.com/ee/administration/raketasks/storage.html) * [List projects and attachments](#list-projects-and-attachments) * [On legacy storage](#on-legacy-storage) * [On hashed storage](#on-hashed-storage) * [Migrate to hashed storage](#migrate-to-hashed-storage) * [Rollback from hashed storage to legacy storage](#rollback-from-hashed-storage-to-legacy-storage) # Repository storage Rake tasks[](#repository-storage-rake-tasks-core-only "Permalink") 這是 Rake 任務的集合,可幫助您列出現有項目及其附件并將其遷移到新的[哈希存儲中](../repository_storage_types.html) ,GitLab 用于組織 Git 數據. ## List projects and attachments[](#list-projects-and-attachments "Permalink") 以下 Rake 任務將列出舊版存儲和哈希存儲上可用的項目和附件. ### On legacy storage[](#on-legacy-storage "Permalink") 要使用舊式存儲獲得摘要,然后列出項目及其附件: * **全部安裝** ``` # Projects sudo gitlab-rake gitlab:storage:legacy_projects sudo gitlab-rake gitlab:storage:list_legacy_projects # Attachments sudo gitlab-rake gitlab:storage:legacy_attachments sudo gitlab-rake gitlab:storage:list_legacy_attachments ``` * **源碼安裝** ``` # Projects sudo -u git -H bundle exec rake gitlab:storage:legacy_projects RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:storage:list_legacy_projects RAILS_ENV=production # Attachments sudo -u git -H bundle exec rake gitlab:storage:legacy_attachments RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:storage:list_legacy_attachments RAILS_ENV=production ``` ### On hashed storage[](#on-hashed-storage "Permalink") 要使用散列存儲來獲得項目及其附件的摘要和列表,請執行以下操作: * **全部安裝** ``` # Projects sudo gitlab-rake gitlab:storage:hashed_projects sudo gitlab-rake gitlab:storage:list_hashed_projects # Attachments sudo gitlab-rake gitlab:storage:hashed_attachments sudo gitlab-rake gitlab:storage:list_hashed_attachments ``` * **源碼安裝** ``` # Projects sudo -u git -H bundle exec rake gitlab:storage:hashed_projects RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:storage:list_hashed_projects RAILS_ENV=production # Attachments sudo -u git -H bundle exec rake gitlab:storage:hashed_attachments RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:storage:list_hashed_attachments RAILS_ENV=production ``` ## Migrate to hashed storage[](#migrate-to-hashed-storage "Permalink") **注意:**在 GitLab 13.0 中,默認情況下啟用了[哈希存儲](../repository_storage_types.html#hashed-storage) ,并且不建議使用舊存儲. 在 GitLab 14.0 中將刪除對舊存儲的支持. 如果您使用的是 GitLab 13.0 及更高版本,則無法將新項目切換到舊版存儲. 在管理區域中的哈希存儲和舊存儲之間進行選擇的選項已被禁用. 此任務將安排您所有與之關聯的現有項目和附件,以遷移到**Hashed**存儲類型: * **全部安裝** ``` sudo gitlab-rake gitlab:storage:migrate_to_hashed ``` * **源碼安裝** ``` sudo -u git -H bundle exec rake gitlab:storage:migrate_to_hashed RAILS_ENV=production ``` 如果您有任何現有的集成,則可能需要先進行少量部署以進行驗證. 您可以通過使用環境變量`ID_FROM`和`ID_TO`在操作中指定 ID 范圍來`ID_TO` . 例如,要在 Omnibus GitLab 安裝中將項目 ID 限制為項目 ID 50 到 100: ``` sudo gitlab-rake gitlab:storage:migrate_to_hashed ID_FROM=50 ID_TO=100 ``` 您可以在 **管理區域>監視>后臺作業**頁面. 您可以觀看一個特定的隊列,以了解完成需要多長時間: `hashed_storage:hashed_storage_project_migrate` . 達到零后,您可以通過運行以下命令確認每個項目都已遷移. 如果發現有必要,則可以再次運行此遷移腳本以計劃丟失的項目. 任何錯誤或警告將記錄在 Sidekiq 的日志文件中. **注意:**如果啟用了" [地理"](../geo/replication/index.html) ,則成功遷移的每個項目都會生成一個事件,以復制任何**輔助**節點上的更改. 您只需要`gitlab:storage:migrate_to_hashed` Rake 任務即可遷移存儲庫,但是下面還有其他命令可幫助您檢查舊版存儲和哈希存儲中的項目和附件. ## Rollback from hashed storage to legacy storage[](#rollback-from-hashed-storage-to-legacy-storage "Permalink") **不建議使用:**在 GitLab 13.0 中,默認情況下啟用了[哈希存儲](../repository_storage_types.html#hashed-storage) ,并且不建議使用舊存儲. 在 GitLab 14.0 中將刪除對舊存儲的支持. 如果您使用的是 GitLab 13.0 及更高版本,則無法將新項目切換到舊版存儲. 在管理區域中的哈希存儲和舊存儲之間進行選擇的選項已被禁用. This task will schedule all your existing projects and associated attachments to be rolled back to the legacy storage type. * **全部安裝** ``` sudo gitlab-rake gitlab:storage:rollback_to_legacy ``` * **源碼安裝** ``` sudo -u git -H bundle exec rake gitlab:storage:rollback_to_legacy RAILS_ENV=production ``` 如果您有任何現有的集成,則可能需要先進行少量回滾以進行驗證. 您可以通過使用環境變量`ID_FROM`和`ID_TO`在操作中指定 ID 范圍來`ID_TO` . 例如,要在 Omnibus GitLab 安裝中將項目 ID 限制為項目 ID 50 到 100: ``` sudo gitlab-rake gitlab:storage:rollback_to_legacy ID_FROM=50 ID_TO=100 ``` 您可以在 **管理區域>監視>后臺作業**頁面. 在" **隊列"**選項卡上,您可以查看`hashed_storage:hashed_storage_project_rollback`隊列以查看該過程將花費多長時間. 達到零后,您可以通過以下命令確認每個項目都已回滾. 如果某些項目沒有回滾,則可以再次運行此回滾腳本以安排進一步的回滾. 任何錯誤或警告將記錄在 Sidekiq 的日志文件中. 如果您具有地理設置,則回滾將不會自動反映在**輔助**節點上. 您可能需要等待回填操作才能啟動,并手動從特殊的`@hashed/`文件夾中刪除剩余的存儲庫.
                  <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>

                              哎呀哎呀视频在线观看