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. Continue reading borg: deduplicate, compress, backup

Snapper: snapshot utility from SUSE

Speaking of filesystem snapshots, Linux already has utilities like Timeshift in its arsenal. However, we couldn’t ignore Snapper, a fresh and powerful snapshot manager from SUSE. Non-root users can also use Snapper to view older versions of files and revert changes (if they have permission). Snapper is available for multiple distributions. Continue reading Snapper: snapshot utility from SUSE

Backup modified config & system files on Linux

cool_penguin_smallIf you love to tweak your Linux system on the go, you probably have a lot of modified (and added) configuration and system files. What if you want to take a backup of those files before doing an upgrade? There are simple ways to accomplish things on Linux without installing new packages. Here’s what I do.

  • Maintain a list of modified files in a plain text file, each entry separated by a newline. Whenever you modify a file, add it to this list. Use absolute paths so that it’s easy to replace the files when restoring (you’ll see). Here’s an example list:
    $ cat list.txt
    /home/neo/.bashrc
    /home/neo/.vimrc
    /home/neo/.config/smplayer/smplayer.ini
    /opt/tor-browser_en-US/Docs/ChangeLog.txt
  • Save the following shell script in a file:
    #!/bin/bash
    #file: take_backup.sh
    lt_red='\e[1;31m'
    BACKUP_DIR=backup-$(date "+%Y_%m_%d_%H_%M_%S")
    mkdir $BACKUP_DIR
    cat $1 | xargs cp --parents -t $BACKUP_DIR
    cd $BACKUP_DIR
    tar -jcvf ../$BACKUP_DIR.tar.bz2 *
    cd ..
    rm -rf $BACKUP_DIR
    echo -e ${lt_red}Backed-up in $BACKUP_DIR.tar.bz2
  • Make it executable:
    $ chmod +x take_backup.sh
  • To take a backup:
    $ ./take_backup.sh list.txt

    The script is in verbose mode to show every file being backed-up. It will show the final archive name in light red.

  • The directory structures are preserved. So you can restore all the files using:
    $ tar -xvf backup-timestamp.tar.bz2 -C /

This is a basic script. You can modify and extend it to meet your needs. It does need manual entry into the list of files. But on your box you are the best one to choose what you want to save.

Systemback: restore points on Ubuntu

systemback_compWe explored TimeShift in one of our earlier articles. We came across another backup tool that works similarly – Systemback. It too does a restore point based backup and can handle system files as well as user configuration files. Note that it is not a tool to backup videos, pictures or documents. A restore point can be created at any time and the application will list the time of the restore point creation for an easy rollback later. Features include:

  • Create restore points
  • Copy system from one partition to another
  • Create a new user, modify root password, modify hostname
  • Create a Live CD/DVD/USB from current system with or without user data
  • System repair, Grub2 repair with or without fstab
  • Upgrade Ubuntu to next release
  • Exclude certain files

Run the following commands to install Systemback on Ubuntu (12.04.x, 14.04.x or 14.10 at the time of writing):

$ sudo add-apt-repository ppa:nemh/systemback
$ sudo apt-get update
$ sudo apt-get install systemback

Webpage: Systemback

Redo: backup and restore Linux

In our past articles we wrote about Linux backup/restore/imaging solutions like Mondo Rescue and BakAndImgCD. We came across another easy to use backup solution – Redo. Redo is essentially a 250MB Linux live distro that can boot from USB and take a backup or your system or restore it from a previous image. Redo is very easy to use because of it’s simplistic approach to solve the problem. It is a GPLv3 Perl script built with a GTK2+ interface designed in Glade. The imaging is done by partclone. Features include:

  • No installation needed; runs from a CD-ROM or a USB stick
  • Easy and pretty GUI boots from CD in less than a minute
  • Saves and restores Linux and Windows machines
  • Automatically finds local network shares
  • Access your files even if you can’t log in
  • Recover deleted pictures, documents, and other files
  • Internet access with a full-featured browser to download drivers
  • Drive configuration tools and factory drive reset option
  • Open source and free

