Exports all TeamCity Projects to local JSON configuration files for backup/restore / migration purposes, or even just to backport changes to Git for revision control tracking
If arguments are specified then only downloads those named Projects, otherwise finds and downloads all Projects settings.
If a single project is given, the export filename is called project-settings.json in line with standard TeamCity exports, but if multiple projects are given or the project list is queried from TeamCity then the export file is called <project>.json to differentiate them.
# use this to figure out if we should set filename to <project>.json or leave as the single standard project-config.json - this is important for bulk teamcity_export.sh per project to mimick the official TeamCity exports and Versioned Settings sync directory structure