Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am looking at using a version control system to ensure that I can go back in time to a particular version for all documents in ~, if I have to.

What is the best suited tool for this given that:

  • I am without much experience in version control systems
  • Several files will be plain text files but there will be some Libre-Office files also

The tool should:

  • Be easy to set-up, run and maintain
  • Have easy to understand configuration options (what directories to track, for how long, how frequently the changes should be captured, etc.)
  • Ideally have a GUI front also
  • Be able to recover deleted files

What is the best/ most widely used tool that will be suitable for me?

share|improve this question
3  
It sounds as if you want a backup tool instead of a version control system. Use somethings like Bacula to backup your home folder and use Git or SVN to put your ~/Documents under version control. –  ayckoster Oct 30 '12 at 13:07
    
I think Déjà Dup. Is what you need. –  m0nhawk Oct 30 '12 at 19:07
    
Not even one mention of bazaar? Or is it for some other purpose? –  deshmukh Oct 31 '12 at 10:49

8 Answers 8

up vote 3 down vote accepted
+50

I have used CVS, Subversion, git, and a few commercial packages. I just migrated my personal VCS from CVS to git (I thought it was going to be more difficult than what it actually was, I should have done it long ago).

I would recommend git. Based upon what you are looking for.

I am a noob without much experience in version control systems

git may have a longer learning curve, especially if you have experience with a previous VCS. Without having been exposed to a previous VCS, your learning curve maybe be shorter.

The best way to learn git is download the book Pro Git by Scott Chacon (for free), create a test repository (mkdir <project name>; cd <project name>; git init), and hack away at it. There is really is no effort to create a repository and don't worry about screwing something up in a test repository, as each repository is independent. A repository can be easily removed (cd <project name>; rm -rf .git).

Several files will be plain text files but there will be some Libre-Office files

There is no differentiation with git on file types (ASCII vs binary), however ASCII files are optimal for seeing diffs and merging conflicts.

Be easy to set-up, run and maintain

git can be configured in a number of ways, it all depends upon what your needs are. For starters, a one many show, all you have to do is install git (sudo apt-get install --install-recommends git-core) and create a repository (shown above). If you work across a number of machines, you can set up git over ssh (it is in the book). Even better, as your needs expand you don't loose what you have done already.

Have easy to understand configuration options (what directories to track, for how long, how frequently the changes should be captured, etc.)

You can have one big repository or break them down to individual projects or down to single files. Again create a git repository and play around with it, see what works and does not.

Ideally have a GUI front also

There are many git guis that specialize in many different tasks. However learning git from the command line is highly recommended. To get started you only need to learn a few commands (git init, git status git diff, git add, git rm, git commit, git push, git pull). Also the command line helps you with tasks you need to do. For example: git status

# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   systems/ion/setup.txt
#   modified:   systems/dogstar/teardown.txt
#   modified:   applications/help.html
#   modified:   applications/readme.txt
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   applications/faq.html
no changes added to commit (use "git add" and/or "git commit -a")

If you are more comfortable with a GUI, SmartGit is newbie friendly.

Be able to recover deleted files

Yes, git can recover any version of any file as long as it has been committed.

What is the best/ most widely used tool that will be suitable for me?

git is widely used. As far as the best goes, it is among the best, if not the best. But being the best, is more of a personal opinion and is also based upon the situation.

share|improve this answer

I would recommend git because:

  1. It's easy to use
  2. You can host it on github for free
  3. For windows you can use github for windows which gives you a gui.
  4. It's fast
  5. Syntax highlighting if you need it on the github website.
  6. You can run it locally making it ideal for personal projects.
share|improve this answer
2  
I would not advice the open github for your personal text and libre-office files. If they are public it could be, but the question doesn't read like that to me :) –  Nanne Oct 30 '12 at 13:01
1  
then bitbucked is the answer, that isnt public –  Dr_Bunsen Oct 30 '12 at 13:05

Well known versioncontrol-systems are CVS, SVN (subversion) and GIT. There is no need to think about ye olde CVS, so that leaves us SVN and GIT.

For your limited use I don't think that it really matters which you choose, so my advice would be to see who you know that uses one of them, and choose that :)

If you are looking for ease-of-use for the more complicated stuff (real version control for code etc) I would suggest using GIT. Basically "them" say that SVN was an update for CVS, and GIT again is an 'update' to SVN. I personally think that the advantages of GIT over SVN are specifically for multiple users and multiple branches, so maybe not really something you should worry about.

On the other hand, why not have some experience with the better option available, you never know what you want to do in the future.

Please check out some the info on them

share|improve this answer

The way it sounds, I think using a version control like git, Mercurial hg, bzr or svn is not a perfect fit for your needs, since they are primarily targeted for source files, not binary data. Thus, I want to add some additional possibilities here.

I think a nice solution would be a cloud based backup service. I personally use SpiderOak, which works really well.

Déjà Dup

Uses duplicity as its backend.

Pros

  • Ubuntus own backup solution
  • Very easy
  • Many options for where you want the backups to go

Cons

  • More of a backup solution, not version control
  • Somewhat limited control

If it's not there already, install it:

sudo apt-get install deja-dup 

You can find it in dash if you enter backup.

SpiderOak