Redo comes as an ISO. You can download it from Redo homepage (linked below). Create a live USB using Unetbootin and start backing up your Linux box!

Webpage: Redo

BakAndImgCD: your tiny backup solution

[youtube=https://www.youtube.com/watch?v=Hhb_Kcrpl1c]

BakAndImgCD is a minimal Linux distro based on 4MLinux for all your backup needs. It comes in an ISO of 20MB (!!!) which is much lesser in bulk than well-known solutions like Clonezilla (128MB). It doesn’t have any desktop environment as the interface is menu driven. Features:

  • Can run from USB.
  • Supports btrfs, ext2, ext3, ext4, FAT, HFS, HFS+, jfs, Minix, NTFS, ReiserFS, and XFS filesystems.
  • Can perform disk imaging using using Partimage, Partclone and GNU ddrescue.
  • Archives and images can be optionally compressed and sent to a remote FTP/SFTP sever or backed-up on USB or optical media.
  • 3 operational modes: selective file backup, automatic file backup, dis image creation.
  • Utility applications include Midnight Commander file browser, Lynx text based web browser and cfdisk or cgdisk partition managers.
  • Open source and free.

Webpage: BakAndImgCD

Timeshift: System Restore on Ubuntu

timeshift_compTimeshift is hell of a useful utility for Ubuntu users. There are so many times when you may have broken your system and wished there was a tool like System Restore on Windows (or Time Machine on Mac) to get back to a Restore Point or snapshot. Admittedly, this is indeed an area where Linux was lacking a really useful functionality. Timeshift has just filled in the gap! Capabilities:

  • Backs up only system files and settings
  • Take incremental backups of your system at regular intervals
  • Unmodified files are not backed up twice
  • Return to a past snapshot
  • Uses rsync and hard-links
  • Automatic boot snapshots 30 minutes after system starts
  • Runs at 30 minute intervals but takes snapshots only if required
  • Uses tags to save more disk space
  • System can be restored on the running system or from a live CD
  • Cross-distro restoration for Ubuntu family of distros
  • Minimal setup

To install on Ubuntu:

$ sudo add-apt-repository ppa:teejee2008/ppa
$ sudo apt-get update
$ sudo apt-get install timeshift

Webpage: Timeshift

UPDATE

Timeshift is available for BTRFS volumes now. To install on Ubuntu:

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift-btrfs

Mondo Rescue: backup your Linux box

Today I came across Mondo Rescue, a Linux backup and recovery solution. It looked very promising to me given that there are very few Linux free backup solutions like Clonezilla. Though I didn’t try it out it seemed to be a bare metal backup/imaging solution from some of the manuals. It can be installed on many Linux platforms and supports Linux filesystems as well as Windows. Here’s the detailed project documentation.

Primary features:

  • Clone an installation of Linux. Just backup the crucial stuff and exclude /home, /var/log, etc.
  • Backup a non-RAID file system and restore it as RAID including the root partition (if your kernel supports that).
  • Backup a system running on one format and restore as another format.
  • Restructure your partitions, e.g. shrink/enlarge, reassign devices, add hard drives, etc, before you partition and format your drives. Mondo will restore your data and amend /etc/lilo.conf and /etc/fstab accordingly.
  • Backup Linux/Windows systems, including the boot sectors. Mondo will make everything right at restore-time. (However, do run “Scandisk” when you first boot into Windows, just in case.)
  • Use Mondo backup CD to verify the integrity of your computer.

It also has a bootable component called Mindi Linux which creates a set of boot/root media images that will let you perform basic system maintenance on your Linux distro. Mindi’s boot disks contain your kernel, modules, tools and libraries. You can ask for additional binaries (or other files) to be included on the kit. The libraries will be added.

Webpage: Mondo Rescue