Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is There A Way To Backup Visual Studio Team Services Projects?

I'm advocating using Visual Studio Team Services for our source control solution, and have actually started doing so. However, my manager, who is somewhat apprehensive when it comes to cloud-hosted storage and services, wants to know what our contingency plan is in the event of Team Services ceasing to be accessible for whatever reason.

I've pointed out that we have our source code on our developers' computers, in their mapped work spaces, but admittedly if we ended up with just that and no access to Team Services we'd certainly be in a bit of bind. They might all be working on different parts of the same solution and we wouldn't be able to check all of their changes back into the central repository or merge changes made in separate branches. We also wouldn't have access to the comments associated with previous check-ins, or our backlog, tests, etc.

So, the question is, is there a way to backup everything that we're hosting in Team Services so that, in the event of something going wrong, we'd be able to restore all of that to a locally-hosted installation of TFS (or somewhere else)?

like image 303
Philip Stratford Avatar asked Nov 18 '14 17:11

Philip Stratford


People also ask

How do I backup my Visual Studio project?

Creating a backup of current solution or project is easy, and it's done directly inside VisualStudio: right-click on the solution and select "Backup solution..." right-click on a project select "Backup project..."

Does Visual Studio make backups?

For previously saved files, Visual Studio saves a copy of the file in %LocalAppData%\Microsoft\VisualStudio\BackupFiles\[projectname]. If the file is new and you haven't saved it yet, Visual Studio autosaves it by using a randomly generated file name.

How do I recover an unsaved file in Visual Studio?

Those recovery files are located @ MyDocuments\Visual Studio X\Backup Files\Project Name... Save this answer.


2 Answers

I'm a bit late to the party but we developed a Team Services backup tool. We scheduled it as a scheduled task and it runs once a night. It then just clones all our repositories to disk.

Taken from this blog:

We use the VSO Rest API to query our VSO account and get all the data we need. Since in VSO you can only have one Team Project Collection, we retrieve all the team projects of the default collection. Each of these team projects can have multiple repositories that need to be backed up. A folder is created for each team project and saved to a location on disk that can be configured in the app.config. When the team project folder is created, the task loops over each repository in the team project and creates folders for each repository.

You can also fork it on GitHub here

like image 160
Thousand Avatar answered Nov 09 '22 07:11

Thousand


There's no out of the box backup ability.

Now, if you are only referring to source control, and not work items, pull requests, builds, test plans or anything else that the service offers, then I'd suggest you migrate your code over to git.

With git every developer will have a complete copy of the source repository, including all history and commit comments. From there, it's a simple task to push the git repository to a different git hoster (such as bitbucket or github) and make them your new centrally hosted git repository.

On a historical note, Visual Studio Team Services at one point offered a data export for a period of time. You might want to add a vote or three to this related UserVoice idea to help raise the importance of the feature with Microsoft.

Side comment: The business risks in using Visual Studio Team Services will come from either Microsoft shutting down the Visual Studio Team Services service or that the underlying Azure infrastructure has such a catastrophic failure that your Visual Studio Team Services account is unrecoverable. Both of those are extremely low risk, and very likely lower than the risks you'd have running TFS on-premises, in your own data centre, unless of course, your infrastructure and staff are better than Microsoft's :-)

like image 29
Richard Banks Avatar answered Nov 09 '22 06:11

Richard Banks