views:

110

answers:

6

So, you're on to a new project and have already invested quite some time in it. Suddenly your hard disk breaks and you have lost all your hard work.

Or not? Did you make sure that the code can be recovered in some way? Do you backup frequently, manually or automatically? How do you do this?

Personally, I am trying to remind myself to manually backup -- but unfortunately, do this way too seldom.

+2  A: 

Tom, if you haven't already, then you should take time to learn about source control management. Have a scan around SO for questions on subversion, git and mercurial (there's probably more) to get started.

spender
+6  A: 

You put your sources in a source code control system, which is properly backed up. If you don't want to do this yourself, there are plenty of source code hosting sites. Google on "subversion hosting", for example.

JesperE
+3  A: 

I am trying to remind myself to manually backup -- but unfortunately, do this way too seldom

That's exactly the reason why you have automatic backups - and/or, in the case of a company doing development professionally, an admin whose job it is to ensure that regular backups happen and are tested.

Alternatively, if you use a distributed version control system like git, the entire change history is copied when you synch two repositories, so you have an implicit backup on every dev machine that synchs regularly.

Michael Borgwardt
+2  A: 

There are lots of free and paid subversion & git hosts online; unfuddle.com, github.com (my fave), svnrepository.com, beanstalkapp.com - create an account with them and keep your code offsite.

Christian
not to forget bitbucket.com
Esben Skov Pedersen
+2  A: 

You need to use version control, since this means that you have every version of your code easily available. Distributed version control is particularly good, since you can then have multiple clones of the complete repository on different systems. I have had private Git repositories with clones on two different servers on different networks when I felt paranoid. There isn't an actual technical limit to the number of copies you can have with a distributed system.

Git (and I think Bazaar) store hashes for every commit, which means that any data corruption can be spotted. The damage can then be repaired from alternate copies. Silent data corruption is supposedly becoming a bigger issue as disk sizes increase.

Stuart Ellis
+6  A: 

I was like that ... but only for the 1st time :)

Today I'm using 2 systems to handle all my code as well my project files.

1 - I use SVN outside my computer, right now I'm a happy costumer with Beanstalk (using free version)

2 - I use the fantastic 2Gb free DropBox witch let me give my clients a public folder so they can just upload files and because I use Win and mac, I have everything in place...

It is a wonderful combination, try it... both for free :)

balexandre
I use Dropbox as well. All my projects are there, allowing me to access them from anywhere.
alex
Interesting. Are you not worried about Dropbox having access to all your source code though?
Tom
Code is in SVN ... Dropbox holds files (images, documents, etc), it is nice to have versions of our code. Worried... well, not really, the amount of companies and users that use Beanstalk and their privacy policy gives me safe reasons not to worry with that. And if you have a payed subscription you even have SSL ;)
balexandre