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
OptionDescription
--source-url, --source-apikeyRequired. The instance to copy from.
--target-url, --target-apikeyRequired. The instance to copy to.
--modulesRequired. Comma-separated: bucket, bucket-data, function, apikey, policy, env-var.
--bucket-ids, --function-ids, --apikey-ids, --policy-ids, --env-var-idsLimit a module to some ids, comma-separated.
--dry-runShow the changes without applying them.
--concurrency-limitParallel requests to the target (default 100). Lower it if you see ECONNRESET.
--ignore-errorsContinue when a request fails.

Both instances should run the same Spica version.