How to change the storage of a running Gitea service from local to S3 #13948

Closed
opened 2025-11-02 10:58:08 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @OAMchronicle on GitHub (Jan 10, 2025).

Feature Description

How to change the storage of a running Gitea service from local to S3

Screenshots

No response

Originally created by @OAMchronicle on GitHub (Jan 10, 2025). ### Feature Description How to change the storage of a running Gitea service from local to S3 ### Screenshots _No response_
GiteaMirror added the type/questiontype/proposal labels 2025-11-02 10:58:08 -06:00
Author
Owner

@hiifong commented on GitHub (Jan 10, 2025):

Please remember to back up your data.
FYI:

hiifong@rock-5b:~/gitea$ ./gitea migrate-storage --help
NAME:
   gitea migrate-storage - Migrate the storage

USAGE:
   gitea migrate-storage command [command options]

DESCRIPTION:
   Copies stored files from storage configured in app.ini to parameter-configured storage

COMMANDS:
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --help, -h                        show help
   --custom-path value, -C value     Set custom path (defaults to '{WorkPath}/custom')
   --config value, -c value          Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')
   --work-path value, -w value       Set Gitea's working path (defaults to the Gitea's binary directory)
   --type value, -t value            Type of stored files to copy.  Allowed types: 'attachments', 'lfs', 'avatars', 'repo-avatars', 'repo-archivers', 'packages', 'actions-log', 'actions-artifacts
   --storage value, -s value         New storage type: local (default), minio or azureblob
   --path value, -p value            New storage placement if store is local (leave blank for default)
   --minio-endpoint value            Minio storage endpoint
   --minio-access-key-id value       Minio storage accessKeyID
   --minio-secret-access-key value   Minio storage secretAccessKey
   --minio-bucket value              Minio storage bucket
   --minio-location value            Minio storage location to create bucket
   --minio-base-path value           Minio storage base path on the bucket
   --minio-use-ssl                   Enable SSL for minio (default: false)
   --minio-insecure-skip-verify      Skip SSL verification (default: false)
   --minio-checksum-algorithm value  Minio checksum algorithm (default/md5)
   --minio-bucket-lookup-type value  Minio bucket lookup type
   --azureblob-endpoint value        Azure Blob storage endpoint
   --azureblob-account-name value    Azure Blob storage account name
   --azureblob-account-key value     Azure Blob storage account key
   --azureblob-container value       Azure Blob storage container
   --azureblob-base-path value       Azure Blob storage base path
@hiifong commented on GitHub (Jan 10, 2025): Please remember to back up your data. FYI: ```shell hiifong@rock-5b:~/gitea$ ./gitea migrate-storage --help NAME: gitea migrate-storage - Migrate the storage USAGE: gitea migrate-storage command [command options] DESCRIPTION: Copies stored files from storage configured in app.ini to parameter-configured storage COMMANDS: help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help --custom-path value, -C value Set custom path (defaults to '{WorkPath}/custom') --config value, -c value Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini') --work-path value, -w value Set Gitea's working path (defaults to the Gitea's binary directory) --type value, -t value Type of stored files to copy. Allowed types: 'attachments', 'lfs', 'avatars', 'repo-avatars', 'repo-archivers', 'packages', 'actions-log', 'actions-artifacts --storage value, -s value New storage type: local (default), minio or azureblob --path value, -p value New storage placement if store is local (leave blank for default) --minio-endpoint value Minio storage endpoint --minio-access-key-id value Minio storage accessKeyID --minio-secret-access-key value Minio storage secretAccessKey --minio-bucket value Minio storage bucket --minio-location value Minio storage location to create bucket --minio-base-path value Minio storage base path on the bucket --minio-use-ssl Enable SSL for minio (default: false) --minio-insecure-skip-verify Skip SSL verification (default: false) --minio-checksum-algorithm value Minio checksum algorithm (default/md5) --minio-bucket-lookup-type value Minio bucket lookup type --azureblob-endpoint value Azure Blob storage endpoint --azureblob-account-name value Azure Blob storage account name --azureblob-account-key value Azure Blob storage account key --azureblob-container value Azure Blob storage container --azureblob-base-path value Azure Blob storage base path ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13948