Migrating server with S3 Stored Artifacts

We are looking at migrating our server from our local environment to a new environment and I had a question on how artifact migration needs to happen if we are storing artifacts in S3.  Do any files from the /system/artifacts directory need to get copied to the new environment or will TeamCity auto-magically hook up all of the builds in the build history to their respective artifact in S3 after the data migration process with maintainDB.sh?

Any help on this would be very much appreciated.  We have about 400G of locally stored artifacts that we do not want to transfer that are left over from before we went to S3, and I would prefer not to sift through them to find the individual artifacts that do need to be transferred over.

0
3 comments

Hello Brian,

Please be advised that TeamCity backup file does not contain build artifacts. You can follow the instructions given here to move your server to a new machine. Those instructions imply that you will need to copy the artifacts stored in <TeamCity data directory>/system/artifacts manually.

Regarding the S3 artifacts, the links to the artifacts in the builds are displayed based on the current build feature settings and .teamcity/artifacts.json files stored in the local artifacts storage, so make sure you copy them over.

As for having to copy only some of the locally stored artifacts and not all of them, there is no built-in way to automate the process of selecting the required artifacts, unfortunately. If you would like to write a script that would filter them for you, keep the following folder structure of the artifacts storage in mind:

<TeamCity data directory>/system/artifacts/<Project_Name>/<BuildConfiguration_Name>/<Build_Number>/
- .teamcity/<hidden_(system)_artifacts>
- <build_artifacts>
0

Thank Anatoly,

 

I did a bit of digging around and came to a similar conclusion so its nice to have that confirmed.  It might be nice to have some information in the backup and restore docs about what needs to be transferred to have Cloud Artifacts still shown after a migration. I'll be doing some more testing today but I'm happy to put in a request on YouTrack if that is preferred.

Since there doesn't seem to be a large amount of data being stored in the files that point to cloud artifacts, would it be possible to also have that involved in the backup process in the future?  Again, I can submit a ticket in YouTrack if it's better to write it there.

0

Brian,

There is already a related issue: https://youtrack.jetbrains.com/issue/TW-43056
Once it is closed, it should cover your use case.

0

Please sign in to leave a comment.