user64075
user64075

Reputation: 603

Is there a fundamental difference between backups and version control?

How does version control differ from plain backups?

Let's forget about the feature decoration, and concentrate on the soul of version control. Is there a clear line that backups must cross before they can be called a VCS? Or are they, at heart, the same thing with different target markets?

If there is a fundamental difference, what is the absolute minimum requirement for something to reach the status of version control?

When you answer, please don't just list features (such as delta compression, distributed/central repositories, and concurrent access solutions) that most version control systems have or should have, unless they actually are necessary for a VCS by definition.

Upvotes: 30

Views: 7409

Answers (17)

Chance
Chance

Reputation: 2700

The basic difference that stands out to me is that version control allows multiple users to easily work on the same code. Backups do not.

Upvotes: 2

Bob Weber
Bob Weber

Reputation: 143

At it's basic level there is no difference between version control and backups. A version control system is an incremental backup of every change that is made. A basic, non distributed VCS, like CVS used by one developer will simply create a backup of every change that is made to a text file.

Where version control moves beyond basic backups is in the additional tools that are provided to compare versions, merge changes made by multiple developers, tag versions for release or testing and conduct other operations that make managing these separate versions possible.

Upvotes: 0

Jörg W Mittag
Jörg W Mittag

Reputation: 369428

I see several fundamental differences between backups and version control:

  1. Backups only store the latest version, or, even if they store multiple versions, they don't store every version. A VCS does store every version,
  2. That backup version is often out of date, because backups don't record every change, while VCSs do,
  3. VCSs allow to pursue multiple alternative versions of the same change at the same time (i.e. branching).

However, the single most important difference between backups and VCS is that, in a VCS, changes have meaning. In a backup, a new version is made, because some computer somewhere decided that it was x hours since the last backup; the change itself is completely meaningless. In a VCS, a new version is made, because some human decided that this version has its own meaning, its own identity, different from all the other versions. So, in a backup, all versions are equal (more precisely: they are equally meaningless), whereas in a VCS all versions are special (they have their own unique meanings). In a VCS, changes have an actual history, where one event led to another, in a backup there's just a string of unrelated events.

Closely related to this, is the notion of change metadata. In a VCS, every change has an author, a timestamp and, most importantly, a commit message. This commit message records why the change was made, in other words, it records the "meaning" I wrote about in the previous paragraph.

The commit history and especially the commit messages are the most important data in a VCS repository, not the actual code itself! This metadata is completely absent in a backup.

Upvotes: 10

cmsjr
cmsjr

Reputation: 59155

The bare minimum requirement for a backup system to have in order for it to be used for version control is incremental backup and restore for discrete backup items. Additional features (Collaboration, Branching, Diff Comparison) may make it a better VCS system, but insofar as you can control versions as long as you can have reliable access to retrieve and rollback to incrementally different versions of an item you have backed up, you can use it as a "VCS". So, I suppose the fundamental difference between a backup and version control system is what you are using the system to do. Particularly given that you could, if you desired, use your VCS as your backup system.

Upvotes: 1

Marc
Marc

Reputation: 1356

They are totally unrelated things. Think of version control as a kind of "time machine", which you can use to go back and forth in time with your code.

Upvotes: 0

Darius Bacon
Darius Bacon

Reputation: 15124

Version control represents the whole history of changes; backups try to make sure you don't lose it.

Upvotes: 5

Ash
Ash

Reputation: 62096

The capability to perform branching and merging separates version control systems from plain backups. "Multiple concurrent universes".

See also Eric Sink's excellent version/source control guide.

Upvotes: 10

Jason Cohen
Jason Cohen

Reputation: 83011

Version control is collaborative, backup is just a snapshot.

Example: With version control two people can edit the same file concurrently, and the system is smart enough to merge the changes together. With backup, which version of the file would "win?" Backup never "merges" two different backups into one "true" backup.

Upvotes: 3

unwesen
unwesen

Reputation:

I think you can form arguments for either lumping backups together with VCS, or for treating them as entirely separate. But I think you can't avoid talking about individual features of a VCS, as it's the features that differntiate a VCS from a backup solution:

  • Keeping track of who made what change.
  • Attaching a note to each change to explain the reasons behind the change.
  • (Mostly) concurrent access by several users, possibly from very different locations.

In my eyes, these features are defining. If you ignore them, a VCS is essentially the same as an incremental backup solution.

If you look at a distributed VCS, you might find a stronger notion of keeping track of branches than in a non-distributed VCS. That is, there may not be a single head/trunk branch, but several at any given time. That's something no backup solution I've come across considers.

Upvotes: 2

Jay Bazuzi
Jay Bazuzi

Reputation: 46496

Perhaps they are fundamentally the same, until you add the word "good".

  • "good" VCS is very fast.
  • "good" VCS allows multiple sources of changes (multiple users).
  • "good" VCS allows merging.
  • "good" VCS has metadata, like user-provided descriptions

  • "good" backups are distributed geographically

  • "good" backups work automatically.

Upvotes: 1

ChrisW
ChrisW

Reputation: 56083

In my opinion, here are some minimum features of a VCS which may not be in a basic backup:

  1. A VCS should store more than one versions (where as a backup might store only the latest last-known-good)

  2. Because of 1., each version should be identified somehow (date, tag, version ID)

  3. A VCS can typically support more than one concurrent user

  4. A VCS for source code will normally have support for branching, merging, adding comments, and viewing deltas

Upvotes: 2

Joonas Pulakka
Joonas Pulakka

Reputation: 36577

The fundamental idea of version control is to manage multiple revisions of the same unit of information. The idea of backup is to copy the latest version of information to safe place - older versions can be overwritten.

Upvotes: 28

Peter Boughton
Peter Boughton

Reputation: 112150

There's certainly a grey area between them, however I would define as follows:

Version control is triggered by a 'write' action, where as backup is generally triggered by a time interval.

Backup software can be configured to run every second, and not store data if no changes have occurred, but that's not enough for it to be considered version control in my eyes, since it is possible for a file to change twice in a second.

Upvotes: 4

shoosh
shoosh

Reputation: 78914

Here's a few

  • A backup system keeps backups for a given range of time back. Version control typically always keep all the versions ever made.
  • Version control typically concentrates on versioning of text files.
  • In A version control system you typically can get immediate access to any version of any file. A backup system may take some time before having access to what you want to find.

Upvotes: 3

user65952
user65952

Reputation: 202

Version control is basically an automated backup system that allows multiple users to contribute. There are absolutely more features involved with software like CVS, but yeah, it's a backup system under the hood. That doesn't mean you should manually backup instead of use version control, though, they're just in the same niche of computing.

Upvotes: 1

Malfist
Malfist

Reputation: 31785

Version control keeps a history of changed, and most version control systems only store the difference between two versions, not everything. Backups store everything, and they have no history unless you do it manually. Backups are inefficient usually. However version control systems are not very efficient with binaries.

Upvotes: 1

gpojd
gpojd

Reputation: 23055

I would consider backups a very basic version control system. I would not recommend it for lots of things, but if I have a small script on my home computer, I use dated backups instead of a full featured VCS. This is OK because I am the only one to change the file, so I do not need to worry about conflicts or who made a change.

Upvotes: 1

Related Questions