Project sync
Copy buckets, bucket data, functions, API keys, policies and environment variables directly from one Spica instance to another.
spica project sync copies resources from a source instance to a target instance, without files in between. It's handy for one-off migrations, such as cloning production data into a staging instance.
Terminal
spica project sync \
--source-url https://api.prod.example.com/api --source-apikey "$PROD_KEY" \
--target-url https://api.staging.example.com/api --target-apikey "$STAGING_KEY" \
--modules bucket,bucket-data,function \
--dry-run| Option | Description |
|---|---|
--source-url, --source-apikey | Required. The instance to copy from. |
--target-url, --target-apikey | Required. The instance to copy to. |
--modules | Required. Comma-separated: bucket, bucket-data, function, apikey, policy, env-var. |
--bucket-ids, --function-ids, --apikey-ids, --policy-ids, --env-var-ids | Limit a module to some ids, comma-separated. |
--dry-run | Show the changes without applying them. |
--concurrency-limit | Parallel requests to the target (default 100). Lower it if you see ECONNRESET. |
--ignore-errors | Continue when a request fails. |
Both instances should run the same Spica version.