Visual Studio Project Backup

16,881

If I just make zip of current projects from C drive and paste it in another drive.

Well you could do that but it's rather tedius; error-prone and rather brute-force. It's difficult to maintain history.

A better choice is to use some form of source control (SC) / software configuration management (SCM). SC is a tool for maintaining a code repository. It works by associating metadata about every source file and any changes you make.

e.g.

Source control not only keeps a copy somewhere else (ideally a different computer) but it also allows you to

  • keep track of what changed
  • rollback a change
  • share with your friends or colleges
  • integrates nicely with your IDE of choice (VS) or command-line

But in this day and age there are plenty of free cloud-based solutions that offer you more than just acting as a code repository such as stats; wikis; bug tracking; and spiffy charts. Check out:

Summary

Irrespective of whether you perform manual folder copies or use source control; both will lead to a copy of your code. However only the latter introduces workflows and due-diligence (via SCM) so that as you code you are unlikely to lose information due to the procedures and safeguards in place.

A word on file backup

If for some absolute reason you decide not to proceed with SC but rather stick with plain-old-file-backup then at least follow the fine wisdom of Scott Hanselman (MSFT) where he talks about file backup best practices:

I've got a number of backups because I practice the Backup Rule of Three.

  • 3 copies of anything you care about - Two isn't enough if it's important.
  • 2 different formats - Example: Dropbox+DVDs or Hard Drive+Memory Stick or CD+Crash Plan, or more
  • 1 off-site backup - If the house burns down, how will you get your memories back?

...using apps like CrashPlan.

Scott will most likely agree that his plan wasn't intended for source code but at least you have 3 backups of files as he recommends.

See Also

Share:
16,881
PMS Admin
Author by

PMS Admin

Updated on December 04, 2022

Comments

  • PMS Admin
    PMS Admin over 1 year

    Right now I am saving my all visual studio projects in C drive.

    Now I want to keep copy of that all projects in some other drive, so if my C drive get crashed then also I can access all projects.

    So what is best way for that.

    If I just make zip of current projects from C drive and paste it in another drive.

    And when needed I extract it, then will it work OR any error will come.

    Thanks for help in Advance.

    • PSK
      PSK about 6 years
      Ideally you should be using a version control like TFS. Because of some reasons if you can't use, restoring from zip will work without any issue.
    • CodeCaster
      CodeCaster about 6 years
      Please read How to Ask. You should research your problem before asking a new question. The de facto answer to "How do I back up my source code?" is "Use version control such as Git or TFS and store that off-premise". As for "[when] I extract [my zipped code], then will it work OR any error will come" - try it, preferably on a different machine.