<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之旅 廣告
                # Uploads migrate Rake tasks > 原文:[https://docs.gitlab.com/ee/administration/raketasks/uploads/migrate.html](https://docs.gitlab.com/ee/administration/raketasks/uploads/migrate.html) * [Migrate to object storage](#migrate-to-object-storage) * [All-in-one Rake task](#all-in-one-rake-task) * [Individual Rake tasks](#individual-rake-tasks) * [Migrate to local storage](#migrate-to-local-storage) * [All-in-one Rake task](#all-in-one-rake-task-1) # Uploads migrate Rake tasks[](#uploads-migrate-rake-tasks-core-only "Permalink") `gitlab:uploads:migrate`在不同的存儲類型之間遷移上載. ## Migrate to object storage[](#migrate-to-object-storage "Permalink") 在為 GitLab 的上傳[配置對象存儲](../../uploads.html#using-object-storage-core-only)后,使用此任務將現有的上傳從本地存儲遷移到遠程存儲. 閱讀有關[在 GitLab 上](../../object_storage.html)使用[對象存儲的](../../object_storage.html)更多信息. **注意:**所有處理將在后臺工作人員中完成, **無需停機** . ### All-in-one Rake task[](#all-in-one-rake-task "Permalink") GitLab 提供了一個包裝 Rake 任務,可將所有上載的文件(例如,頭像,徽標,附件和網站圖標)遷移到對象存儲中. 包裝器任務調用各個 Rake 任務來逐一遷移屬于這些類別的文件. 這些[單獨的 Rake 任務](#individual-rake-tasks)將在下一部分中介紹. 要將所有上載從本地存儲遷移到對象存儲,請運行: **全部安裝** ``` gitlab-rake "gitlab:uploads:migrate:all" ``` **源安裝** ``` sudo RAILS_ENV=production -u git -H bundle exec rake gitlab:uploads:migrate:all ``` ### Individual Rake tasks[](#individual-rake-tasks "Permalink") 如果您已經運行了[多合一 Rake 任務](#all-in-one-rake-task) ,則無需運行這些單獨的任務. Rake 任務使用三個參數來查找要遷移的上載: | Parameter | Type | Description | | --- | --- | --- | | `uploader_class` | string | 要從中遷移的上傳者的類型. | | `model_class` | string | 要遷移的模型的類型. | | `mount_point` | string/symbol | 上傳器安裝在其上的模型列的名稱. | **注意:**這些參數主要是在 GitLab 結構的內部,您可能想參考下面的任務列表. 此任務還接受一個環境變量,您可以使用它來覆蓋默認的批處理大小: | Variable | Type | Description | | --- | --- | --- | | `BATCH` | integer | 指定批處理的大小. 默認為 200. | 下面顯示了如何針對各種類型的上傳運行`gitlab:uploads:migrate` . **全部安裝** ``` # gitlab-rake gitlab:uploads:migrate[uploader_class, model_class, mount_point] # Avatars gitlab-rake "gitlab:uploads:migrate[AvatarUploader, Project, :avatar]" gitlab-rake "gitlab:uploads:migrate[AvatarUploader, Group, :avatar]" gitlab-rake "gitlab:uploads:migrate[AvatarUploader, User, :avatar]" # Attachments gitlab-rake "gitlab:uploads:migrate[AttachmentUploader, Note, :attachment]" gitlab-rake "gitlab:uploads:migrate[AttachmentUploader, Appearance, :logo]" gitlab-rake "gitlab:uploads:migrate[AttachmentUploader, Appearance, :header_logo]" # Favicon gitlab-rake "gitlab:uploads:migrate[FaviconUploader, Appearance, :favicon]" # Markdown gitlab-rake "gitlab:uploads:migrate[FileUploader, Project]" gitlab-rake "gitlab:uploads:migrate[PersonalFileUploader, Snippet]" gitlab-rake "gitlab:uploads:migrate[NamespaceFileUploader, Snippet]" gitlab-rake "gitlab:uploads:migrate[FileUploader, MergeRequest]" # Design Management design thumbnails gitlab-rake "gitlab:uploads:migrate[DesignManagement::DesignV432x230Uploader, DesignManagement::Action, :image_v432x230]" ``` **源安裝** **注意:**為每個任務使用`RAILS_ENV=production` . ``` # sudo -u git -H bundle exec rake gitlab:uploads:migrate # Avatars sudo -u git -H bundle exec rake "gitlab:uploads:migrate[AvatarUploader, Project, :avatar]" sudo -u git -H bundle exec rake "gitlab:uploads:migrate[AvatarUploader, Group, :avatar]" sudo -u git -H bundle exec rake "gitlab:uploads:migrate[AvatarUploader, User, :avatar]" # Attachments sudo -u git -H bundle exec rake "gitlab:uploads:migrate[AttachmentUploader, Note, :attachment]" sudo -u git -H bundle exec rake "gitlab:uploads:migrate[AttachmentUploader, Appearance, :logo]" sudo -u git -H bundle exec rake "gitlab:uploads:migrate[AttachmentUploader, Appearance, :header_logo]" # Favicon sudo -u git -H bundle exec rake "gitlab:uploads:migrate[FaviconUploader, Appearance, :favicon]" # Markdown sudo -u git -H bundle exec rake "gitlab:uploads:migrate[FileUploader, Project]" sudo -u git -H bundle exec rake "gitlab:uploads:migrate[PersonalFileUploader, Snippet]" sudo -u git -H bundle exec rake "gitlab:uploads:migrate[NamespaceFileUploader, Snippet]" sudo -u git -H bundle exec rake "gitlab:uploads:migrate[FileUploader, MergeRequest]" # Design Management design thumbnails sudo -u git -H bundle exec rake "gitlab:uploads:migrate[DesignManagement::DesignV432x230Uploader, DesignManagement::Action]" ``` ## Migrate to local storage[](#migrate-to-local-storage "Permalink") 如果出于任何原因需要禁用[對象存儲](../../object_storage.html) ,則必須首先將數據從對象存儲中遷移出來,然后再遷移回本地存儲中. **Warning:** **需要延長停機時間** so no new files are created in object storage during the migration. A configuration setting will be added soon to allow migrating from object storage to local files with only a brief moment of downtime for configuration changes. To follow progress, see the [relevant issue](https://gitlab.com/gitlab-org/gitlab/-/issues/30979). ### All-in-one Rake task[](#all-in-one-rake-task-1 "Permalink") GitLab 提供了一個包裝 Rake 任務,可將所有上載的文件(例如,頭像,徽標,附件和網站圖標)遷移到本地存儲中. 包裝器任務調用各個 Rake 任務來逐一遷移屬于這些類別的文件. 有關這些 Rake 任務的詳細信息,請參閱" [個人 Rake 任務"](#individual-rake-tasks) ,請記住,在這種情況下,任務名稱為`gitlab:uploads:migrate_to_local` . 要將上傳從對象存儲遷移到本地存儲: 1. 同時禁用`direct_upload`和`background_upload`下`uploads`的設置`gitlab.rb` . 2. 運行 Rake 任務: **全部安裝** ``` gitlab-rake "gitlab:uploads:migrate_to_local:all" ``` **源安裝** ``` sudo RAILS_ENV=production -u git -H bundle exec rake gitlab:uploads:migrate_to_local:all ``` 運行 Rake 任務后,您可以通過撤消[配置對象存儲](../../uploads.html#using-object-storage-core-only)的說明中所述的更改來禁用[對象存儲](../../uploads.html#using-object-storage-core-only) .
                  <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>

                              哎呀哎呀视频在线观看