Pros

  • Ubuntu packages available, adds repository to sources.list (auto updates)
  • You can select any folder to backup (unlike dropbox)
  • Runs in background, watches for changes in these folders and only uploads the changes (saves bandwidth), this is automatic & immediately
  • Client side encryption (unlike dropbox)
  • Recognizes duplicates
  • Compresses files on server
  • Keeps deleted files and older versions on its server (as long as you have free storage space there), unless you explicitly delete them
  • Nice GUI
  • Possibility to sync between computers (Linux / Windows / OS X, Mobile Clients for read-only)
  • Cloud based - even if your harddisk crashed, you still have a backup

Cons

  • Cloud based - internet connection required
  • Not fully open source
  • Only 2 GB (shameless plug: if you want an additional GB, you could use my referrer link )

Download it here: SpiderOak Download

rdiff-backup

Pros

  • Local or remote backup possible
  • Fine grained control
  • rsync algorithm, only tracks changes
  • Space efficient (unchanged files are untouched)
  • File permissios can get stored as well
  • Can keep the last n versions or the last n days of your backups

Cons

  • Must be run by a cronjob or explicitly
  • Command line utility (if that's not your thing), but there is a GUI available: Pybackpack

Install it via:

sudo apt-get install rdiff-backup pybackpack

BTRFS snapshots

Although not for the faint of heart, there is the possibility to have your /home directory on a seperate BTRFS partition and create snapshots of that once in a while

Pros

  • Very space efficient, only changed files are stored again
  • Keeps track of all data of the partition
  • Fast
  • Mount any older snapshots to access previous versions

Cons

  • BTRFS is still relatively new
  • Not newbie friendly
  • Command line only
  • Requires some tinkering with the system
  • Not a backup solution - if your hard drive crashes, all versions are lost

There is a howto on Ubuntus help pages.

share|improve this answer
    
+1 for showing alternatives –  deshmukh Nov 6 '12 at 2:47

You can use Codebase .

  1. It is software project management tool with fast, reliable & secure Git, Mercurial & Subversion hosting baked right in.
  2. It can keep track of whole project from the web and deploy repositories straight to the servers.
  3. It have powerful project management features with advanced ticket management,activity feeds and control of data with customisable permissions,complete search functionality and developer API
share|improve this answer

I do not think you want to do this. Source control is just for that, source control. Most do not handle binary files (like images, music, movies, etc.) very well.

Also SCMs will give you a line by line chunk of what data has changed. So every time you log in or log out, you will be changing some data. You will have to "merge" or "commit" all the time. I am almost certain this is not what you want.

However, there are a couple of really good tools.

Back-In-Time is awesome, and has a diff viewer. Deja Dupe is the default, but I don't think it's very feature rich. grsync can give you a list of files against a backup that have changed. and plain old rsync is an option.

If you insist on using a SCM then I recommend git, but hosted locally. Add a .gitignore that excludes all binary files. Better yet, you could try just verson controlling your config directories. Again your going to have to watch out for binary files.

share|improve this answer
    
By the way, diff works on directories if your just trying to get a list of changed files. –  coteyr Nov 3 '12 at 15:13
    
+1 for pointing to the 'risks' in using git (or git-like) systems –  deshmukh Nov 6 '12 at 2:46

Reading through your question again, I think what you want is a local repository created with a tool such as svn, and maintained with its frontend, rapidsvn. This would seem to suit your purpose particularly well: the local repository could be on your main hard disk or on an external drive. It is important to note that version control is best suited to source code or text files or documents and is not suitable for multimedia files. Dropbox or Ubuntu One would be better for that kind of backup. In addition, you can go back to previous versions of files with dropbox.

Anyway, I will briefly show how the gui tool rapidsvn works and how svn is used from the command-line.

Firstly, install the necessary files with

sudo apt-get install subversion rapidsvn

More information is available at the official site for rapidsvn, although it is important to note that you must still create your svn repository with the command-line first. Make sure you are at the top level of your home folder (enter cd to get to it if necessary) and enter:

svnadmin create --fs-type fsfs ~/svn

Then create an initial folder with

svn mkdir file:///home/mike/svn/folder -m "initial folder"

Using the quickstart guide we can load up rapidsvn, right click bookmarks and add your repository by clicking Checkout New Working Copy and from then on you can manipulate your files as you wish with checkouts, imports, and commits.

enter image description here

I think this is probably just the gui you were looking for, as it can easily manage all your files, and it is easier to configure the options than using svn on the command-line.

share|improve this answer
    
It seems that git is an update over svn. I will give it a try and see how things go from there. But the gui you have suggested looks good and will be my second option if git fails –  deshmukh Nov 6 '12 at 2:45

GNU RCS (Revision Control System) manages multiple revisions of files. RCS can store, retrieve, log, identify, and merge revisions. It is useful for files that are revised frequently, e.g. programs, documentation, graphics, and papers. It can handle text as well as binary files, although functionality is reduced for the latter.

The basic user interface is extremely simple. The novice only needs to learn two commands: ci and co. ci, short for checkin deposits the contents of a file into an archival file called an RCS file. An RCS file contains all revisions of a particular file. co is short for checkout.

Need to diff your changes? rcsdiff.

Project Page: http://savannah.gnu.org/projects/rcs/

Manual: http://www.gnu.org/software/rcs/manual/rcs.html

I "need at least 10 reputation to post more than 2 links" so the following will need to be altered by the reader in order to get to the link. Writeup by the author that you may want to read eventually:

http://www.gnu.org/software/rcs/tichy-paper.pdf

A nice summary and geneology of various revision control system software available:

http://en.wikipedia.org/wiki/Revision_Control

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.