borg: deduplicate, compress, backup

cloud_compLinux has several backup and imaging solutions like rsync, Mondo, Redo or BakAndImgCD. However, many of them are too primitive and don’t have support for the modern backup techniques. borg is an attic derivative that includes a plethora of advanced features you would definitely like to check out.

borg works like deduplicated snapshots and the incremental sizes are greatly reduced thanks to its advanced algorithms. It also supports optional compression and encryption.

Features

  • space-efficient storage: implements file chunk-based deduplication. All chunks in the same repository are considered irrespective of source machine, previous or same backup and same file. Deduplication-specific features:
    – file/directory name change is irrelevant
    – file or timestamp doesn’t need to remain the same
    – absolute position of a data chunk inside a file may change
  • fast: performance-critical code implemented in C and Cython, caches file/chunk index data, quickly detects unmodified files
  • encryption: optional 256-bit AES encryption
  • compression: optional lz4 compression (fast and low compression mode)
  • remote backup: backup data on a remote server or share
  • mount or list backups like a filesystem
  • can be used without root permissions
  • prune old data based on detention rules
  • restarting a backup with the same command continues an earlier cancelled backup

Installation

To install borg on Ubuntu, run:

$ sudo add-apt-repository ppa:costamagnagianfranco/borgbackup
$ sudo apt-get update
$ sudo apt-get install borgbackup

Usage

The best place to stat is:

$ man borg

To create a backup of ~/Documents within ~/backup in the home directory on Tuesday:

$ borg create ~/backup::Tue ~/Documents

Some more backup with compression on Wednesday:

$ borg create --stats -C zlib,6 ~/backup::Wed ~/Documents

Get information of Tuesday backup:

$ borg info ~/backup::Tue
Name: Tue
Fingerprint: b885880d525c611bcda57ac9b3eb5247e2e2cee1ab56142bb83684113a5500af
Hostname: tux
Username: neo
Time: Tue, 2016-01-26 23:41:14
Command line: /usr/bin/borg create /home/neo/backup::Tue /home/neo/Documents
Number of files: 388

                       Original size      Compressed size    Deduplicated size
This archive:               21.51 MB             21.52 MB              5.38 kB
All archives:               43.03 MB             43.03 MB             16.82 MB

                       Unique chunks         Total chunks
Chunk index:                     473                 1406

Get information of Wednesday backup:

$ borg info ~/backup::Wed
Name: Wed
Fingerprint: 8f4c4a8c5cc27609388abe443df98923b8943f0aafedac6da19c84d5696dcfb7
Hostname: tux
Username: neo
Time: Tue, 2016-01-27 10:15:56
Command line: /usr/bin/borg create --stats -C zlib,6 /home/neo/backup::Wed /home/neo/Documents
Number of files: 388

                       Original size      Compressed size    Deduplicated size
This archive:               21.51 MB             21.51 MB              3.10 kB
All archives:               43.03 MB             43.03 MB             16.82 MB

                       Unique chunks         Total chunks
Chunk index:                     473                 1406

List everything backup-up on Tuesday:

$ borg list ~/backup::Tue

List details of all snapshots in ~/backup:

$ borg list ~/backup
Tue                                  Tue, 2016-01-26 23:41:14
Wed                                  Wed, 2016-01-27 10:15:56

Remove complete backup:

$ sudo borg delete /mnt/backup

Rating

Features: 5/5
Usability: 4.5/5

Webpage: borg

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s