cells admin datasource migrate
./cells admin datasource migrate
Migrate a datasource format (flat or structured)
Synopsis
DESCRIPTION
Migrate the content of a bucket between structured and flat. It can be used in both directions. It must be run with in a specific context: datasource services must be running expect for the sync services. You can start Cells in this specific mode by using the following command: ./cells start -x pydio.grpc.data.sync
The command executes the following actions: - List datasources showing their current formats. When picking a datasource, it is assumed it will be migrated to the opposite format - Detect datasource bucket name and expect to find an second bucket named "bucket-flat" or "bucket-structured" (depending on the target format). - Copy all files inside the new bucket, with their new name - If everything is ok, patch index database to add or remove .pydio hidden files (depending on target format) - Finally, update the datasource configuration in the configs.
Use --dry-run parameter to display only the list of rename operations that will be performed, without touching DB or configuration.
By default, files are copied inside the new bucket and are left untouched inside the original one in case something goes wrong. That means that your storage must have enough room for duplicating all data. If it's not the case, you can pass the --move-files flag to delete original file after copy. You can also force the copy to be performed in-place by manually editing target bucket name to its original value.
./cells admin datasource migrate [flags]
Options
-d, --dry-run Do not apply any changes
-f, --force Skip initial warning
-h, --help help for migrate
-m, --move-files Delete original files after copying to new bucket
Options inherited from parent commands
--broker string Pub/sub service for events between services (currently nats only) (default "memory")
--nats_address string NATS server address (default ":4222")
--nats_cluster_address string NATS server cluster address
--nats_cluster_routes string NATS server cluster routes
--nats_monitor_port int Expose nats monitoring endpoints on a given port (default 8222)
--nats_streaming_cluster_bootstrap NATS streaming bootstrap cluster
--nats_streaming_cluster_id string NATS streaming cluster ID (default "cells")
--nats_streaming_cluster_node_id string NATS streaming cluster node id
--nats_streaming_cluster_peers string NATS streaming list of cluster peers
--nats_streaming_clustered NATS streaming clustered
--nats_streaming_store string NATS streaming store type (default "MEMORY")
--port_broker int Port used to start a broker discovery service (default 8003)
--port_registry int Port used to start a registry discovery service (default 8000)
--registry string Registry used to manage services (currently nats only) (default "memory")
--transport string Transport protocol for RPC (default "grpc")
SEE ALSO
- ./cells admin datasource - Datasource management commands