Using BUP to take backup in ubuntu

bup is a program that backs things up. It’s short for “backup.” BUP is a Very efficient backup system based on the git packfile format, providing fast incremental saves and global deduplication (among and within files, including virtual machine images).

In, simple words, you can use “bup” to take backup of something at one place or one machine and restore it to other place or other machine. Now, to read more about why BUP is great, please visit its github repository at

Now, lets try to prepare a demo for how to take a backup and restore in ubuntu 14.04

Install BUP :

We will install it into custom location other than default places in ubuntu, so once you understood, you can always install it to default locations using sudo permissions.

$ mkdir backup
$ cd backup/
$ git clone
$ cd bup/
$ sudo apt-get build-dep bup
$ make
$ make test
$ mkdir bup-bin
$ make install DESTDIR=$PWD/bup-bin PREFIX=”

This will install the BUP binary into your present working directory, $PWD/bup-bin, you can check using “ls” or “tree” command.

$ tree bup-bin/

Add bup to your path as,

$ export PATH=$PATH:$PWD/bup-bin/bin

Now, you are all set to use bup. Follow below steps to take backup of custom directory and restore it to custom place, instead of standard folders like /etc as mentioned in github documentation.

$ mkdir ~/Desktop/bup-backup-test

$ cd ~/Desktop/bup-backup-test

Now, lets say, we have some source code at /home/myuser/Desktop/mysource which we want to take backup,

$ bup init

$ bup index ~/Desktop/mysource/

$ bup save -n local-source ~/Desktop/mysource/

These steps will take the backup into ~/.bup much similar way of the look of .git folder, when you do “git init”

Related :   What is the difference between elfutils and binutils ?

$ ls -al ~/.bup/

Now your backup is complete, Lets try to restore this to some other directory,

$ mkdir ~/Desktop/bup-restore-test

$ bup restore -C /home/myuser/Desktop/bup-restore-test local-source/latest/home/myuser/Desktop/mysource/

And you should see the contents of your original source at /home/myuser/Desktop/mysource/ restored to /home/myuser/Desktop/bup-restore-test

Remember to use complete path as /home/myuser/Desktop/bup-restore-test with “bup restore” command.

You can check ~/.bup folder using “du -sh” to check how much space has been consumed during backup restore. Do Read github documentation for more understanding.

How this will be helpful, Do share this article on facebook, twitter and follow this website.

Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense Multimedia - Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply / Ask Question