Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git as a backup and Version Control System

Tags:

I want to use Git to backup my home drive, but I also want to use it as a version control system for projects that will be stored in my home drive.

How would I go about doing that? Do I .gitignore all the projects root folders and make new repositories for them?

Edit:

Ok I explained what I wanted wrongly. I want to have a history of changes made to my home drive like I can get with Git and I also want to back that up.

like image 551
gitnoob Avatar asked Apr 04 '10 23:04

gitnoob


People also ask

Can Git be used as a backup?

git is not a backup system.

Can Git be used for version control?

Git is an open source distributed version control system that helps software teams create projects of all sizes with efficiency, speed, and asynchronicity.

Why is Git the best version control system?

Not only does Git offer the strongest feature set for developers, but it also has the most reliable workflow and is supported by the most third-party platforms on the market. One of the great things about Git is that it can be used on nearly any platform and with numerous repository systems.

What type of version control system is Git?

Git is a Distributed VCS, a category known as DVCS, more on that later. Like many of the most popular VCS systems available today, Git is free and open source.


2 Answers

I wrote a blog post about this a while back:

Version control systems, with the possible exception of SourceSafe, are great at keeping track of code. Why is that? Because they were designed to keep track of code.

Unfortunately, though, the features of a good VCS are entirely different – and often exactly the opposite – of the features which make a good backup system.

Take, for example, file ownership. A good VCS will, very rightly, ignore file ownership: when I check out someone else's code, I should be the owner of those file - not whatever uid originally created them. A good backup system, on the other hand, will do everything in its power to preserve file ownership: when I restore from my backups, I want /etc/shaddow to be owned by root and /home/wolever/ to be owned by wolever.

BUT, if you really want to, check out bup - as far as I can tell, it does backup with git "right".

like image 81
David Wolever Avatar answered Oct 01 '22 16:10

David Wolever


Use rsync for backup. Use git for version control.

like image 44
rmk Avatar answered Oct 01 '22 16:10

rmk