I want to host an SVN server (or git or mercurial or whatever). I have two options:
Install it on a small box sitting in the office closet, only connected to the LAN.
Install it on a server at a data center in another state that has a publicly accessible IP address and currently hosts a public facing website.
My concern with #1 is the only way people can connect from outside the office is to VPN, but this is the ONLY point of VPN in my office right now... so it seems heavy duty. Also, if the office catches fire or someone decides to steal the box from the closet, well... the server is gone. Which means I will have to keep backups somewhere anyway...
My concern with #2 is that having the source code on a public facing server means that theoretically, someone can gain access to the server and steal the code. The fact that there is already a public facing service being run on it worries me even more since there could be an exploit for that software discovered.
How do most companies manage their source control servers and backups securely?
Generally, you have 3 secure options. I'll preface this with the disclaimer that I work for ProjectLocker, so I am generally biased toward a hosted solution for most companies.
Host It Yourself, Internally
Advantages:
Disadvantages:
Use A Hosting Provider
Advantages:
Disadvantages:
Set Up A Server At A Hosting Company
Advantages:
Disadvantages:
Based on this, I would recommend either hosting internally or going with a hosting provider (you can see a list of them by Googling for "subversion hosting"). It seems that hosting yourself with an external provider would be the worst of both worlds - you'd have to deal with the security and administration without the benefits of your company infrastructure. Hosting providers stake their business on making sure customers' data are safe, and some will execute NDAs to provide additional assurance, so it's reasonable to trust them enough to let them host your code.
I generaly keep a second server in the datacenter (a very small box) for that, however if that is not an option there are many hosted services out there.
If you're asking about 'most companies' I would probably answer VPN intranet. And on top of that they probably have some kind of redundancy built on top (Raid, Some kind of tape robot).
If you're wondering what you should do, set up a backup server, just get some NAS. If you're afraid of theft then put that server in some other closet. If you're afraid of fire then don't smoke near your office... You have to make some compromise when working with a small budget in a small company (if that is your case).
I would run the SVN server locally and use an off-site backup (tape, rsync, online, cloudy, etc). If concerned about the confidentiality of data on an off-site backup service I'd encrypt the data and keep a copy of the encryption keys at a third location (e.g. home) or in a fireproff data-safe in the office.
It may not be useful to know what most companies do, because they probably do it in a myriad of ways and the most common way may not suit your specific situation.