Skip to main content
After you deploy releases, you can copy them to another server or CDN. Use release_copy.py to copy one release, or repository_sync.py to copy whole repositories.

Choose a script

Use release_copy.py if:
  • You only need to copy one release.
  • You need to change the release’s delivery URL, for example from an internal server to your CDN.
release_copy.py doesn’t copy alias files, so environment assignments aren’t copied. Promote releases on the new server separately. See Create environments and promote releases.
Use repository_sync.py if:
  • You need to copy every repository, or a whole repository including its alias files, to the target.
  • You don’t need to change the delivery URL.
  • You want the target to match the source exactly. The script deletes target files that aren’t in the source, and can overwrite files.

Copy a release

Set these arguments on the command line, in a JSON configuration file or both:
  • repository: the repository the release belongs to, such as gameclient.
  • source: full path to the folder that contains the repository. Use the sync_directory you deployed to.
  • target: full path to copy to. Like sync_directory, this can be a local path, an S3 bucket or a CDN path in a supported protocol.
  • base_url: the delivery URL the launcher downloads from on the target, for example http://mycdn.net/mydirectory/.
Choose the release with one of:
  • version: the release version, such as 0.0.1.
  • description: the description you used when deploying.
  • release_id: the release’s unique SHA1 ID.
You can find these values in tracker.json or the repository’s history.json file. This example copies release 1.0 of the gametime repository from Akamai NetStorage to an S3 bucket:
copy_ns_to_s3.json
For each release, the script copies:
  • Every piece for the release
  • The catalog file for the release and its update paths, with the new base_url
  • Delta paths to this release
  • Index files for source releases to this release
  • The release’s metafile
  • repositoryname.history.json with this release’s information

Sync repositories

Required arguments:
  • source_sync_directory: full path to the folder with your repositories. Use the sync_directory you deployed to.
  • target_sync_directory: full path to copy to.
Optional arguments:
  • repository: the repository to sync. Without it, every repository in the source is copied.
  • dry_run: show the number and size of files to copy or delete without syncing.
  • overwrite: copy files even if they already exist and match. Without it, existing files are skipped.
You can find the sync directory and repository values in tracker.json.
sync_ns_to_s3.json
repository_sync.py deletes files in the target folder that aren’t in the source folder. Existing files aren’t overwritten unless you use overwrite.